feat: mobile-responsive layout
- Mobile (<md): single-panel view, sidebar/chat/members as overlays - Hamburger button toggles sidebar overlay (ServerBar + ChannelList) - Members button toggles MemberList overlay - ← back button in ChatArea and DMChat headers returns to sidebar - Auto-switch to chat view when channel or DM is selected - Tap empty area to dismiss overlays - Desktop layout unchanged (all panels side by side) - Status/settings buttons hidden on small screens to save space
This commit is contained in:
@@ -22,6 +22,7 @@ import { FeatureRequestsPanel } from "./FeatureRequestsPanel.tsx";
|
||||
import { ReactionBar } from "./ReactionBar.tsx";
|
||||
import { EmojiPicker } from "./EmojiPicker.tsx";
|
||||
import { ReplyBar } from "./ReplyBar.tsx";
|
||||
import { useLayoutStore } from "../stores/layout.ts";
|
||||
import { ForumView } from "./ForumView.tsx";
|
||||
import { CalendarView } from "./CalendarView.tsx";
|
||||
import { DocsView } from "./DocsView.tsx";
|
||||
@@ -629,22 +630,31 @@ export function ChatArea() {
|
||||
|
||||
return (
|
||||
<div className="flex flex-col h-full bg-gb-bg">
|
||||
<div className="terminal-border border-t-0 border-x-0 px-3 py-2 text-gb-fg-s flex items-center justify-between">
|
||||
<span>
|
||||
{activeChannel
|
||||
? activeChannel.type === 'forum'
|
||||
? `■ ${activeChannel.name}`
|
||||
: activeChannel.type === 'calendar'
|
||||
? `○ ${activeChannel.name}`
|
||||
: activeChannel.type === 'docs'
|
||||
? `☰ ${activeChannel.name}`
|
||||
: activeChannel.type === 'list'
|
||||
? `☑ ${activeChannel.name}`
|
||||
: `# ${activeChannel.name}`
|
||||
: activeChannelId
|
||||
? `#${activeChannelId}`
|
||||
: "[NO CHANNEL SELECTED]"}
|
||||
</span>
|
||||
<div className="terminal-border border-t-0 border-x-0 px-2 md:px-3 py-2 text-gb-fg-s flex items-center justify-between gap-2">
|
||||
<div className="flex items-center gap-2 min-w-0">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => useLayoutStore.getState().setMobileView('sidebar')}
|
||||
className="md:hidden terminal-button text-xs px-2 py-0.5 shrink-0"
|
||||
>
|
||||
←
|
||||
</button>
|
||||
<span className="truncate">
|
||||
{activeChannel
|
||||
? activeChannel.type === 'forum'
|
||||
? `■ ${activeChannel.name}`
|
||||
: activeChannel.type === 'calendar'
|
||||
? `○ ${activeChannel.name}`
|
||||
: activeChannel.type === 'docs'
|
||||
? `☰ ${activeChannel.name}`
|
||||
: activeChannel.type === 'list'
|
||||
? `☑ ${activeChannel.name}`
|
||||
: `# ${activeChannel.name}`
|
||||
: activeChannelId
|
||||
? `#${activeChannelId}`
|
||||
: "[NO CHANNEL SELECTED]"}
|
||||
</span>
|
||||
</div>
|
||||
{activeChannelId && activeChannel?.type === 'text' && (
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user