Fix checklist ticks: body data-season hijacked every click
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
aaa3013890
commit
35df8dbd01
3 changed files with 11 additions and 11 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
pname = "stardew-tracker";
|
pname = "stardew-tracker";
|
||||||
version = "1.3.0";
|
version = "1.3.1";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
|
||||||
|
|
@ -339,13 +339,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("click", event => {
|
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) });
|
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 });
|
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) });
|
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) {
|
if (filterButton) {
|
||||||
state.filter = filterButton.dataset.filter;
|
state.filter = filterButton.dataset.filter;
|
||||||
$$("[data-filter]").forEach(button => button.setAttribute("aria-pressed", String(button.dataset.filter === state.filter)));
|
$$("[data-filter]").forEach(button => button.setAttribute("aria-pressed", String(button.dataset.filter === state.filter)));
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<meta name="theme-color" content="#132720">
|
<meta name="theme-color" content="#132720">
|
||||||
<meta name="description" content="A shared two-year Stardew Valley Community Center planner.">
|
<meta name="description" content="A shared two-year Stardew Valley Community Center planner.">
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||||
<link rel="stylesheet" href="/styles.css?v=1.3.0">
|
<link rel="stylesheet" href="/styles.css?v=1.3.1">
|
||||||
<title>Valley Yearbook</title>
|
<title>Valley Yearbook</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -115,10 +115,10 @@
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
<div id="toast" class="toast" role="alert" aria-live="assertive"></div>
|
<div id="toast" class="toast" role="alert" aria-live="assertive"></div>
|
||||||
<script src="/data.js?v=1.3.0"></script>
|
<script src="/data.js?v=1.3.1"></script>
|
||||||
<script src="/sync.js?v=1.3.0"></script>
|
<script src="/sync.js?v=1.3.1"></script>
|
||||||
<script src="/availability.js?v=1.3.0"></script>
|
<script src="/availability.js?v=1.3.1"></script>
|
||||||
<script src="/calendar.js?v=1.3.0"></script>
|
<script src="/calendar.js?v=1.3.1"></script>
|
||||||
<script src="/app.js?v=1.3.0"></script>
|
<script src="/app.js?v=1.3.1"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue