use type, remove console

This commit is contained in:
Kendall Garner 2024-01-22 18:52:14 -08:00
parent b3a9e7ccba
commit 5e9ef9f23f
No known key found for this signature in database
GPG key ID: 18D2767419676C87
5 changed files with 8 additions and 4 deletions

View file

@ -1,5 +1,6 @@
import { ipcMain, nativeTheme, safeStorage } from 'electron';
import Store from 'electron-store';
import type { TitleTheme } from '/@/renderer/types';
export const store = new Store();
@ -49,7 +50,7 @@ ipcMain.handle('password-set', (_event, password: string, server: string) => {
return false;
});
ipcMain.on('theme-set', (_event, theme: 'dark' | 'light' | 'system') => {
ipcMain.on('theme-set', (_event, theme: TitleTheme) => {
store.set('theme', theme);
nativeTheme.themeSource = theme;
});