titlebar switching

This commit is contained in:
Kendall Garner 2024-01-21 22:47:59 -08:00
parent f0f2f54e5a
commit 33972c2a83
No known key found for this signature in database
GPG key ID: 18D2767419676C87
4 changed files with 37 additions and 2 deletions

View file

@ -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;
});