Add an About panel with the guide version and date

Clicking the brand opens it, so the guide version and publication date
are visible in the app rather than only on the PDF cover.
This commit is contained in:
2026-11-28 20:32:37 +00:00
parent d0e0e8926c
commit 8aafdcfb16
5 changed files with 109 additions and 3 deletions
+68
View File
@@ -0,0 +1,68 @@
import { useEffect } from 'react';
import { APP_VERSION, GUIDE_UPDATED, GUIDE_VERSION } from '../lib/about';
interface Props {
onClose: () => void;
}
export default function AboutModal({ onClose }: Props) {
useEffect(() => {
const onKey = (e: KeyboardEvent) => {
if (e.key === 'Escape') onClose();
};
window.addEventListener('keydown', onKey);
return () => window.removeEventListener('keydown', onKey);
}, [onClose]);
return (
<div
className="modal-backdrop"
onPointerDown={(e) => e.target === e.currentTarget && onClose()}
>
<div className="modal about-modal" role="dialog" aria-label="About Luminary">
<header className="modal-head">
<h2>About Luminary</h2>
<button className="icon-btn" onClick={onClose} aria-label="Close">
✕
</button>
</header>
<div className="modal-body">
<div className="about-brand">
<img src="/logo.png" alt="" height={28} />
<div>
<strong>Luminary</strong>
<div className="muted small">Version {APP_VERSION}</div>
</div>
</div>
<dl className="cloud-stats about-facts">
<div>
<dt>User guide</dt>
<dd>Version {GUIDE_VERSION}</dd>
</div>
<div>
<dt>Guide updated</dt>
<dd>{GUIDE_UPDATED}</dd>
</div>
</dl>
<p className="muted small">
The guide covers every screen, panel and setting, with server, Docker and
Windows install instructions. Its screenshots are taken from a live catalog.
</p>
<div className="btn-row">
<a
className="btn primary"
href="/luminary-user-guide.pdf"
target="_blank"
rel="noreferrer"
>
Open user guide (PDF)
</a>
<button className="btn ghost" onClick={onClose}>
Close
</button>
</div>
</div>
</div>
</div>
);
}
+10 -2
View File
@@ -14,6 +14,7 @@ interface Props {
onExport: () => void;
onCloud: () => void;
onHelp: () => void;
onAbout: () => void;
onSearch: () => void;
onCatalog: () => void;
canShare: boolean;
@@ -33,6 +34,7 @@ export default function TopBar({
onExport,
onCloud,
onHelp,
onAbout,
onSearch,
onCatalog,
canShare,
@@ -40,10 +42,16 @@ export default function TopBar({
}: Props) {
return (
<header className="topbar">
<div className="brand">
<button
type="button"
className="brand brand-btn"
onClick={onAbout}
title="About Luminary"
aria-label="About Luminary"
>
<img className="brand-mark" src="/logo.png" alt="" height={20} />
Luminary
</div>
</button>
<button
type="button"
className="icon-btn mobile-only catalog-btn"