feat(phase3): forum channels + tags + card UI

This commit is contained in:
2026-06-30 10:44:52 -04:00
parent f3f03df710
commit 368172e3d6
12 changed files with 407 additions and 87 deletions
+6 -3
View File
@@ -11,9 +11,10 @@ interface ChannelApiResponse {
id: string;
server_id: string;
name: string;
type: 'text' | 'voice';
type: 'text' | 'voice' | 'forum';
category: string;
position: number;
slowmode_seconds: number;
}
const SLOWMODE_OPTIONS = [
@@ -28,7 +29,7 @@ const SLOWMODE_OPTIONS = [
export function CreateChannelModal({ serverId, onClose }: CreateChannelModalProps) {
const [name, setName] = useState('');
const [type, setType] = useState<'text' | 'voice'>('text');
const [type, setType] = useState<'text' | 'voice' | 'forum'>('text');
const [category, setCategory] = useState('general');
const [slowmodeSeconds, setSlowmodeSeconds] = useState(0);
const [loading, setLoading] = useState(false);
@@ -65,6 +66,7 @@ export function CreateChannelModal({ serverId, onClose }: CreateChannelModalProp
type: result.type,
category: result.category || null,
position: result.position,
slowmode_seconds: result.slowmode_seconds,
};
useChannelStore.getState().addChannel(newChannel);
onClose();
@@ -105,11 +107,12 @@ export function CreateChannelModal({ serverId, onClose }: CreateChannelModalProp
<label className="text-xs text-gb-fg-f block mb-1">TYPE:</label>
<select
value={type}
onChange={(e) => setType(e.target.value as 'text' | 'voice')}
onChange={(e) => setType(e.target.value as 'text' | 'voice' | 'forum')}
className="terminal-input w-full"
>
<option value="text">text</option>
<option value="voice">voice</option>
<option value="forum">forum</option>
</select>
</div>
<div>