From e53b00867972f190775fc55b6907193b659b9963 Mon Sep 17 00:00:00 2001 From: Marcus Kida Date: Thu, 19 Feb 2026 17:28:17 +0100 Subject: [PATCH] Add link to commit hash --- frontend/src/main.ts | 6 +++++- frontend/static/index.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/main.ts b/frontend/src/main.ts index a8109fb..e073be2 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -1248,9 +1248,13 @@ import { buildPopup as _buildPopup } from "./popup"; .then(function (data) { if (data.version && data.version !== "dev" && data.version !== "unknown") { var el = document.getElementById("app-version"); + var link = document.getElementById("app-version-link") as HTMLAnchorElement; if (el) { el.textContent = data.version; - el.parentElement.style.display = ""; + if (link && /^[0-9a-f]{7,40}$/.test(data.version)) { + link.href = "https://git.kida.io/marcus/DMRmap/commit/" + data.version; + } + (el.closest(".app-version") as HTMLElement).style.display = ""; } } }) diff --git a/frontend/static/index.html b/frontend/static/index.html index 9da7655..ddbd785 100644 --- a/frontend/static/index.html +++ b/frontend/static/index.html @@ -73,7 +73,7 @@ Routing by OSRM. Map by OpenStreetMap. Built by DA6KM.
- Impressum · Datenschutz · Source
+ Impressum · Datenschutz · Source