From 9c7a1d73698a4d1196c1e5ee6933af0bb9af08bb Mon Sep 17 00:00:00 2001 From: David Souther Date: Mon, 2 Dec 2024 19:07:04 -0500 Subject: [PATCH] Show embedded version in about page. --- web/public/index.html | 1 + web/src/pages/about.tsx | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/web/public/index.html b/web/public/index.html index e706e646d..58ece293e 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -15,6 +15,7 @@ + diff --git a/web/src/pages/about.tsx b/web/src/pages/about.tsx index 82361cc5d..00206c20d 100644 --- a/web/src/pages/about.tsx +++ b/web/src/pages/about.tsx @@ -1,11 +1,23 @@ import raw from "raw.macro"; import Markdown from "../shell/markdown"; +const VERSION = + document.querySelector("meta[name=version]")?.getAttribute("content") ?? + "unknown"; + +const useVersion = () => { + return VERSION; +}; + export const About = () => { + const version = useVersion(); return (
{raw("./ABOUT.md")} +

+ Version {version} +

);