feat(desktop): first-run onboarding, OS-language default, native polish

This commit is contained in:
zhayujie
2026-06-24 16:38:51 +08:00
parent ab6f49a822
commit 44b61684ed
13 changed files with 470 additions and 41 deletions

View File

@@ -50,4 +50,13 @@ contextBridge.exposeInMainWorld('electronAPI', {
},
platform: process.platform,
// OS UI language (e.g. "zh-CN"), read synchronously so the renderer can pick
// a default language on first run. Falls back to '' if unavailable.
systemLocale: (() => {
try {
return ipcRenderer.sendSync('get-system-locale') as string
} catch {
return ''
}
})(),
})