Skip to content

Commit 66b9268

Browse files
committed
fix(theme): distinguish Luna swatches and visible borders
1 parent f508b65 commit 66b9268

5 files changed

Lines changed: 13 additions & 5 deletions

File tree

‎ui/components/SideBar/profile.vue‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,10 @@ const menuShortcutButtonUi = {
219219
label: "min-w-0 flex-1 truncate text-left"
220220
};
221221
222-
const currentThemeAccent = computed(() => getThemePreset(currentThemePresetId.value)?.accent || "var(--theme-accent)");
222+
const currentThemeAccent = computed(() => {
223+
const preset = getThemePreset(currentThemePresetId.value);
224+
return preset?.baseColor || preset?.accent || "var(--theme-accent)";
225+
});
223226
const themePaletteOpen = ref(false);
224227
const previewedThemePresetId = ref<ThemePresetId | null>(null);
225228
const palettePreviewArmed = ref(false);
@@ -1132,7 +1135,7 @@ onBeforeUnmount(() => {
11321135
>
11331136
<span
11341137
class="size-2.5 shrink-0 rounded-full ring-1 ring-(--app-border)"
1135-
:style="{ backgroundColor: item.accent }"
1138+
:style="{ backgroundColor: item.baseColor || item.accent }"
11361139
/>
11371140
<span class="min-w-0 flex-1 truncate text-left text-xs">{{ themePresetLabel(item) }}</span>
11381141
<UIcon

‎ui/shared/theme/color.check.mts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,9 @@ for (const preset of [...LIGHT_THEME_PRESETS, ...DARK_THEME_PRESETS]) {
5353
assert.ok(contrastRatio(preset.accent, foreground) >= 4.5, `${preset.id} checkbox foreground has sufficient contrast`);
5454
}
5555

56+
const lunaSwatches = DARK_THEME_PRESETS.flatMap((preset) =>
57+
preset.family === "luna" ? [preset.baseColor || preset.accent] : []
58+
);
59+
assert.equal(new Set(lunaSwatches).size, lunaSwatches.length, "Luna theme swatches must be distinct");
60+
5661
console.log("color.check: ok");

‎ui/shared/theme/themes/luna-darkgray.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--theme-bg: #111113;
33
--theme-fg: #efeff0;
44
--theme-muted: #878c97;
5-
--theme-border: rgba(0, 0, 0, 0.3);
5+
--theme-border: #3a3e45;
66
--theme-accent: #1ab394;
77
--theme-folder-icon: var(--sidebar-icon-color);
88
--theme-surface: #1c1e21;

‎ui/shared/theme/themes/luna-deepblue.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--theme-bg: #020203;
33
--theme-fg: #efeff0;
44
--theme-muted: #6b82a8;
5-
--theme-border: rgba(0, 0, 0, 0.3);
5+
--theme-border: #2a3548;
66
--theme-accent: #1ab394;
77
--theme-folder-icon: var(--sidebar-icon-color);
88
--theme-surface: #0b0e13;

‎ui/shared/theme/themes/luna-default.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--theme-bg: #241e1e;
33
--theme-fg: #efeff0;
44
--theme-muted: #a69696;
5-
--theme-border: rgba(0, 0, 0, 0.3);
5+
--theme-border: #4a4040;
66
--theme-accent: #1ab394;
77
--theme-folder-icon: var(--sidebar-icon-color);
88
--theme-folder-icon-filled: 1;

0 commit comments

Comments
 (0)