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:
parent
0428892ef2
commit
32d4cd0e4b
@ -3,11 +3,16 @@ import { Link } from 'react-router-dom';
|
|||||||
|
|
||||||
import { usePageActionsSlot } from './page-actions';
|
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,
|
* The app-wide footer (issue #82): legal links on every view — editor,
|
||||||
* public pages, and auth screens all render inside AppLayout, so this one
|
* 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
|
* 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 {
|
export function Footer(): React.JSX.Element {
|
||||||
const { t } = useTranslation('legal');
|
const { t } = useTranslation('legal');
|
||||||
@ -15,6 +20,7 @@ export function Footer(): React.JSX.Element {
|
|||||||
return (
|
return (
|
||||||
<footer className="app-footer">
|
<footer className="app-footer">
|
||||||
<div className="app-footer__status" ref={setStatusElement} />
|
<div className="app-footer__status" ref={setStatusElement} />
|
||||||
|
<span className="app-footer__version">{APP_VERSION}</span>
|
||||||
<span className="app-footer__spacer" />
|
<span className="app-footer__spacer" />
|
||||||
<Link to="/legal/imprint">{t('links.imprint')}</Link>
|
<Link to="/legal/imprint">{t('links.imprint')}</Link>
|
||||||
<span aria-hidden>·</span>
|
<span aria-hidden>·</span>
|
||||||
|
|||||||
@ -148,7 +148,6 @@ button {
|
|||||||
padding: var(--space-1) var(--space-2);
|
padding: var(--space-1) var(--space-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.sidebar__pages {
|
.sidebar__pages {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0 0 var(--space-3);
|
margin: 0 0 var(--space-3);
|
||||||
@ -711,6 +710,12 @@ button {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Instance version next to the connection status (#126). */
|
||||||
|
.app-footer__version {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
.legal-page {
|
.legal-page {
|
||||||
max-width: 44rem;
|
max-width: 44rem;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user