summaryrefslogtreecommitdiff
path: root/static/app.js
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-05-09 01:14:57 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-05-09 01:14:57 -0700
commit65466fd5c645e546707ce699b4ea289f894fea20 (patch)
treedebb3768e8d84000a8c32d2df8361bb42a457523 /static/app.js
parent9f82415366e6220651351007c2dc0ef21df7ff85 (diff)
Auto-select today's date on add form; clean up rewatch history panel
- Default date_watched to today when adding a new film (JS, en-CA locale) - Match rewatch history by tmdb_id when available, fall back to title - Replace inline styles in rewatch section with CSS classes - Simplify redundant Jinja conditions (rewatch_history and, loop.length > 1) - Move review-panel margin-top hack to .review-panel-spaced class Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'static/app.js')
-rw-r--r--static/app.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/static/app.js b/static/app.js
index fae2dbd..db3e694 100644
--- a/static/app.js
+++ b/static/app.js
@@ -1,3 +1,8 @@
+const dateDefault = document.querySelector("[data-default-today]");
+if (dateDefault) {
+ dateDefault.value = new Date().toLocaleDateString("en-CA");
+}
+
// Hamburger menu toggle
const menuToggle = document.querySelector("#menu-toggle");
const navActions = document.querySelector("#nav-actions");