import { Construction } from 'lucide-react'; import { SOULSEEK_SECTIONS, useSoulseekSection, type SoulseekSectionId } from './shared'; import { SearchView } from './SearchView'; import { SoulseekTransfers } from './SoulseekTransfers'; import { SoulseekUploads } from './SoulseekUploads'; import { SoulseekRooms } from './SoulseekRooms'; import { SoulseekDashboard } from './SoulseekDashboard'; import { SoulseekChat } from './SoulseekChat'; import { SoulseekUsers } from './SoulseekUsers'; import { SoulseekSystem } from './SoulseekSystem'; import { SoulseekConnection } from './SoulseekConnection'; import { useServiceConnection } from 'officerdev'; // Right panel of the /soulseek workspace — renders the UI for the section the URL names. Content // zoom used to live here; it is now a framework-level per-panel control in PanelSlot. const Placeholder = ({ id }: { id: SoulseekSectionId }) => { const label = SOULSEEK_SECTIONS.find((s) => s.id === id)?.label ?? id; return (
{label}
Coming soon
); }; const sectionView = (section: SoulseekSectionId) => { switch (section) { case 'dashboard': return ; case 'search': return ; case 'downloads': return ; case 'uploads': return ; case 'rooms': return ; case 'chat': return ; case 'users': return ; case 'system': return ; case 'connection': return ; default: return ; } }; export const SoulseekView = () => { const section = useSoulseekSection(); const { data: connection, isLoading } = useServiceConnection('soulseek'); // Nothing connected yet: the setup form takes over every section, because none of them can do anything // without a daemon. if (!isLoading && !connection?.configured) return ; return
{sectionView(section)}
; };