Initial commit: Luminary photo catalog and RAW editor
Browser-based photo catalog with an optional team server (SQLite + LibRaw). Local database, uploaded photos, build output and dependencies are gitignored. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
import type { ViewMode } from '../types';
|
||||
|
||||
interface Props {
|
||||
view: ViewMode;
|
||||
eventName: string;
|
||||
photoCount: number;
|
||||
selectedCount: number;
|
||||
cloudLabel: string;
|
||||
cloudOn: boolean;
|
||||
onViewChange: (view: ViewMode) => void;
|
||||
onImport: () => void;
|
||||
onExport: () => void;
|
||||
onCloud: () => void;
|
||||
onHelp: () => void;
|
||||
onSearch: () => void;
|
||||
onCatalog: () => void;
|
||||
canShare: boolean;
|
||||
onShare: () => void;
|
||||
}
|
||||
|
||||
export default function TopBar({
|
||||
view,
|
||||
eventName,
|
||||
photoCount,
|
||||
selectedCount,
|
||||
cloudLabel,
|
||||
cloudOn,
|
||||
onViewChange,
|
||||
onImport,
|
||||
onExport,
|
||||
onCloud,
|
||||
onHelp,
|
||||
onSearch,
|
||||
onCatalog,
|
||||
canShare,
|
||||
onShare,
|
||||
}: Props) {
|
||||
return (
|
||||
<header className="topbar">
|
||||
<div className="brand">
|
||||
<span className="dot" />
|
||||
Luminary
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
className="icon-btn mobile-only catalog-btn"
|
||||
onClick={onCatalog}
|
||||
title="Open catalog"
|
||||
aria-label="Open catalog"
|
||||
>
|
||||
▤
|
||||
</button>
|
||||
|
||||
<div className="topbar-title">
|
||||
{eventName}
|
||||
<span className="muted">
|
||||
{' '}
|
||||
· {photoCount} photo{photoCount === 1 ? '' : 's'}
|
||||
{selectedCount > 1 ? ` · ${selectedCount} selected` : ''}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<nav className="module-bar">
|
||||
<button className={view === 'grid' ? 'active' : ''} onClick={() => onViewChange('grid')}>
|
||||
Library
|
||||
</button>
|
||||
<button className={view === 'develop' ? 'active' : ''} onClick={() => onViewChange('develop')}>
|
||||
Develop
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div className="topbar-actions">
|
||||
<button className={`cloud-pill ${cloudOn ? 'on' : ''}`} onClick={onCloud} title="Team server">
|
||||
<span className="cloud-dot" />
|
||||
{cloudLabel}
|
||||
</button>
|
||||
{canShare && (
|
||||
<button className="btn ghost" onClick={onShare} title="Share this event for client proofing">
|
||||
Share
|
||||
</button>
|
||||
)}
|
||||
<button className="btn ghost" onClick={onExport}>
|
||||
Export
|
||||
</button>
|
||||
<button className="icon-btn search-btn" onClick={onSearch} title="Search everything (⌘K / Ctrl+K)" aria-label="Search everything">
|
||||
⌕
|
||||
</button>
|
||||
<button className="icon-btn help-btn" onClick={onHelp} title="Keyboard shortcuts (?)">
|
||||
?
|
||||
</button>
|
||||
<a
|
||||
className="guide-btn"
|
||||
href="/luminary-user-guide.pdf"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
title="User guide (PDF)"
|
||||
>
|
||||
Guide
|
||||
</a>
|
||||
<button className="btn primary" onClick={onImport}>
|
||||
Import photos
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user