From f655cdf953f275b8879247ff8674315c9041408a Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Mon, 2 Oct 2023 17:24:17 +0900 Subject: [PATCH] fix: fix #7 --- config/defaults.ts | 2 +- menu.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config/defaults.ts b/config/defaults.ts index e32f9857..0108db0e 100644 --- a/config/defaults.ts +++ b/config/defaults.ts @@ -65,7 +65,7 @@ const defaultConfig = { proxy: '', startingPage: '', overrideUserAgent: false, - themes: {} as string[], + themes: [] as string[], }, 'plugins': { // Enabled plugins diff --git a/menu.ts b/menu.ts index fca99e6d..7ff969d9 100644 --- a/menu.ts +++ b/menu.ts @@ -150,7 +150,7 @@ export const mainMenuTemplate = (win: BrowserWindow): MenuTemplate => { { label: 'No theme', type: 'radio', - checked: !config.get('options.themes'), // Todo rename "themes" + checked: config.get('options.themes').length === 0, // Todo rename "themes" click() { config.set('options.themes', []); }, @@ -158,8 +158,7 @@ export const mainMenuTemplate = (win: BrowserWindow): MenuTemplate => { { type: 'separator' }, { label: 'Import custom CSS file', - type: 'radio', - checked: false, + type: 'normal', async click() { const { filePaths } = await dialog.showOpenDialog({ filters: [{ name: 'CSS Files', extensions: ['css'] }],