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
+6 -1
View File
@@ -1,4 +1,5 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import AboutModal from './components/AboutModal';
import AdminPanel from './components/AdminPanel'; import AdminPanel from './components/AdminPanel';
import CloudPanel from './components/CloudPanel'; import CloudPanel from './components/CloudPanel';
import CommandPalette from './components/CommandPalette'; import CommandPalette from './components/CommandPalette';
@@ -138,6 +139,7 @@ export default function App() {
const [undoAction, setUndoAction] = useState<{ message: string; run: () => void } | null>(null); const [undoAction, setUndoAction] = useState<{ message: string; run: () => void } | null>(null);
const [menu, setMenu] = useState<{ x: number; y: number; ids: string[] } | null>(null); const [menu, setMenu] = useState<{ x: number; y: number; ids: string[] } | null>(null);
const [helpOpen, setHelpOpen] = useState(false); const [helpOpen, setHelpOpen] = useState(false);
const [aboutOpen, setAboutOpen] = useState(false);
const [searchOpen, setSearchOpen] = useState(false); const [searchOpen, setSearchOpen] = useState(false);
const [shareEventId, setShareEventId] = useState<string | null>(null); const [shareEventId, setShareEventId] = useState<string | null>(null);
/** Client proofing picks, keyed to the photos they chose. */ /** Client proofing picks, keyed to the photos they chose. */
@@ -1898,6 +1900,7 @@ export default function App() {
mod && mod &&
k === 'k' && k === 'k' &&
!helpOpen && !helpOpen &&
!aboutOpen &&
!importOpen && !importOpen &&
!exportOpen && !exportOpen &&
!cloudOpen && !cloudOpen &&
@@ -1916,7 +1919,7 @@ export default function App() {
setHelpOpen((v) => !v); setHelpOpen((v) => !v);
return; return;
} }
if (helpOpen || importOpen || exportOpen || cloudOpen || adminOpen || compareOpen) return; if (helpOpen || aboutOpen || importOpen || exportOpen || cloudOpen || adminOpen || compareOpen) return;
if (mod && k === 'i') { if (mod && k === 'i') {
e.preventDefault(); e.preventDefault();
@@ -2254,6 +2257,7 @@ export default function App() {
setCloudOpen(true); setCloudOpen(true);
}} }}
onHelp={() => setHelpOpen(true)} onHelp={() => setHelpOpen(true)}
onAbout={() => setAboutOpen(true)}
onSearch={() => setSearchOpen(true)} onSearch={() => setSearchOpen(true)}
onCatalog={() => { onCatalog={() => {
setView('grid'); setView('grid');
@@ -2611,6 +2615,7 @@ export default function App() {
)} )}
{helpOpen && <Shortcuts onClose={() => setHelpOpen(false)} />} {helpOpen && <Shortcuts onClose={() => setHelpOpen(false)} />}
{aboutOpen && <AboutModal onClose={() => setAboutOpen(false)} />}
{searchOpen && ( {searchOpen && (
<CommandPalette <CommandPalette
+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; onExport: () => void;
onCloud: () => void; onCloud: () => void;
onHelp: () => void; onHelp: () => void;
onAbout: () => void;
onSearch: () => void; onSearch: () => void;
onCatalog: () => void; onCatalog: () => void;
canShare: boolean; canShare: boolean;
@@ -33,6 +34,7 @@ export default function TopBar({
onExport, onExport,
onCloud, onCloud,
onHelp, onHelp,
onAbout,
onSearch, onSearch,
onCatalog, onCatalog,
canShare, canShare,
@@ -40,10 +42,16 @@ export default function TopBar({
}: Props) { }: Props) {
return ( return (
<header className="topbar"> <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} /> <img className="brand-mark" src="/logo.png" alt="" height={20} />
Luminary Luminary
</div> </button>
<button <button
type="button" type="button"
className="icon-btn mobile-only catalog-btn" className="icon-btn mobile-only catalog-btn"
+7
View File
@@ -0,0 +1,7 @@
/**
* Versions shown in the About panel. APP_VERSION mirrors package.json; the
* guide values are bumped when docs/user-guide/guide.html is republished.
*/
export const APP_VERSION = '1.0.0';
export const GUIDE_VERSION = '1.1';
export const GUIDE_UPDATED = 'November 2026';
+18
View File
@@ -3057,6 +3057,24 @@ figcaption {
} }
/* Sits beside the ? button: opens the printable guide in a new tab. */ /* Sits beside the ? button: opens the printable guide in a new tab. */
/* The brand doubles as the About button; the reset keeps the header metrics. */
.brand-btn {
padding: 0;
border: 0;
background: none;
color: inherit;
font: inherit;
letter-spacing: inherit;
cursor: pointer;
border-radius: 6px;
}
.brand-btn:hover { color: var(--text); }
.brand-btn:focus-visible { outline: 2px solid var(--accent, #4c8dff); outline-offset: 3px; }
.about-brand { display: flex; align-items: center; gap: 12px; }
.about-brand strong { display: block; font-size: 16px; }
.about-facts { margin: 0; }
.guide-btn { .guide-btn {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;