Merge "custom themes" and "configured/imported CSS" into one mechanism (ticket 012)
The backend already stored both under one CssEntry list (Imported/Linked, differing only by the is_theme flag), but the NavMenu Settings panel split them into two visually-duplicated sections — "Custom themes" with its own upload/link forms and list, and "Import CSS"/"Configured CSS" with a nearly identical upload form and a separate list — and useSettingsPanel exposed parallel importCssEntry/importThemeEntry and (theme-only) linkThemeEntry wrappers around the same underlying API calls. Consolidate to one "CSS" section: a single list of all CssEntries (each tagged "theme" and selectable when is_theme is set), one import form and one link form, each with a "Use as theme" checkbox instead of a duplicate theme-only form. useSettingsPanel now exposes a single importCssEntry(name, content, isTheme) and a generic linkCssEntry(url, isTheme) — the latter also fixes the prior asymmetry where linking (vs. uploading) was only available for themes, not arbitrary CSS. No backend or settings-schema changes were needed: is_theme already persists correctly, so existing custom-theme and imported-CSS configuration keeps working unmodified under the unified UI. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
ed0be9726f
commit
ffeba3c274
@@ -1,14 +0,0 @@
|
||||
# Merge "custom themes" and "configured/imported CSS" into one concept
|
||||
|
||||
Custom themes and configured/imported CSS are the same thing.
|
||||
|
||||
## Current behavior (notes)
|
||||
- Imported CSS (as pasted content or file upload) is base64-encoded and stored in the settings file.
|
||||
- The "name" field is not a file name — it's a human-readable name, labeled just "name" in the UI. It gets displayed alongside the other (built-in) themes.
|
||||
- The built-in themes are also auto-inserted into the settings JSON.
|
||||
- Imported CSS entries can be "deleted", which removes them from the settings JSON.
|
||||
|
||||
## Acceptance criteria
|
||||
- The "custom themes" and "configured/imported CSS" features are consolidated into a single mechanism.
|
||||
- Duplicate UI, settings, and code paths for the two are removed.
|
||||
- Existing user configuration for either is migrated or aliased so it keeps working under the unified mechanism.
|
||||
Reference in New Issue
Block a user