mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
titlebar switching
This commit is contained in:
parent
f0f2f54e5a
commit
33972c2a83
4 changed files with 37 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { ipcMain, safeStorage } from 'electron';
|
||||
import { ipcMain, nativeTheme, safeStorage } from 'electron';
|
||||
import Store from 'electron-store';
|
||||
|
||||
export const store = new Store();
|
||||
|
|
@ -48,3 +48,8 @@ ipcMain.handle('password-set', (_event, password: string, server: string) => {
|
|||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
ipcMain.on('theme-set', (_event, theme: 'dark' | 'light' | 'system') => {
|
||||
store.set('theme', theme);
|
||||
nativeTheme.themeSource = theme;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue