From 0db296de2ab0853efea7cb71a2ba84bfc129895c Mon Sep 17 00:00:00 2001 From: robertu <4065233+robertu7@users.noreply.github.com> Date: Thu, 14 Dec 2023 09:06:18 +0800 Subject: [PATCH] fix(admin): fix copy and UI of admin actions refs: - 2023-12-cc-01#YS-001 - 2023-12-cc-01#YS-002 - 2023-12-cc-01#YS-003 --- .../DropdownActions/ToggleRecommendArticle/Button.tsx | 6 +++--- .../DropdownActions/ToggleRecommendArticle/Dialog.tsx | 4 ++-- .../DropdownActions/ToggleRestrictUser/Button.tsx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/ArticleDigest/DropdownActions/ToggleRecommendArticle/Button.tsx b/src/components/ArticleDigest/DropdownActions/ToggleRecommendArticle/Button.tsx index f2380845a3..deae96617f 100644 --- a/src/components/ArticleDigest/DropdownActions/ToggleRecommendArticle/Button.tsx +++ b/src/components/ArticleDigest/DropdownActions/ToggleRecommendArticle/Button.tsx @@ -56,7 +56,7 @@ const RecommendArticleButton: React.FC = ({ ) if (loading) { - return } /> + return } text="正在加載中…" /> } if (data?.article?.__typename !== 'Article') return null @@ -68,11 +68,11 @@ const RecommendArticleButton: React.FC = ({ : article.oss.inRecommendHottest && article.oss.inRecommendNewest const texts = { - icymi: ['撤銷精華', '選為精華'], + icymi: ['選為精華', '撤銷精華'], hottestAndNewest: ['撤銷移出', '移出熱門與最新'], } const icons = { - icymi: [IconCircleMinus20, IconNavCreate32], + icymi: [IconNavCreate32, IconCircleMinus20], hottestAndNewest: [IconReset20, IconUnPin24], } const IconComp = icons[type][+enabled] diff --git a/src/components/ArticleDigest/DropdownActions/ToggleRecommendArticle/Dialog.tsx b/src/components/ArticleDigest/DropdownActions/ToggleRecommendArticle/Dialog.tsx index 0a16c5e0d1..26040e5320 100644 --- a/src/components/ArticleDigest/DropdownActions/ToggleRecommendArticle/Dialog.tsx +++ b/src/components/ArticleDigest/DropdownActions/ToggleRecommendArticle/Dialog.tsx @@ -53,13 +53,13 @@ const ToggleRecommendArticleDialog = ({ useMutation(TOGGLE_RECOMMEND_ARTICLE) const title = { - icymi: ['撤銷精華', '選為精華'], + icymi: ['選為精華', '撤銷精華'], hottestAndNewest: ['撤銷移出', '移出熱門與最新'], } const description = { icymi: [ - `確認要将「${article.title}」撤銷精華嗎?`, `確認要将「${article.title}」選為精華嗎?`, + `確認要将「${article.title}」撤銷精華嗎?`, ], hottestAndNewest: [ `作品「${article.title}」將可能出現在熱門和最新的文章列表中。`, diff --git a/src/views/User/UserProfile/DropdownActions/ToggleRestrictUser/Button.tsx b/src/views/User/UserProfile/DropdownActions/ToggleRestrictUser/Button.tsx index 5f7695c3fa..b787a7493e 100644 --- a/src/views/User/UserProfile/DropdownActions/ToggleRestrictUser/Button.tsx +++ b/src/views/User/UserProfile/DropdownActions/ToggleRestrictUser/Button.tsx @@ -46,7 +46,7 @@ const ToggleRestrictUserButton: React.FC = ({ ) if (loading) { - return } /> + return } text="正在加載中…" /> } if (data?.user?.__typename !== 'User') return null