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,24 @@
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import App from './App';
|
||||
import ProofingGallery from './components/ProofingGallery';
|
||||
import JoinPage from './components/JoinPage';
|
||||
import './styles.css';
|
||||
|
||||
const root = document.getElementById('root');
|
||||
if (!root) throw new Error('root element missing');
|
||||
|
||||
// Proofing links are public: /g/<token> renders the gallery straight away and
|
||||
// never mounts the editor or asks for a session.
|
||||
const galleryMatch = /^\/g\/([A-Za-z0-9_-]+)\/?$/.exec(window.location.pathname);
|
||||
// Invite links are public too: the token decides whether signup is allowed.
|
||||
const joinMatch = /^\/join\/([A-Za-z0-9_-]+)\/?$/.exec(window.location.pathname);
|
||||
|
||||
createRoot(root).render(
|
||||
galleryMatch ? (
|
||||
<ProofingGallery token={galleryMatch[1]} />
|
||||
) : joinMatch ? (
|
||||
<JoinPage token={joinMatch[1]} />
|
||||
) : (
|
||||
<App />
|
||||
),
|
||||
);
|
||||
Reference in New Issue
Block a user