refactor: main code

This commit is contained in:
kangfenmao
2024-11-02 23:29:16 +08:00
parent 2f05435ce6
commit bddedb7759
13 changed files with 81 additions and 63 deletions
+19
View File
@@ -0,0 +1,19 @@
import Store from 'electron-store'
export class ConfigManager {
private store: Store
constructor() {
this.store = new Store()
}
getTheme(): 'light' | 'dark' {
return this.store.get('theme', 'light') as 'light' | 'dark'
}
setTheme(theme: 'light' | 'dark') {
this.store.set('theme', theme)
}
}
export const configManager = new ConfigManager()