diff --git a/lang/default.json b/lang/default.json
index f6246138b9..2d10896945 100644
--- a/lang/default.json
+++ b/lang/default.json
@@ -121,10 +121,6 @@
"/usqHn": {
"defaultMessage": "{displayName}'s creative space"
},
- "/vyhs5": {
- "defaultMessage": "Comment deleted",
- "description": "src/components/Notice/NoticeComment.tsx"
- },
"/wKyxw": {
"defaultMessage": "Failed to republish"
},
@@ -618,6 +614,10 @@
"defaultMessage": "Still quiet here. {br}Be the first one to say hello!",
"description": "src/components/Empty/EmptyComment.tsx"
},
+ "7zn5ig": {
+ "defaultMessage": "Comment deleted",
+ "description": "src/components/Notice/NoticeComment.tsx/article"
+ },
"8+Z5E9": {
"defaultMessage": "The badge signifies your participation and completion in the \"Free Write in 7 days\"."
},
@@ -889,6 +889,10 @@
"defaultMessage": "Copy comment",
"description": "src/components/Comment/DropdownActions/index.tsx"
},
+ "Ci7dxf": {
+ "defaultMessage": "Comment deleted",
+ "description": "src/components/Notice/NoticeComment.tsx/moment"
+ },
"CjKqYk": {
"defaultMessage": "Share a story from your life"
},
@@ -1486,9 +1490,6 @@
"N6PWfU": {
"defaultMessage": "Forget Password"
},
- "N8ISx8": {
- "defaultMessage": "Oops! This comment has been deleted by author"
- },
"NACY16": {
"defaultMessage": "Why need to set up a wallet?",
"description": "src/components/Forms/PaymentForm/BindWallet/index.tsx"
@@ -3531,6 +3532,10 @@
"z3uIHQ": {
"defaultMessage": "Undo upvote"
},
+ "z91BKe": {
+ "defaultMessage": "Archived Work",
+ "description": "src/components/Notice/NoticeArticleTitle.tsx"
+ },
"zAK5G+": {
"defaultMessage": "The login link has been sent to {email}",
"description": "src/components/Forms/Verification/LinkSent.tsx"
diff --git a/lang/en.json b/lang/en.json
index 6958c1ba9e..65438ff0f7 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -121,10 +121,6 @@
"/usqHn": {
"defaultMessage": "{displayName}'s creative space"
},
- "/vyhs5": {
- "defaultMessage": "Comment deleted",
- "description": "src/components/Notice/NoticeComment.tsx"
- },
"/wKyxw": {
"defaultMessage": "Failed to republish"
},
@@ -618,6 +614,10 @@
"defaultMessage": "Still quiet here. {br}Be the first one to say hello!",
"description": "src/components/Empty/EmptyComment.tsx"
},
+ "7zn5ig": {
+ "defaultMessage": "Comment deleted",
+ "description": "src/components/Notice/NoticeComment.tsx/article"
+ },
"8+Z5E9": {
"defaultMessage": "The badge signifies your participation and completion in the \"Free Write in 7 days\"."
},
@@ -889,6 +889,10 @@
"defaultMessage": "Copy comment",
"description": "src/components/Comment/DropdownActions/index.tsx"
},
+ "Ci7dxf": {
+ "defaultMessage": "Comment deleted",
+ "description": "src/components/Notice/NoticeComment.tsx/moment"
+ },
"CjKqYk": {
"defaultMessage": "Share a story from your life"
},
@@ -1486,9 +1490,6 @@
"N6PWfU": {
"defaultMessage": "Forget Password"
},
- "N8ISx8": {
- "defaultMessage": "Oops! This comment has been deleted by author"
- },
"NACY16": {
"defaultMessage": "Why need to set up a wallet?",
"description": "src/components/Forms/PaymentForm/BindWallet/index.tsx"
@@ -3531,6 +3532,10 @@
"z3uIHQ": {
"defaultMessage": "Undo upvote"
},
+ "z91BKe": {
+ "defaultMessage": "Archived Work",
+ "description": "src/components/Notice/NoticeArticleTitle.tsx"
+ },
"zAK5G+": {
"defaultMessage": "The login link has been sent to {email}",
"description": "src/components/Forms/Verification/LinkSent.tsx"
diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json
index 9987fe61cc..7bddb86514 100644
--- a/lang/zh-Hans.json
+++ b/lang/zh-Hans.json
@@ -121,10 +121,6 @@
"/usqHn": {
"defaultMessage": "{displayName} 的创作空间站"
},
- "/vyhs5": {
- "defaultMessage": "留言已删除",
- "description": "src/components/Notice/NoticeComment.tsx"
- },
"/wKyxw": {
"defaultMessage": "发布失败"
},
@@ -618,6 +614,10 @@
"defaultMessage": "暂无评论",
"description": "src/components/Empty/EmptyComment.tsx"
},
+ "7zn5ig": {
+ "defaultMessage": "评论已删除",
+ "description": "src/components/Notice/NoticeComment.tsx/article"
+ },
"8+Z5E9": {
"defaultMessage": "纪念你参与「七日书」并完成七天书写"
},
@@ -889,6 +889,10 @@
"defaultMessage": "复制留言",
"description": "src/components/Comment/DropdownActions/index.tsx"
},
+ "Ci7dxf": {
+ "defaultMessage": "留言已删除",
+ "description": "src/components/Notice/NoticeComment.tsx/moment"
+ },
"CjKqYk": {
"defaultMessage": "分享今天开心或难过的小故事吧"
},
@@ -1486,9 +1490,6 @@
"N6PWfU": {
"defaultMessage": "忘记密码"
},
- "N8ISx8": {
- "defaultMessage": "Oops!该评论已被原作者删除"
- },
"NACY16": {
"defaultMessage": "为什么需要设定钱包 ?",
"description": "src/components/Forms/PaymentForm/BindWallet/index.tsx"
@@ -3531,6 +3532,10 @@
"z3uIHQ": {
"defaultMessage": "取消点赞"
},
+ "z91BKe": {
+ "defaultMessage": "已归档作品",
+ "description": "src/components/Notice/NoticeArticleTitle.tsx"
+ },
"zAK5G+": {
"defaultMessage": "登录链接已发送至 {email}",
"description": "src/components/Forms/Verification/LinkSent.tsx"
diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json
index b50d7d0e83..c5bbdca94e 100644
--- a/lang/zh-Hant.json
+++ b/lang/zh-Hant.json
@@ -121,10 +121,6 @@
"/usqHn": {
"defaultMessage": "{displayName} 的創作空間站"
},
- "/vyhs5": {
- "defaultMessage": "留言已刪除",
- "description": "src/components/Notice/NoticeComment.tsx"
- },
"/wKyxw": {
"defaultMessage": "發布失敗"
},
@@ -618,6 +614,10 @@
"defaultMessage": "暫無評論",
"description": "src/components/Empty/EmptyComment.tsx"
},
+ "7zn5ig": {
+ "defaultMessage": "評論已刪除",
+ "description": "src/components/Notice/NoticeComment.tsx/article"
+ },
"8+Z5E9": {
"defaultMessage": "紀念你參與「七日書」並完成七天書寫"
},
@@ -889,6 +889,10 @@
"defaultMessage": "複製留言",
"description": "src/components/Comment/DropdownActions/index.tsx"
},
+ "Ci7dxf": {
+ "defaultMessage": "留言已刪除",
+ "description": "src/components/Notice/NoticeComment.tsx/moment"
+ },
"CjKqYk": {
"defaultMessage": "分享今天開心或難過的小故事吧"
},
@@ -1486,9 +1490,6 @@
"N6PWfU": {
"defaultMessage": "忘記密碼"
},
- "N8ISx8": {
- "defaultMessage": "Oops!該評論已被原作者刪除"
- },
"NACY16": {
"defaultMessage": "為什麼需要設定錢包 ?",
"description": "src/components/Forms/PaymentForm/BindWallet/index.tsx"
@@ -3531,6 +3532,10 @@
"z3uIHQ": {
"defaultMessage": "取消點讚"
},
+ "z91BKe": {
+ "defaultMessage": "已封存作品",
+ "description": "src/components/Notice/NoticeArticleTitle.tsx"
+ },
"zAK5G+": {
"defaultMessage": "登入連結已發送至 {email}",
"description": "src/components/Forms/Verification/LinkSent.tsx"
diff --git a/src/components/Notice/NoticeArticleTitle.tsx b/src/components/Notice/NoticeArticleTitle.tsx
index 4206eba4f3..4c7b1934c6 100644
--- a/src/components/Notice/NoticeArticleTitle.tsx
+++ b/src/components/Notice/NoticeArticleTitle.tsx
@@ -1,10 +1,11 @@
import gql from 'graphql-tag'
import Link from 'next/link'
+import { FormattedMessage } from 'react-intl'
import { TEST_ID } from '~/common/enums'
import { toPath } from '~/common/utils'
import { ArticleDigestTitle } from '~/components/ArticleDigest'
-import { NoticeArticleTitleFragment } from '~/gql/graphql'
+import { ArticleState, NoticeArticleTitleFragment } from '~/gql/graphql'
import styles from './styles.module.css'
@@ -24,6 +25,8 @@ const NoticeArticleTitle = ({
article,
})
+ const isArchived = article.articleState === ArticleState.Archived
+
if (!isBlock) {
return (
@@ -31,7 +34,15 @@ const NoticeArticleTitle = ({
className={styles.noticeArticleTitle}
data-test-id={TEST_ID.NOTICE_ARTICLE_TITLE}
>
- {article.title}
+ {isArchived ? (
+
+ ) : (
+ article.title
+ )}
)
diff --git a/src/components/Notice/NoticeComment.tsx b/src/components/Notice/NoticeComment.tsx
index 43674952af..f17c6ea196 100644
--- a/src/components/Notice/NoticeComment.tsx
+++ b/src/components/Notice/NoticeComment.tsx
@@ -19,6 +19,7 @@ const fragments = {
id
title
slug
+ articleState: state
shortHash
author {
id
@@ -31,7 +32,7 @@ const fragments = {
}
... on Moment {
id
- state
+ momentState: state
shortHash
}
}
@@ -98,8 +99,8 @@ const NoticeComment = ({
@@ -107,28 +108,26 @@ const NoticeComment = ({
)
}
- if (comment.state === 'archived') {
+ if (comment.state === 'archived' && article) {
return (
-
+
)
}
- if (comment.state === 'active' && moment && moment.state === 'archived') {
+ if (
+ comment.state === 'active' &&
+ ((moment && moment.momentState === 'archived') ||
+ (article && article.articleState === 'archived'))
+ ) {
return (
diff --git a/src/views/ArticleDetail/index.tsx b/src/views/ArticleDetail/index.tsx
index f52e849a8e..17fba58490 100644
--- a/src/views/ArticleDetail/index.tsx
+++ b/src/views/ArticleDetail/index.tsx
@@ -582,18 +582,14 @@ const ArticleDetail = ({
- ) : article.state === 'banned' ? (
+ article.state === 'banned' ? (
) : null
}
+ type="not_found"
>