diff --git a/frontend/feat/feature-flags.json b/frontend/feat/feature-flags.json index 5d8c5fe4b48..74c70dd3e75 100644 --- a/frontend/feat/feature-flags.json +++ b/frontend/feat/feature-flags.json @@ -31,15 +31,6 @@ "supportsQuery": false, "storage": "session" }, - "force_dark_mode": { - "status": { - "staging": "switchable", - "production": "disabled" - }, - "defaultState": "off", - "description": "Force the site to render in dark mode.", - "storage": "session" - }, "dark_mode_ui_toggle": { "status": { "staging": "switchable", diff --git a/frontend/src/assets/svg/raw/moon.svg b/frontend/src/assets/svg/raw/moon.svg new file mode 100644 index 00000000000..0d13e051cac --- /dev/null +++ b/frontend/src/assets/svg/raw/moon.svg @@ -0,0 +1,8 @@ + + + + + diff --git a/frontend/src/assets/svg/raw/sun.svg b/frontend/src/assets/svg/raw/sun.svg new file mode 100644 index 00000000000..00f4ae1d09d --- /dev/null +++ b/frontend/src/assets/svg/raw/sun.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/frontend/src/assets/svg/sprite/icons.svg b/frontend/src/assets/svg/sprite/icons.svg index 54d9127acc8..615db5de8ae 100644 --- a/frontend/src/assets/svg/sprite/icons.svg +++ b/frontend/src/assets/svg/sprite/icons.svg @@ -35,4 +35,6 @@ + + diff --git a/frontend/src/components/VFooter/VFooter.vue b/frontend/src/components/VFooter/VFooter.vue index 87880908dcb..330422e22fe 100644 --- a/frontend/src/components/VFooter/VFooter.vue +++ b/frontend/src/components/VFooter/VFooter.vue @@ -11,11 +11,13 @@ import useResizeObserver from "~/composables/use-resize-observer" import { SCREEN_SIZES } from "~/constants/screens" import { useUiStore } from "~/stores/ui" +import { useFeatureFlagStore } from "~/stores/feature-flag" import type { SelectFieldProps } from "~/components/VSelectField/VSelectField.vue" import VLink from "~/components/VLink.vue" import VBrand from "~/components/VBrand/VBrand.vue" import VLanguageSelect from "~/components/VLanguageSelect/VLanguageSelect.vue" +import VThemeSelect from "~/components/VThemeSelect/VThemeSelect.vue" import VPageLinks from "~/components/VHeader/VPageLinks.vue" import VWordPressLink from "~/components/VHeader/VWordPressLink.vue" @@ -42,6 +44,11 @@ const { all: allPages } = usePages() const isContentMode = computed(() => props.mode === "content") +const featureFlagStore = useFeatureFlagStore() +const showThemeSwitcher = computed(() => + featureFlagStore.isOn("dark_mode_ui_toggle") +) + /** JS-based responsiveness */ const footerEl = ref(null) const initialWidth = SCREEN_SIZES[uiStore.breakpoint] @@ -90,11 +97,25 @@ const linkColumnHeight = computed(() => ({
- - + +
diff --git a/frontend/src/components/VSelectField/VSelectField.vue b/frontend/src/components/VSelectField/VSelectField.vue index dd89bcb7ec5..390895c72ab 100644 --- a/frontend/src/components/VSelectField/VSelectField.vue +++ b/frontend/src/components/VSelectField/VSelectField.vue @@ -33,10 +33,12 @@ const props = withDefaults( fieldId: string labelText: string choices: Choice[] + showSelected?: boolean }>(), { modelValue: "", blankText: "", + showSelected: true, } ) @@ -70,7 +72,7 @@ const splitAttrs = computed(() => {