feat(desktop): remember login credentials
Desktop Client Build / Resolve Build Metadata (push) Successful in 49s
Frontend CI / Frontend (push) Successful in 5m47s
Desktop Client Build / Build Desktop Client (push) Successful in 42m28s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 2m38s

This commit is contained in:
2026-05-14 21:49:27 +08:00
parent 639516f374
commit 5bbbbc5cf1
5 changed files with 181 additions and 16 deletions
+10
View File
@@ -17,6 +17,11 @@ declare global {
keepRunningInBackground: boolean
}
interface DesktopLoginCredentials {
identifier: string
password: string
}
interface Window {
desktopBridge: {
app: {
@@ -54,6 +59,11 @@ declare global {
openExternalUrl(url: string): Promise<null>
openSettingsWindow(): Promise<null>
getAppSettings(): Promise<DesktopAppSettings>
getLoginCredentials(): Promise<DesktopLoginCredentials | null>
saveLoginCredentials(
credentials: DesktopLoginCredentials,
): Promise<DesktopLoginCredentials>
clearLoginCredentials(): Promise<null>
setAppSetting(key: keyof DesktopAppSettings, value: boolean): Promise<DesktopAppSettings>
syncRuntimeSession(session: DesktopRuntimeSessionSyncRequest | null): Promise<null>
rotateRuntimeClientToken(): Promise<DesktopClientRotateResponse>