diff --git a/packages/builder/src/components/commandPalette/CommandPalette.svelte b/packages/builder/src/components/commandPalette/CommandPalette.svelte index a8b4dedbdb..1e9acbb7e2 100644 --- a/packages/builder/src/components/commandPalette/CommandPalette.svelte +++ b/packages/builder/src/components/commandPalette/CommandPalette.svelte @@ -23,6 +23,7 @@ import { themeStore } from "stores/portal" import { getContext } from "svelte" import { Constants } from "@budibase/frontend-core" + import { ThemeOptions } from "@budibase/shared-core" const modalContext = getContext(Context.Modal) const commands = [ @@ -141,13 +142,13 @@ icon: "ShareAndroid", action: () => $goto(`./automation/${automation._id}`), })) ?? []), - ...Constants.ThemeOptions.map(theme => ({ + ...ThemeOptions.map(themeMeta => ({ type: "Change Builder Theme", - name: theme.name, + name: themeMeta.name, icon: "ColorPalette", action: () => themeStore.update(state => { - state.theme = theme.id + state.theme = themeMeta.id return state }), })), diff --git a/packages/builder/src/components/integration/QueryEditor.svelte b/packages/builder/src/components/integration/QueryEditor.svelte index 97998c3d22..995451b7e3 100644 --- a/packages/builder/src/components/integration/QueryEditor.svelte +++ b/packages/builder/src/components/integration/QueryEditor.svelte @@ -3,6 +3,7 @@ import { Label } from "@budibase/bbui" import { onMount, createEventDispatcher } from "svelte" import { themeStore } from "stores/portal" + import { Theme } from "@budibase/types" const dispatch = createEventDispatcher() @@ -116,7 +117,7 @@ readOnly, autoCloseBrackets: true, autoCloseTags: true, - theme: $themeStore.theme.includes("light") ? THEMES.LIGHT : THEMES.DARK, + theme: $themeStore.theme === Theme.LIGHT ? THEMES.LIGHT : THEMES.DARK, } if (!tab) diff --git a/packages/builder/src/components/settings/ThemeModal.svelte b/packages/builder/src/components/settings/ThemeModal.svelte index eb63a49b02..7bc3c1efa3 100644 --- a/packages/builder/src/components/settings/ThemeModal.svelte +++ b/packages/builder/src/components/settings/ThemeModal.svelte @@ -1,12 +1,12 @@