From 1bc00267316bf46d909aaf31d671ac35d3340ff6 Mon Sep 17 00:00:00 2001 From: Shawn Olson Date: Mon, 14 Sep 2026 14:42:06 -0700 Subject: [PATCH] fix: sort theme list alphabetically --- src/lib/components/SettingsPanel.svelte | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/components/SettingsPanel.svelte b/src/lib/components/SettingsPanel.svelte index 0765810..1bb95d0 100644 --- a/src/lib/components/SettingsPanel.svelte +++ b/src/lib/components/SettingsPanel.svelte @@ -521,6 +521,17 @@ { id: 'one-dark', label: 'One Dark', bg: '#282c34', sidebar: '#21252b', accent: '#61afef' }, ]; + // Keep the default themes pinned at the top and sort the rest alphabetically. + const priorityThemeIds = ['system', 'light', 'dark']; + themePresets.sort((a, b) => { + const pa = priorityThemeIds.indexOf(a.id); + const pb = priorityThemeIds.indexOf(b.id); + if (pa !== -1 && pb !== -1) return pa - pb; + if (pa !== -1) return -1; + if (pb !== -1) return 1; + return a.label.localeCompare(b.label); + }); + const accentPresets = [ { name: 'Indigo', light: '#5b6abf', dark: '#7b9bd4' }, { name: 'Rose', light: '#e11d48', dark: '#d4768a' },