From ec60d6bd2ad23e93e503b07b6ad7819c12287905 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Mon, 7 Jul 2025 22:37:20 -0400 Subject: [PATCH] Add version footer and disable map scroll wheel zoom MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add build-time version generation script that captures git commit info - Create /api/version endpoint to serve version data - Add version footer component showing commit SHA, date, and branch - Link version SHA to commit on git.deco.sh for easy navigation - Fix footer text duplication issue with i18n translations - Disable mouse wheel zoom on map, require +/- buttons for better UX - Update service worker cache to v4 with new version-footer.js 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- package.json | 5 +- public/admin.html | 1 + public/app-mapbox.js | 4 +- public/index.html | 5 +- public/privacy.html | 1 + public/sw.js | 3 +- public/version-footer.js | 101 ++++++++++++++++++++++++++++++++++++ scripts/generate-version.js | 72 +++++++++++++++++++++++++ src/routes/version.ts | 49 +++++++++++++++++ src/server.ts | 2 + 10 files changed, 237 insertions(+), 6 deletions(-) create mode 100644 public/version-footer.js create mode 100644 scripts/generate-version.js create mode 100644 src/routes/version.ts diff --git a/package.json b/package.json index 8e67149..dba4058 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,11 @@ "watch-css": "sass src/scss/main.scss public/style.css --watch --style=expanded --source-map", "dev-with-css": "concurrently \"npm run watch-css\" \"npm run dev\"", "dev-with-css:ts": "concurrently \"npm run watch-css\" \"npm run dev:ts\"", - "build": "npm run build:ts && npm run build-css && npm run build:frontend && npm run copy-i18n", + "build": "npm run generate-version && npm run build:ts && npm run build-css && npm run build:frontend && npm run copy-i18n", "build:ts": "tsc", "copy-i18n": "mkdir -p dist/i18n/locales && cp -r src/i18n/locales/* dist/i18n/locales/", - "test": "jest --runInBand --forceExit", + "generate-version": "node scripts/generate-version.js", + "test": "jest --runInBand --forceExit --detectOpenHandles", "test:coverage": "jest --coverage", "lint": "eslint src/ tests/", "lint:fix": "eslint src/ tests/ --fix", diff --git a/public/admin.html b/public/admin.html index 41a6400..a59398b 100644 --- a/public/admin.html +++ b/public/admin.html @@ -190,5 +190,6 @@ + diff --git a/public/app-mapbox.js b/public/app-mapbox.js index bea752e..25d50f6 100644 --- a/public/app-mapbox.js +++ b/public/app-mapbox.js @@ -1,5 +1,7 @@ document.addEventListener('DOMContentLoaded', async () => { - const map = L.map('map').setView([42.9634, -85.6681], 10); + const map = L.map('map', { + scrollWheelZoom: false + }).setView([42.9634, -85.6681], 10); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, diff --git a/public/index.html b/public/index.html index 813cc74..49986b3 100644 --- a/public/index.html +++ b/public/index.html @@ -165,9 +165,9 @@ placeholder="Enter address, intersection (e.g., Main St & Second St, City), or l
-

Safety Notice: This is a community tool for awareness. Stay safe and know your rights.

+

Safety Notice: This is a community tool for awareness. Stay safe and know your rights.

- This website is for informational purposes only. Verify information independently. Reports are automatically deleted after 48 hours. • Privacy Policy + This website is for informational purposes only. Verify information independently. Reports are automatically deleted after 48 hours.Privacy Policy
@@ -175,6 +175,7 @@ placeholder="Enter address, intersection (e.g., Main St & Second St, City), or l +