mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-17 05:57:21 -05:00
Port BR-95 desktop to Next.js components
This commit is contained in:
42
br95/components/shared/RoadMenu.tsx
Normal file
42
br95/components/shared/RoadMenu.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
import React from 'react';
|
||||
import { WindowId } from '../../hooks/useWindowManager';
|
||||
|
||||
type Props = {
|
||||
isOpen: boolean;
|
||||
onOpenWindow: (id: WindowId) => void;
|
||||
menuRef: React.RefObject<HTMLDivElement>;
|
||||
};
|
||||
|
||||
const items: { id: WindowId; icon: string; label: string }[] = [
|
||||
{ id: 'lucidia', icon: '🧠', label: 'Lucidia Core' },
|
||||
{ id: 'agents', icon: '🤖', label: 'AI Agents' },
|
||||
{ id: 'roadchain', icon: '⛓️', label: 'RoadChain Explorer' },
|
||||
{ id: 'wallet', icon: '💰', label: 'RoadCoin Wallet' },
|
||||
{ id: 'roadmail', icon: '📧', label: 'RoadMail' },
|
||||
{ id: 'terminal', icon: '💻', label: 'Terminal' },
|
||||
{ id: 'pi', icon: '🥧', label: 'Pi Network' },
|
||||
{ id: 'miner', icon: '⛏️', label: 'RoadCoin Miner' },
|
||||
{ id: 'roadcraft', icon: '⛏️', label: 'RoadCraft' },
|
||||
];
|
||||
|
||||
export default function RoadMenu({ isOpen, onOpenWindow, menuRef }: Props) {
|
||||
return (
|
||||
<div className={`road-menu ${isOpen ? 'active' : ''}`} id="road-menu" ref={menuRef}>
|
||||
<div className="road-menu-header">
|
||||
<h3>BlackRoad OS</h3>
|
||||
<p>BR‑95 Desktop · Agent Orchestration</p>
|
||||
</div>
|
||||
<div className="road-menu-content">
|
||||
{items.map((item, index) => (
|
||||
<React.Fragment key={item.id}>
|
||||
<div className="road-menu-item" onClick={() => onOpenWindow(item.id)}>
|
||||
<span className="emoji">{item.icon}</span>
|
||||
<span>{item.label}</span>
|
||||
</div>
|
||||
{index === 2 || index === 5 ? <div className="road-menu-separator"></div> : null}
|
||||
</React.Fragment>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user