Footer: show the Dorfteich version next to the connection status

The Dockerfile has passed the release tag into the web build as
VITE_APP_VERSION since the beginning, but nothing consumed it — the
footer now renders it right of the live/offline icon; dev builds show
the 0.0.0-dev placeholder.

Fixes #126

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fb2VzvcoBPHkjh8bZ6PzQn
This commit is contained in:
Claude Fable 5 2026-07-15 13:18:36 +02:00
parent 0428892ef2
commit 32d4cd0e4b
2 changed files with 13 additions and 2 deletions

View File

@ -3,11 +3,16 @@ import { Link } from 'react-router-dom';
import { usePageActionsSlot } from './page-actions';
/** The running Dorfteich version injected at build time (the Dockerfile
* passes the release tag as VITE_APP_VERSION); dev builds show the dev tag. */
const APP_VERSION: string = (import.meta.env.VITE_APP_VERSION as string) || '0.0.0-dev';
/**
* The app-wide footer (issue #82): legal links on every view editor,
* public pages, and auth screens all render inside AppLayout, so this one
* spot covers them all. Since the M10 follow-ups the active page portals
* its connection-status icon into the left half; the legal links sit right.
* its connection-status icon into the left half (with the instance version
* next to it, #126); the legal links sit right.
*/
export function Footer(): React.JSX.Element {
const { t } = useTranslation('legal');
@ -15,6 +20,7 @@ export function Footer(): React.JSX.Element {
return (
<footer className="app-footer">
<div className="app-footer__status" ref={setStatusElement} />
<span className="app-footer__version">{APP_VERSION}</span>
<span className="app-footer__spacer" />
<Link to="/legal/imprint">{t('links.imprint')}</Link>
<span aria-hidden>·</span>

View File

@ -148,7 +148,6 @@ button {
padding: var(--space-1) var(--space-2);
}
.sidebar__pages {
list-style: none;
margin: 0 0 var(--space-3);
@ -711,6 +710,12 @@ button {
align-items: center;
}
/* Instance version next to the connection status (#126). */
.app-footer__version {
font-size: 0.8rem;
white-space: nowrap;
}
.legal-page {
max-width: 44rem;
}