feat: faster, correct preset editor; default presets use their own pattern

- Editing a preset can change its pattern (the dropdown was disabled).
- on, off and rainbow are built-in patterns and are always listed, so the
  editor no longer falls back to the first pattern (aurora) for them.
- The editor loads the pattern names once and only the selected pattern's
  definition (new GET /patterns/names and GET /patterns/<name>).
- A shared GET cache (fetch_cache.js) reuses profile, palette, zone, preset,
  group and pattern lookups; any write clears it and entries expire at 30 s.
- The seeded rainbow preset uses the rainbow pattern.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Sonnet 5.5 committed 2026-11-10 01:46:11 +13:00
1 parent d4118072f6
commit 38162d4b89
9 files changed
+189 -81

No files matched your search

+1 -1
View File
@@ -164,7 +164,7 @@ typedef struct {
static const seed_t SEED[] = {
{ "on", "on", "[\"#FFFFFF\"]", 255, 100, { 0 } },
{ "off", "off", "[]", 0, 100, { 0 } },
{ "rainbow", "colour_cycle", "[]", 255, 100, { 2 } },
{ "rainbow", "rainbow", "[]", 255, 100, { 2 } },
{ "Colour Cycle", "colour_cycle", "[\"#FF0000\",\"#00FF00\",\"#0000FF\"]", 255, 100, { 1 } },
{ "transition", "transition", "[\"#FF0000\",\"#00FF00\",\"#0000FF\"]", 255, 500, { 0 } },
{ "flicker", "flicker", "[\"#FFB84D\"]", 255, 80, { 30 } },