From 09c024ccbb87426d57705a4df0b38552c39e60af Mon Sep 17 00:00:00 2001 From: Snowykami Date: Wed, 10 Sep 2025 11:59:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=BC=BA=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E6=9C=AA=E6=9B=B4=E6=94=B9=E6=8F=90=E7=A4=BA=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=AF=84=E8=AE=BA=E8=BE=93=E5=85=A5=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E5=8D=A0=E4=BD=8D=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/comment/comment-input.tsx | 7 +++- web/src/components/comment/comment-item.tsx | 39 ++++++++++++++------ web/src/components/comment/index.tsx | 3 ++ web/src/locales/zh-CN.json | 4 +- 4 files changed, 39 insertions(+), 14 deletions(-) diff --git a/web/src/components/comment/comment-input.tsx b/web/src/components/comment/comment-input.tsx index 24ba64b..894d644 100644 --- a/web/src/components/comment/comment-input.tsx +++ b/web/src/components/comment/comment-input.tsx @@ -49,6 +49,10 @@ export function CommentInput( toast.error(t("content_required")); return; } + if (initContent === commentContent.trim() && initIsPrivate === isPrivate) { + toast.warning(t("comment_unchanged")); + return; + } onCommentSubmitted({ commentContent, isPrivate }); setCommentContent(""); }; @@ -62,7 +66,7 @@ export function CommentInput(