feat(desktop-client): add settings window and switch default API to production

- Open a dedicated settings BrowserWindow with general / login / diagnostics / about tabs
- Persist openAtLogin and keepRunningInBackground via desktop-settings.json; hide main window instead of quitting when background mode is on
- Default API base URL now points to api.shengxintui.com; LoginView and SettingsView share a single constant
- Restore wangyihao session cookies on probe and silent refresh, and accept the legacy http://mp.163.com console origin
- Drop the standalone diagnostics view in favor of the settings tab

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-30 22:00:01 +08:00
parent 40ef60eae2
commit baff51295a
13 changed files with 1110 additions and 226 deletions
+11
View File
@@ -27,6 +27,11 @@ interface WindowModeRequest {
animate?: boolean;
}
interface DesktopAppSettings {
openAtLogin: boolean;
keepRunningInBackground: boolean;
}
const rendererProxyRequestChannel = "desktop:renderer-devtools-proxy:request";
const rendererProxyResponseChannel = "desktop:renderer-devtools-proxy:response";
@@ -120,6 +125,12 @@ const desktopBridge = {
ipcRenderer.invoke("desktop:retry-publish-task", taskId) as Promise<CreatePublishJobResponse>,
openExternalUrl: (url: string) =>
ipcRenderer.invoke("desktop:open-external-url", url) as Promise<null>,
openSettingsWindow: () =>
ipcRenderer.invoke("desktop:open-settings-window") as Promise<null>,
getAppSettings: () =>
ipcRenderer.invoke("desktop:get-app-settings") as Promise<DesktopAppSettings>,
setAppSetting: (key: keyof DesktopAppSettings, value: boolean) =>
ipcRenderer.invoke("desktop:set-app-setting", key, value) as Promise<DesktopAppSettings>,
syncRuntimeSession: (session: DesktopRuntimeSessionSyncRequest | null) =>
ipcRenderer.invoke("desktop:runtime-session-sync", session) as Promise<null>,
releaseRuntimeSession: (revoke?: boolean) =>