diff --git a/lang/default.json b/lang/default.json index f9f9383492..4519f2ec2d 100644 --- a/lang/default.json +++ b/lang/default.json @@ -1057,6 +1057,9 @@ "N2IrpM": { "defaultMessage": "Confirm" }, + "N8ISx8": { + "defaultMessage": "Oops! This comment has been deleted by author" + }, "NAidKb": { "defaultMessage": "Notifications" }, diff --git a/lang/en.json b/lang/en.json index 6e1b2e17cf..b879cf5330 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1057,6 +1057,9 @@ "N2IrpM": { "defaultMessage": "Confirm" }, + "N8ISx8": { + "defaultMessage": "Oops! This comment has been deleted by author" + }, "NAidKb": { "defaultMessage": "Notifications" }, diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index 03e2b5dd86..8ca9ad5eaf 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -1057,6 +1057,9 @@ "N2IrpM": { "defaultMessage": "确认" }, + "N8ISx8": { + "defaultMessage": "Oops!该评论已被原作者删除" + }, "NAidKb": { "defaultMessage": "通知" }, diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index 52d14b8db3..d94bdfffd9 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -1057,6 +1057,9 @@ "N2IrpM": { "defaultMessage": "確認" }, + "N8ISx8": { + "defaultMessage": "Oops!該評論已被原作者刪除" + }, "NAidKb": { "defaultMessage": "通知" }, diff --git a/src/components/CommentBeta/Content/index.tsx b/src/components/CommentBeta/Content/index.tsx index 984d54a2ee..eec5ed4e1e 100644 --- a/src/components/CommentBeta/Content/index.tsx +++ b/src/components/CommentBeta/Content/index.tsx @@ -61,6 +61,7 @@ const Content = ({ const contentClasses = classNames({ [styles.content]: true, [size ? styles[`size${capitalizeFirstLetter(size)}`] : '']: !!size, + [styles.inactive]: state === 'archived', }) if (state === 'collapsed' || state === 'banned' || isBlocked) { @@ -104,7 +105,7 @@ const Content = ({ if (state === 'archived') { return ( -

+

{ + toast.success({ + message: ( + + ), + }) + }} + > +

+ +
+ + ) + } const path = - comment.state === 'active' + comment.state === 'active' || comment.state === 'collapsed' ? toPath({ page: 'commentDetail', comment, @@ -63,7 +84,6 @@ const NoticeComment = ({ circle, }) : { href: '' } - return (
diff --git a/src/views/ArticleDetail/Comments/CommentDetail/index.tsx b/src/views/ArticleDetail/Comments/CommentDetail/index.tsx index e23693d932..5927c1d104 100644 --- a/src/views/ArticleDetail/Comments/CommentDetail/index.tsx +++ b/src/views/ArticleDetail/Comments/CommentDetail/index.tsx @@ -10,6 +10,7 @@ import { CommentDetailQuery } from '~/gql/graphql' import { Placeholder } from '../Placeholder' import { COMMENT_DETAIL } from './gql' +import styles from './styles.module.css' const CommentDetail = () => { /** @@ -110,7 +111,7 @@ const CommentDetail = () => { const comment = data?.node as ThreadCommentType return ( -
+