From 29e6f6214df21d881fac80f68490f64431c809f7 Mon Sep 17 00:00:00 2001 From: zhenyi <434836402@qq.com> Date: Sun, 31 May 2026 13:11:44 +0800 Subject: [PATCH] fix(channel): update channel components and article draft --- src/page/workspace/channel/article-card.tsx | 4 +- .../workspace/channel/article-composer.tsx | 2 +- src/page/workspace/channel/article-detail.tsx | 6 +- src/page/workspace/channel/article-feed.tsx | 2 +- src/page/workspace/channel/channel-header.tsx | 2 +- .../workspace/channel/channel-sidebar.tsx | 8 +- src/page/workspace/channel/composer.tsx | 8 +- src/page/workspace/channel/file-upload.tsx | 3 +- .../workspace/channel/message-content.tsx | 118 +++++++++++------- src/page/workspace/channel/message-item.tsx | 40 +++--- src/page/workspace/channel/message-view.tsx | 36 ++++-- src/page/workspace/channel/repo-drawer.tsx | 8 +- .../workspace/channel/repo-embed-card.tsx | 2 +- .../workspace/channel/room-create-dialog.tsx | 4 +- .../workspace/channel/room-dnd-toggle.tsx | 4 +- src/page/workspace/channel/thread-pane.tsx | 4 +- src/page/workspace/channel/thread-sidebar.tsx | 6 +- .../workspace/channel/use-article-draft.ts | 4 +- 18 files changed, 158 insertions(+), 103 deletions(-) diff --git a/src/page/workspace/channel/article-card.tsx b/src/page/workspace/channel/article-card.tsx index 5da4cea..45de6e5 100644 --- a/src/page/workspace/channel/article-card.tsx +++ b/src/page/workspace/channel/article-card.tsx @@ -23,7 +23,7 @@ export default function ArticleCard({ article, onClick, className }: Props) { return (
+ Pinned diff --git a/src/page/workspace/channel/article-composer.tsx b/src/page/workspace/channel/article-composer.tsx index 4c224f5..bb7ccad 100644 --- a/src/page/workspace/channel/article-composer.tsx +++ b/src/page/workspace/channel/article-composer.tsx @@ -43,7 +43,7 @@ export default function ArticleComposer({ ); // Auto-save indicator - const autoSaveTimer = useRef>(); + const autoSaveTimer = useRef | undefined>(undefined); useEffect(() => { if (!draft) return; if (autoSaveTimer.current) clearTimeout(autoSaveTimer.current); diff --git a/src/page/workspace/channel/article-detail.tsx b/src/page/workspace/channel/article-detail.tsx index bf7e0dc..82644d3 100644 --- a/src/page/workspace/channel/article-detail.tsx +++ b/src/page/workspace/channel/article-detail.tsx @@ -162,7 +162,7 @@ export default function ArticleDetail({

Article Detail

{article.is_pinned && ( - + Pinned @@ -249,7 +249,7 @@ export default function ArticleDetail({
)} {editing ? ( @@ -290,7 +292,7 @@ export default function MessageItem({ {threadForMessage && !message.thread && ( } @@ -329,12 +331,13 @@ export default function MessageItem({ )} -
+
handleReaction(emoji)} trigger={
))} -
+
{newMsgCount > 0 && (