mirror of
https://github.com/dbgate/dbgate
synced 2024-11-08 04:35:58 +00:00
change theme calls tehem settings
This commit is contained in:
parent
7128a47f0a
commit
20c56a92ee
@ -29,26 +29,27 @@ import runCommand from './runCommand';
|
|||||||
import { openWebLink } from '../utility/exportElectronFile';
|
import { openWebLink } from '../utility/exportElectronFile';
|
||||||
import { getSettings } from '../utility/metadataLoaders';
|
import { getSettings } from '../utility/metadataLoaders';
|
||||||
|
|
||||||
function themeCommand(theme: ThemeDefinition) {
|
// function themeCommand(theme: ThemeDefinition) {
|
||||||
return {
|
// return {
|
||||||
text: theme.themeName,
|
// text: theme.themeName,
|
||||||
onClick: () => currentTheme.set(theme.themeClassName),
|
// onClick: () => currentTheme.set(theme.themeClassName),
|
||||||
// onPreview: () => {
|
// // onPreview: () => {
|
||||||
// const old = get(currentTheme);
|
// // const old = get(currentTheme);
|
||||||
// currentTheme.set(css);
|
// // currentTheme.set(css);
|
||||||
// return ok => {
|
// // return ok => {
|
||||||
// if (!ok) currentTheme.set(old);
|
// // if (!ok) currentTheme.set(old);
|
||||||
|
// // };
|
||||||
|
// // },
|
||||||
// };
|
// };
|
||||||
// },
|
// }
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
registerCommand({
|
registerCommand({
|
||||||
id: 'theme.changeTheme',
|
id: 'theme.changeTheme',
|
||||||
category: 'Theme',
|
category: 'Theme',
|
||||||
name: 'Change',
|
name: 'Change',
|
||||||
toolbarName: 'Change theme',
|
toolbarName: 'Change theme',
|
||||||
getSubCommands: () => get(extensions).themes.map(themeCommand),
|
onClick: () => showModal(SettingsModal, { selectedTab: 1 }),
|
||||||
|
// getSubCommands: () => get(extensions).themes.map(themeCommand),
|
||||||
});
|
});
|
||||||
|
|
||||||
registerCommand({
|
registerCommand({
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
const electron = getElectron();
|
const electron = getElectron();
|
||||||
let restartWarning = false;
|
let restartWarning = false;
|
||||||
|
|
||||||
|
export let selectedTab = 0;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<SettingsFormProvider>
|
<SettingsFormProvider>
|
||||||
@ -25,6 +27,7 @@
|
|||||||
|
|
||||||
<FormValues let:values>
|
<FormValues let:values>
|
||||||
<TabControl
|
<TabControl
|
||||||
|
bind:value={selectedTab}
|
||||||
isInline
|
isInline
|
||||||
tabs={[
|
tabs={[
|
||||||
{ label: 'General', slot: 1 },
|
{ label: 'General', slot: 1 },
|
||||||
|
Loading…
Reference in New Issue
Block a user