Add full category & metric management in Settings

- New Settings editor: rename categories (emoji/color too), rename
  metrics, change unit and type, add/remove metrics, set step + record
  tracking, archive/unarchive, and permanently delete categories.
- Settings now lists archived categories so they can be restored/deleted.
- Backend: add DELETE /api/categories/:id (cascades metrics, entries,
  entry_values, plans, goals).
- Bump StartOS package to 0.1.6:0; service worker cache to v6.
This commit is contained in:
Keysat
2026-06-04 08:43:11 -05:00
parent cf64a2dc50
commit 284c5ff079
7 changed files with 89 additions and 27 deletions
+6 -2
View File
@@ -142,9 +142,13 @@ input:focus, select:focus, textarea:focus { outline: none; border-color: var(--a
.stepper .unit { color: var(--muted); font-size: .9rem; }
.record-line { color: var(--arsenal-red); font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
/* ---------- Metric / record editor (settings) ---------- */
.metric-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
/* ---------- Category / metric editor (settings) ---------- */
.cat-edit.archived { opacity: .65; }
.cat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cat-head input[type="text"], .cat-head input:not([type]) { height: 44px; }
.metric-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.metric-edit-name { flex: 1 1 100%; font-weight: 600; }
.metric-edit input, .metric-edit select { height: 40px; }
.metric-edit .mini { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.metric-edit .mini input[type="number"] { height: 38px; }