From 35df8dbd012db1d28ee1d8138ed0727d1e3dd67a Mon Sep 17 00:00:00 2001 From: rope Date: Mon, 5 Oct 2026 20:07:28 +0100 Subject: [PATCH] Fix checklist ticks: body data-season hijacked every click Co-Authored-By: Claude Opus 5.5 --- package.nix | 2 +- static/app.js | 8 ++++---- static/index.html | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.nix b/package.nix index f244664..45110f3 100644 --- a/package.nix +++ b/package.nix @@ -2,7 +2,7 @@ stdenvNoCC.mkDerivation { pname = "stardew-tracker"; - version = "1.3.0"; + version = "1.3.1"; src = ./.; nativeBuildInputs = [ makeWrapper ]; diff --git a/static/app.js b/static/app.js index 1e437e1..33eedad 100644 --- a/static/app.js +++ b/static/app.js @@ -339,13 +339,13 @@ } document.addEventListener("click", event => { - const yearButton = event.target.closest("[data-year]"); + const yearButton = event.target.closest("button[data-year]"); if (yearButton) setDate({ year: Number(yearButton.dataset.year) }); - const seasonButton = event.target.closest("[data-season]"); + const seasonButton = event.target.closest("button[data-season]"); if (seasonButton) setDate({ season: seasonButton.dataset.season }); - const dayButton = event.target.closest("[data-day]"); + const dayButton = event.target.closest("button[data-day]"); if (dayButton) setDate({ day: Number(dayButton.dataset.day) }); - const filterButton = event.target.closest("[data-filter]"); + const filterButton = event.target.closest("button[data-filter]"); if (filterButton) { state.filter = filterButton.dataset.filter; $$("[data-filter]").forEach(button => button.setAttribute("aria-pressed", String(button.dataset.filter === state.filter))); diff --git a/static/index.html b/static/index.html index 604f1b6..0f1788a 100644 --- a/static/index.html +++ b/static/index.html @@ -6,7 +6,7 @@ - + Valley Yearbook @@ -115,10 +115,10 @@ - - - - - + + + + +