diff --git a/widgets/streamer-only/scripts/tasklist-view.js b/widgets/streamer-only/scripts/tasklist-view.js
index de97448..7d4993c 100644
--- a/widgets/streamer-only/scripts/tasklist-view.js
+++ b/widgets/streamer-only/scripts/tasklist-view.js
@@ -31,6 +31,7 @@ class TaskList {
track: el.querySelector(".scroll-track"),
content: el.querySelector(".scroll-content"),
viewport: el.querySelector(".scroll-viewport"),
+ count: el.querySelector("#task-count"),
};
}
@@ -77,15 +78,13 @@ class TaskList {
if (!section) return this;
section.color = color;
- document
- .querySelectorAll(".section")
- .forEach((el) => {
- if (el.dataset.key !== sectionId) return;
- const title = el.querySelector(":scope > .section-title");
- if (!title) return;
- title.style.setProperty("--user-color", color);
- title.classList.add("has-user-color");
- });
+ document.querySelectorAll(".section").forEach((el) => {
+ if (el.dataset.key !== sectionId) return;
+ const title = el.querySelector(":scope > .section-title");
+ if (!title) return;
+ title.style.setProperty("--user-color", color);
+ title.classList.add("has-user-color");
+ });
return this;
}
@@ -198,6 +197,7 @@ class TaskList {
this.#els.content.innerHTML = "";
this.#data = [];
this.#firstRender = true;
+ this.#updateTaskCount();
}
// ── render ─────────────────────────────────────────
@@ -212,11 +212,18 @@ class TaskList {
this.#patchContainer(this.#els.content, this.#data, true);
}
+ this.#updateTaskCount();
+
if (this.#pendingRemovals === 0) {
this.#syncScroll();
}
}
+ #updateTaskCount() {
+ if (!this.#els.count) return;
+ this.#els.count.textContent = `${this.doneCount}/${this.taskCount}`;
+ }
+
// ── animations ─────────────────────────────────────
#animateIn(el) {
diff --git a/widgets/streamer-only/styles/style.css b/widgets/streamer-only/styles/style.css
index 35971be..1610b3c 100644
--- a/widgets/streamer-only/styles/style.css
+++ b/widgets/streamer-only/styles/style.css
@@ -126,6 +126,12 @@ body {
font-size: var(--title-font-size);
}
+#task-count {
+ flex-shrink: 0;
+ white-space: nowrap;
+ font-size: var(--title-font-size);
+}
+
.task-number {
flex-shrink: 0;
min-width: 16px;
diff --git a/widgets/vertical/index.html b/widgets/vertical/index.html
index c0416ef..e618c17 100644
--- a/widgets/vertical/index.html
+++ b/widgets/vertical/index.html
@@ -17,6 +17,7 @@