mirror of
https://github.com/unraid/api.git
synced 2026-01-01 06:01:18 -06:00
fix: dark theme as array
This commit is contained in:
@@ -72,7 +72,10 @@ export const defaultColors: Record<string, ThemeVariables> = {
|
|||||||
'--header-text-secondary': '#999999',
|
'--header-text-secondary': '#999999',
|
||||||
'--header-background-color': '#1c1b1b',
|
'--header-background-color': '#1c1b1b',
|
||||||
},
|
},
|
||||||
};
|
} as const;
|
||||||
|
|
||||||
|
export const DARK_THEMES = ['black', 'azure'] as const;
|
||||||
|
|
||||||
|
|
||||||
export const useThemeStore = defineStore('theme', () => {
|
export const useThemeStore = defineStore('theme', () => {
|
||||||
// State
|
// State
|
||||||
@@ -81,7 +84,7 @@ export const useThemeStore = defineStore('theme', () => {
|
|||||||
const activeColorVariables = ref<ThemeVariables>(defaultColors.light);
|
const activeColorVariables = ref<ThemeVariables>(defaultColors.light);
|
||||||
// Getters
|
// Getters
|
||||||
const darkMode = computed(
|
const darkMode = computed(
|
||||||
() => (theme.value?.name === 'black' || theme.value?.name === 'azure') ?? false
|
() => DARK_THEMES.includes(theme.value?.name as (typeof DARK_THEMES)[number]) ?? false
|
||||||
);
|
);
|
||||||
// used to swap the UPC text color when using the azure or gray theme
|
// used to swap the UPC text color when using the azure or gray theme
|
||||||
const bannerGradient = computed(() => {
|
const bannerGradient = computed(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user