Files
Space-Game/archive/legacy-static/js/components/topbar.js
francy51 316a44661b Restructure into pnpm monorepo with game shell, docs, and SpacetimeDB backend
- Restructure flat static prototype into pnpm workspace monorepo
- apps/game: playable shell with R3F 3D scene, HUD, SpacetimeDB connection
- apps/docs: design docs and prototypes
- apps/site: landing page
- packages/ui: shared Button and Panel primitives
- services/spacetimedb: backend module (9 tables, 11 reducers)
- Archive legacy static files to archive/legacy-static/
- Game loop: connect, undock, target, approach, dock, mine, sell
- Add pnpm-workspace.yaml, tsconfig.base.json, spacetime.json
2026-05-31 17:56:56 -04:00

47 lines
1.3 KiB
JavaScript

window.GDD = window.GDD || {};
const GDD = window.GDD;
const PAGE_TITLES = {
'overview': 'Overview',
'architecture': 'Architecture',
'techstack': 'Tech Stack',
'backend': 'Backend Model',
'agents': 'Agent Lifecycle & Scheduling',
'gameplay': 'Gameplay Loop',
'roadmap': 'Roadmap',
'risks': 'Risks & Questions',
'demo-starmap': 'Star Map',
'demo-movement': 'Ship Movement',
'demo-combat': 'Combat System',
'demo-market': 'Market Interface',
};
function TopBar({ collapsed, currentPage, onToggle }) {
const isDemo = currentPage.startsWith('demo-');
const section = isDemo ? 'Demos' : 'Docs';
const title = PAGE_TITLES[currentPage] || currentPage;
return (
<div className="topbar">
<button className="topbar-toggle" onClick={onToggle}>
{collapsed ? '→' : '←'}
</button>
<div className="topbar-breadcrumb">
<span className="bc-root">GDD</span>
<span className="bc-sep">/</span>
<span>{section}</span>
<span className="bc-sep">/</span>
<span className="bc-current">{title}</span>
</div>
<div className="topbar-status">
<span><span className="status-dot online"></span> Connected</span>
<span style={{ color: 'var(--accent)' }}></span>
<span>Prototype v0.1.0</span>
</div>
</div>
);
}
GDD.TopBar = TopBar;