This commit is contained in:
Biki Kalita
2026-01-17 23:10:57 +05:30
parent 92e908aed8
commit 31d0e6d3dc
7 changed files with 94 additions and 7 deletions

View File

@@ -38,6 +38,12 @@ interface SetProxyResult {
devMode?: boolean
}
/** Result of setting user locale */
interface SetUserLocaleResult {
success: boolean
error?: string
}
declare global {
interface Window {
/** Main window Electron API */
@@ -62,6 +68,10 @@ declare global {
getProxy: () => Promise<ProxyConfig>
/** Set proxy configuration (saves and restarts server) */
setProxy: (config: ProxyConfig) => Promise<SetProxyResult>
/** Get user's preferred locale */
getUserLocale: () => Promise<"en" | "zh" | "ja" | undefined>
/** Set user's preferred locale */
setUserLocale: (locale: string) => Promise<SetUserLocaleResult>
}
/** Settings window Electron API */
@@ -88,4 +98,10 @@ declare global {
}
}
export { ConfigPreset, ApplyPresetResult, ProxyConfig, SetProxyResult }
export type {
ConfigPreset,
ApplyPresetResult,
ProxyConfig,
SetProxyResult,
SetUserLocaleResult,
}