diff --git a/src/App.tsx b/src/App.tsx index efcdb53..5d8bbda 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,5 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import AboutModal from './components/AboutModal'; import AdminPanel from './components/AdminPanel'; import CloudPanel from './components/CloudPanel'; import CommandPalette from './components/CommandPalette'; @@ -138,6 +139,7 @@ export default function App() { const [undoAction, setUndoAction] = useState<{ message: string; run: () => void } | null>(null); const [menu, setMenu] = useState<{ x: number; y: number; ids: string[] } | null>(null); const [helpOpen, setHelpOpen] = useState(false); + const [aboutOpen, setAboutOpen] = useState(false); const [searchOpen, setSearchOpen] = useState(false); const [shareEventId, setShareEventId] = useState(null); /** Client proofing picks, keyed to the photos they chose. */ @@ -1898,6 +1900,7 @@ export default function App() { mod && k === 'k' && !helpOpen && + !aboutOpen && !importOpen && !exportOpen && !cloudOpen && @@ -1916,7 +1919,7 @@ export default function App() { setHelpOpen((v) => !v); return; } - if (helpOpen || importOpen || exportOpen || cloudOpen || adminOpen || compareOpen) return; + if (helpOpen || aboutOpen || importOpen || exportOpen || cloudOpen || adminOpen || compareOpen) return; if (mod && k === 'i') { e.preventDefault(); @@ -2254,6 +2257,7 @@ export default function App() { setCloudOpen(true); }} onHelp={() => setHelpOpen(true)} + onAbout={() => setAboutOpen(true)} onSearch={() => setSearchOpen(true)} onCatalog={() => { setView('grid'); @@ -2611,6 +2615,7 @@ export default function App() { )} {helpOpen && setHelpOpen(false)} />} + {aboutOpen && setAboutOpen(false)} />} {searchOpen && ( 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 ( +
e.target === e.currentTarget && onClose()} + > +
+
+

About Luminary

+ +
+
+
+ +
+ Luminary +
Version {APP_VERSION}
+
+
+
+
+
User guide
+
Version {GUIDE_VERSION}
+
+
+
Guide updated
+
{GUIDE_UPDATED}
+
+
+

+ The guide covers every screen, panel and setting, with server, Docker and + Windows install instructions. Its screenshots are taken from a live catalog. +

+ +
+
+
+ ); +} diff --git a/src/components/TopBar.tsx b/src/components/TopBar.tsx index 6d0c634..812e12a 100644 --- a/src/components/TopBar.tsx +++ b/src/components/TopBar.tsx @@ -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 (
-
+
+