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 a055cfc..b7a190e 100644
Binary files a/app/server.mjs and b/app/server.mjs differ