diff --git a/packages/web/src/commands/stdCommands.ts b/packages/web/src/commands/stdCommands.ts index 20ee4082..b2d6eb69 100644 --- a/packages/web/src/commands/stdCommands.ts +++ b/packages/web/src/commands/stdCommands.ts @@ -29,26 +29,27 @@ import runCommand from './runCommand'; import { openWebLink } from '../utility/exportElectronFile'; import { getSettings } from '../utility/metadataLoaders'; -function themeCommand(theme: ThemeDefinition) { - return { - text: theme.themeName, - onClick: () => currentTheme.set(theme.themeClassName), - // onPreview: () => { - // const old = get(currentTheme); - // currentTheme.set(css); - // return ok => { - // if (!ok) currentTheme.set(old); - // }; - // }, - }; -} +// function themeCommand(theme: ThemeDefinition) { +// return { +// text: theme.themeName, +// onClick: () => currentTheme.set(theme.themeClassName), +// // onPreview: () => { +// // const old = get(currentTheme); +// // currentTheme.set(css); +// // return ok => { +// // if (!ok) currentTheme.set(old); +// // }; +// // }, +// }; +// } registerCommand({ id: 'theme.changeTheme', category: 'Theme', name: 'Change', toolbarName: 'Change theme', - getSubCommands: () => get(extensions).themes.map(themeCommand), + onClick: () => showModal(SettingsModal, { selectedTab: 1 }), + // getSubCommands: () => get(extensions).themes.map(themeCommand), }); registerCommand({ diff --git a/packages/web/src/settings/SettingsModal.svelte b/packages/web/src/settings/SettingsModal.svelte index 3d4f8f53..051f5475 100644 --- a/packages/web/src/settings/SettingsModal.svelte +++ b/packages/web/src/settings/SettingsModal.svelte @@ -17,6 +17,8 @@ const electron = getElectron(); let restartWarning = false; + + export let selectedTab = 0; @@ -25,6 +27,7 @@