Save imported palettes per user and assign single palette colors

- imported coolors.co palettes are stored per user (new palettes
  table, GET/POST/DELETE /palettes, duplicates ignored, max 50) and
  listed under "Your palettes" with a remove button
- clicking a single color of any palette opens a menu to use it as
  background, text, buttons or button text; the name row still
  applies the whole palette
- theme picker moved into its own component

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 16:46:36 +02:00
co-authored by Claude Opus 5.5
parent c3640c8966
commit e44e56fd2d
12 changed files with 1212 additions and 208 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ curl -X POST https://short.example.com/~/api/pages \
-d '{"kind":"redirect","dest":"https://example.com","code":"optional"}'
```
Main endpoints: `GET/POST /pages`, `GET/PATCH/DELETE /pages/:id`, `GET/DELETE /pages/:id/stats?days=7|30|90`, `POST /pages/:id/blocks`, `PUT /pages/:id/blocks/order`, `PATCH/DELETE /blocks/:id`, `PUT /pages/:id/avatar`, `GET/POST/DELETE /tokens`.
Main endpoints: `GET/POST /pages`, `GET/PATCH/DELETE /pages/:id`, `GET/DELETE /pages/:id/stats?days=7|30|90`, `POST /pages/:id/blocks`, `PUT /pages/:id/blocks/order`, `PATCH/DELETE /blocks/:id`, `PUT /pages/:id/avatar`, `GET/POST/DELETE /palettes`, `GET/POST/DELETE /tokens`.
Admin only: `PUT/DELETE /pin`, `GET /users`, `GET /conflicts`.
Link buttons can reference an existing short link (`{"kind":"link","label":"…","targetId":12}`) or create one in the page's namespace in the same request (`{"kind":"link","label":"…","newLink":{"dest":"https://…","code":"optional"}}`).