feat: Move version number to sidebar next to MUH logo

- Add version number in small font next to MUH logo in sidebar
- Remove version footer from HomePage
- Add CSS styling for sidebar version display
This commit is contained in:
2026-03-17 17:46:36 +01:00
parent 3c0335ae7c
commit 571019d34b
3 changed files with 11 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
import { NavLink, Outlet, useLocation, useNavigate } from "react-router-dom"; import { NavLink, Outlet, useLocation, useNavigate } from "react-router-dom";
import { useSession } from "../lib/session"; import { useSession } from "../lib/session";
import { APP_VERSION } from "../lib/version";
const PAGE_TITLES: Record<string, string> = { const PAGE_TITLES: Record<string, string> = {
"/home": "Startseite", "/home": "Startseite",
@@ -39,7 +40,9 @@ export default function AppShell() {
<div className="app-shell"> <div className="app-shell">
<aside className="sidebar"> <aside className="sidebar">
<div className="sidebar__brand"> <div className="sidebar__brand">
<div className="sidebar__logo">MUH</div> <div className="sidebar__logo">
MUH <span className="sidebar__version">({APP_VERSION})</span>
</div>
</div> </div>
<nav className="sidebar__nav"> <nav className="sidebar__nav">

View File

@@ -1,7 +1,6 @@
import { FormEvent, useEffect, useState } from "react"; import { FormEvent, useEffect, useState } from "react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { apiGet } from "../lib/api"; import { apiGet } from "../lib/api";
import { APP_VERSION } from "../lib/version";
import type { DashboardOverview, LookupResult } from "../lib/types"; import type { DashboardOverview, LookupResult } from "../lib/types";
function formatDate(value: string) { function formatDate(value: string) {
@@ -175,11 +174,6 @@ export default function HomePage() {
<div className="empty-state">Noch keine Proben vorhanden.</div> <div className="empty-state">Noch keine Proben vorhanden.</div>
)} )}
</section> </section>
{/* Version Footer */}
<footer className="version-footer">
<span>Version {APP_VERSION}</span>
</footer>
</div> </div>
); );
} }

View File

@@ -102,6 +102,13 @@ a {
letter-spacing: 0.08em; letter-spacing: 0.08em;
} }
.sidebar__version {
font-size: 0.65em;
font-weight: 400;
opacity: 0.7;
margin-left: 6px;
}
.sidebar__nav { .sidebar__nav {
display: grid; display: grid;
gap: 10px; gap: 10px;