Offer 38 highlight colors and keep a retired color's saved choice

AI Assisted
This commit is contained in:
jparkerweb committed 2026-10-26 06:36:45 -07:00
1 parent c602dfed57
commit e67aaabdce
5 files changed
+126 -70

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@
// `looks` is a live binding: every file reads the current object, and only
// this file replaces it.
import { DEFAULT_ACCENT, soundPrefs, DEFAULT_CARD_WIDTH, ACCENTS, cardWidth, soundKey } from "./palette.js";
import { DEFAULT_ACCENT, soundPrefs, DEFAULT_CARD_WIDTH, ACCENTS, accentId, cardWidth, soundKey } from "./palette.js";
import { normalizeRole, ROLE_NOT_SET } from "./starters.js";
import { bootData, hooks } from "./state.js";
import { el } from "./render.js";
@@ -40,7 +40,7 @@ export let looksReady = false;
export function adoptLooks(saved) {
looks = { ...DEFAULT_LOOKS, ...saved };
if (!ACCENTS[looks.accent]) looks.accent = DEFAULT_LOOKS.accent;
looks.accent = accentId(looks.accent);
if (!["system", "light", "dark"].includes(looks.theme)) looks.theme = DEFAULT_LOOKS.theme;
if (typeof looks.sound !== "boolean") looks.sound = DEFAULT_LOOKS.sound;
Object.assign(looks, soundPrefs(looks));