From e2d00dc3464f9663062ac759a8aad85e61804b91 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Tue, 1 Apr 2025 14:13:42 -0700 Subject: [PATCH] feat: add webgui theme switcher component (#1304) For now just used in Dev Mode to help assist in testing webgui CSS changes. - Introduced a new `UnraidThemeSwitcher` component to allow users to change themes dynamically. - Updated `nuxt.config.ts` to register the new component. - Created `ThemeSwitcher.ce.vue` with functionality to handle theme changes and update the UI accordingly. ## Summary by CodeRabbit - **New Features** - Introduced a theme switcher, allowing users to easily swap between available application themes. - Expanded the configuration to register the new theme switcher as a custom element for seamless integration. --- web/components/ThemeSwitcher.ce.vue | 96 +++++++++++++++++++++++++++++ web/nuxt.config.ts | 4 ++ 2 files changed, 100 insertions(+) create mode 100644 web/components/ThemeSwitcher.ce.vue diff --git a/web/components/ThemeSwitcher.ce.vue b/web/components/ThemeSwitcher.ce.vue new file mode 100644 index 000000000..687d2ee1d --- /dev/null +++ b/web/components/ThemeSwitcher.ce.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/web/nuxt.config.ts b/web/nuxt.config.ts index 4dd3fb5be..ac42aa249 100644 --- a/web/nuxt.config.ts +++ b/web/nuxt.config.ts @@ -138,6 +138,10 @@ export default defineNuxtConfig({ name: 'UnraidLogViewer', path: '@/components/Logs/LogViewer.ce', }, + { + name: 'UnraidThemeSwitcher', + path: '@/components/ThemeSwitcher.ce', + }, ], }, ],