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
+9
View File
@@ -0,0 +1,9 @@
CREATE TABLE `palettes` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`user_id` integer NOT NULL,
`colors` text NOT NULL,
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE UNIQUE INDEX `palettes_user_colors` ON `palettes` (`user_id`,`colors`);