mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-18 20:17:09 +08:00
feat(desktop): first-run onboarding, OS-language default, native polish
This commit is contained in:
@@ -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 ''
|
||||
}
|
||||
})(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user