fix: electron-store config.json missing

* Added 'electron-store' to the Vite configuration for Electron.
* Imported configuration from '@main/config' in the main index file.
* Changed default return value for getTrayOnClose method in ConfigManager to false
This commit is contained in:
kangfenmao 2025-05-17 08:46:26 +08:00
parent f84358adfd
commit 3c2e8e2f1d
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,5 @@
import '@main/config'
import { electronApp, optimizer } from '@electron-toolkit/utils' import { electronApp, optimizer } from '@electron-toolkit/utils'
import { replaceDevtoolsFont } from '@main/utils/windowUtil' import { replaceDevtoolsFont } from '@main/utils/windowUtil'
import { IpcChannel } from '@shared/IpcChannel' import { IpcChannel } from '@shared/IpcChannel'

View File

@ -62,7 +62,7 @@ export class ConfigManager {
} }
getTrayOnClose(): boolean { getTrayOnClose(): boolean {
return !!this.get(ConfigKeys.TrayOnClose, true) return !!this.get(ConfigKeys.TrayOnClose, false)
} }
setTrayOnClose(value: boolean) { setTrayOnClose(value: boolean) {