1.3 KiB
1.3 KiB
010 — CSS import/management
Summary
Let users import custom CSS (stored alongside settings/profiles, deletable) or link to an external CSS path/URL (not deletable, just referenced).
Scope
POST /api/settings/css(import): accept raw CSS content, store it in the same directory as settings/profiles (008), return an id/handle.DELETE /api/settings/css/:id: remove an imported CSS file; reject deletion for linked (non-imported) entries.POST /api/settings/css/link: register a path/URL reference without copying content; these are never deletable via the delete endpoint (only "unlink"-able, if that distinction matters — clarify in implementation).- Settings model tracks the list of CSS entries (imported + linked) with enough metadata to distinguish the two kinds.
- Serve imported CSS content back so the frontend can
<link>/inline it.
Acceptance criteria
- Importing CSS persists content under the settings directory and survives restart.
- Deleting an imported CSS entry removes the file and the settings reference.
- Attempting to delete a linked (non-imported) entry is rejected.
- Linked entries resolve to their original path/URL, not a copy.