From 3269032525da19700b064e3ee7c76f3f665a24d4 Mon Sep 17 00:00:00 2001 From: Bonna Date: Fri, 7 Aug 2026 13:02:43 -0500 Subject: [PATCH] =?UTF-8?q?app:=20todos=20can=20be=20marked=20started=20(?= =?UTF-8?q?=E2=97=90=20in=20progress)=20without=20checking=20off=20?= =?UTF-8?q?=E2=80=94=20v0.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- app/lib/version.mjs | 2 +- app/package.json | 2 +- app/prisma/schema.prisma | 1 + app/public/app.js | 5 ++++- app/public/index.html | 4 ++++ app/server.mjs | Bin 19588 -> 19963 bytes 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/lib/version.mjs b/app/lib/version.mjs index 0ba6e37..8d2413d 100644 --- a/app/lib/version.mjs +++ b/app/lib/version.mjs @@ -1 +1 @@ -export const APP_VERSION = "0.2.0"; +export const APP_VERSION = "0.3.0"; diff --git a/app/package.json b/app/package.json index d139ec8..426e3b4 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "bms-backbone", - "version": "0.2.0", + "version": "0.3.0", "private": true, "type": "module", "scripts": { diff --git a/app/prisma/schema.prisma b/app/prisma/schema.prisma index 23dc4e8..269eca3 100644 --- a/app/prisma/schema.prisma +++ b/app/prisma/schema.prisma @@ -26,6 +26,7 @@ model Todo { id Int @id @default(autoincrement()) text String done Boolean @default(false) + started Boolean @default(false) parentId Int? created DateTime @default(now()) } diff --git a/app/public/app.js b/app/public/app.js index 00e2d2f..d68dd9a 100644 --- a/app/public/app.js +++ b/app/public/app.js @@ -67,9 +67,11 @@ document.addEventListener("keydown", (e) => { // ── Today ──────────────────────────────────────────────────────── function todoRow(t, sub) { + const going = t.started && !t.done; return `
- ${sub ? "↳ " : ""}${esc(t.text)} + ${sub ? "↳ " : ""}${esc(t.text)}${going ? ` ◐ in progress` : ""} + ${t.done ? "" : ``} ${sub ? "" : ``}
${sub ? "" : ``}`; @@ -138,6 +140,7 @@ async function today() { } })); view.querySelectorAll("[data-t]").forEach((c) => c.addEventListener("change", async () => { await api("/api/todos/toggle", { id: Number(c.dataset.t) }); today(); })); + view.querySelectorAll("[data-start]").forEach((b) => b.addEventListener("click", async () => { await api("/api/todos/start", { id: Number(b.dataset.start) }); today(); })); view.querySelectorAll("[data-s]").forEach((c) => c.addEventListener("change", async () => { await api("/api/shopping/toggle", { id: Number(c.dataset.s) }); today(); })); $("#goto-firing")?.addEventListener("click", () => $('#nav button[data-v="firings"]').click()); } diff --git a/app/public/index.html b/app/public/index.html index 75b4552..67b2991 100644 --- a/app/public/index.html +++ b/app/public/index.html @@ -51,6 +51,10 @@ .todo:last-child { border: none; } .todo input { width: 17px; height: 17px; accent-color: var(--sage); flex-shrink: 0; } .todo .done { text-decoration: line-through; color: #b1a0ae; } + .todo .started { color: var(--plum-deep); font-weight: 650; } + .startbtn { background: none; border: none; cursor: pointer; font-size: 16px; line-height: 1; color: #ddcfd9; padding: 2px 5px; flex-shrink: 0; } + .startbtn:hover { color: var(--plum); } + .startbtn.on { color: #c9a24a; } .pill { display: inline-block; font-size: 12px; font-weight: 650; padding: 3px 11px; border-radius: 999px; background: var(--blush); color: var(--plum-deep); } .pill.sage { background: var(--sage-soft); color: #5c7157; } .pill.butter { background: var(--butter); color: #8d6a52; } diff --git a/app/server.mjs b/app/server.mjs index a055cfce1810052d0e0b13a984c34776c4b4263a..b7a190e73119c879a35dddae8910578c4b95b84a 100644 GIT binary patch delta 157 zcmZpf$@qIV;|4A+q2iLnqLS1UD}@q0D0325@Z?LJ7LygZ)Hf$`9T7Ay(M!qCOI5H} zs8#?mtQ67`bBa?HY89;DA|*wosX7X9v%m@_FHkq)F3C^HFV+W3Onzu0Gr3zvX!2p{ S6k)hhMYz2n^_$aVVuDfyd^a-9{N{7l|_vb`qP=DV_T1^^5D4Z{Ec