- Move the Tauri app (React frontend + Rust backend) into desktop/ via git mv — configs unchanged (relative paths: tauri.conf.json, vite.config.ts) - Root package.json becomes a private bun workspace container with orchestration scripts; desktop package renamed gridline-desktop - Scaffold www/ with Astro 7 + Tailwind v4 (hand-wired vite plugin, static output, ready for Dokploy) - Update release.yml for the new layout: projectPath: desktop, desktop/src-tauri resource paths, rust-cache workspace path - Update README + AGENTS.md structure trees and dev commands - Verified: vitest (1074), cargo test (354), desktop build, tauri dev (window launches), tauri build (dmg + app bundles), Astro build
17 lines
718 B
TypeScript
17 lines
718 B
TypeScript
import { saveConnectionPassword, deleteConnectionPassword } from "./commands";
|
|
|
|
// Persist (or purge) the DB password according to the keychain toggle.
|
|
// use_keychain defaults to true (opt-out): ON = OS keychain; OFF = purge + session-only.
|
|
// Shared by connectionStore.createConnection and EditConnectionModal.
|
|
export async function persistDbPassword(
|
|
connectionId: string,
|
|
useKeychain: boolean | undefined,
|
|
password: string | null | undefined,
|
|
): Promise<void> {
|
|
const useKc = useKeychain ?? true;
|
|
if (useKc && password) {
|
|
await saveConnectionPassword(connectionId, password);
|
|
} else if (!useKc) {
|
|
try { await deleteConnectionPassword(connectionId); } catch { /* purge; ignore missing */ }
|
|
}
|
|
} |