import { useChannels } from '@/store/channels';
import { useAccount } from '@/store/account';
import { useWorkspace } from '@/store/workspace';
import { channelPath, navigate } from '@/app/navigation';
import { Icon } from '@/ui/Icon';
import styles from './SpaceRail.module.css';
interface RailProps { id?: string; onCreate: () => void; onJoin: () => void }
/** 空间切换:桌面是最左一列窄栏,手机是横向一排方块 */
export function SpaceRail({ id, onCreate, onJoin }: RailProps) {
const channels = useChannels((s) => s.list);
const username = useAccount((s) => s.username);
return ;
}
/** 频道列表顶部:空间名与加密状态,点击打开空间设置 */
export function SpaceHeader({ onSettings }: { onSettings: () => void }) {
const channel = useWorkspace((s) => s.channel);
const name = channel?.name || `${channel?.id.slice(0, 8) ?? ''}…`;
return ;
}