From b6a4bd021071ee5f6e3cc589b54abfd9af5d7e65 Mon Sep 17 00:00:00 2001 From: zhenyi <434836402@qq.com> Date: Sat, 30 May 2026 15:08:01 +0800 Subject: [PATCH] feat: update workspace channel components (header, sidebar, thread-panel, composer, etc) --- src/page/workspace/channel/channel-header.tsx | 53 ++------- .../workspace/channel/channel-sidebar.tsx | 8 +- .../channel/channel-thread-panel.tsx | 66 +++++++---- src/page/workspace/channel/composer.tsx | 12 +- src/page/workspace/channel/index.tsx | 58 ++++++++-- src/page/workspace/channel/message-item.tsx | 106 +++++++++++------- .../workspace/channel/use-channel-state.ts | 78 ++++++++++--- 7 files changed, 240 insertions(+), 141 deletions(-) diff --git a/src/page/workspace/channel/channel-header.tsx b/src/page/workspace/channel/channel-header.tsx index 727c488..ff3053e 100644 --- a/src/page/workspace/channel/channel-header.tsx +++ b/src/page/workspace/channel/channel-header.tsx @@ -1,45 +1,37 @@ -import { Hash, MessageSquare, Settings, Users } from "lucide-react"; +import { Hash, Settings, Users } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; -import { cn } from "@/lib/utils"; import type { Room } from "./channel-sidebar"; -import type { Thread } from "./thread-sidebar"; type Props = { room: Room; - threads: Thread[]; - onToggleThreads: () => void; onToggleSettings: () => void; memberCount?: number; }; export function ChannelHeader({ room, - threads, - onToggleThreads, onToggleSettings, memberCount, }: Props) { - const activeThreads = threads.filter((t) => !t.archived && !t.locked).length; - return ( -
+
- - + +
-

+

{room.name}

{room.topic && ( - + {room.topic} @@ -56,44 +48,17 @@ export function ChannelHeader({
{typeof memberCount === "number" && memberCount > 0 && ( - + - {memberCount} + {memberCount} )} - - - - - - Threads{activeThreads > 0 ? ` (${activeThreads} active)` : ""} - - -