fix: show all built-in themes in admin theme controls #496

This commit is contained in:
Linus Rath
2026-06-28 20:31:00 +02:00
parent e0747c12ee
commit 1f4afe082b
+4 -5
View File
@@ -5,12 +5,11 @@ import { Upload, Trash2, Power, PowerOff, Loader2, Palette, Save, Shield, Lock,
import type { SettingsPolicy } from '@/lib/admin/types'; import type { SettingsPolicy } from '@/lib/admin/types';
import { DEFAULT_POLICY, DEFAULT_THEME_POLICY } from '@/lib/admin/types'; import { DEFAULT_POLICY, DEFAULT_THEME_POLICY } from '@/lib/admin/types';
import { apiFetch } from '@/lib/browser-navigation'; import { apiFetch } from '@/lib/browser-navigation';
import { BUILTIN_THEMES } from '@/lib/builtin-themes';
const BUILTIN_THEME_OPTIONS = [ // Derive from the single source of truth so newly added built-in themes show
{ id: 'builtin-nord', name: 'Nord' }, // up here automatically (was previously a hardcoded subset — see #496).
{ id: 'builtin-catppuccin', name: 'Catppuccin' }, const BUILTIN_THEME_OPTIONS = BUILTIN_THEMES.map(t => ({ id: t.id, name: t.name }));
{ id: 'builtin-solarized', name: 'Solarized' },
];
interface ThemeEntry { interface ThemeEntry {
id: string; id: string;