Skip to content

Commit

Permalink
Merge pull request #4087 from thematters/fix/admin-ui
Browse files Browse the repository at this point in the history
fix(admin): fix copy and UI of admin actions
  • Loading branch information
robertu7 authored Dec 14, 2023
2 parents bcfa4e0 + 0db296d commit 27fc32c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const RecommendArticleButton: React.FC<RecommendArticleButtonProps> = ({
)

if (loading) {
return <Menu.Item icon={<IconSpinner22 size="mdS" />} />
return <Menu.Item icon={<IconSpinner22 size="mdS" />} text="正在加載中…" />
}

if (data?.article?.__typename !== 'Article') return null
Expand All @@ -68,11 +68,11 @@ const RecommendArticleButton: React.FC<RecommendArticleButtonProps> = ({
: 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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ const ToggleRecommendArticleDialog = ({
useMutation<ToggleRecommendArticleMutation>(TOGGLE_RECOMMEND_ARTICLE)

const title = {
icymi: ['撤銷精華', '選為精華'],
icymi: ['選為精華', '撤銷精華'],
hottestAndNewest: ['撤銷移出', '移出熱門與最新'],
}
const description = {
icymi: [
`確認要将「<span class="u-highlight">${article.title}</span>」撤銷精華嗎?`,
`確認要将「<span class="u-highlight">${article.title}</span>」選為精華嗎?`,
`確認要将「<span class="u-highlight">${article.title}</span>」撤銷精華嗎?`,
],
hottestAndNewest: [
`作品「<span class="u-highlight">${article.title}</span>」將可能出現在熱門和最新的文章列表中。`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const ToggleRestrictUserButton: React.FC<ToggleRestrictUserButtonProps> = ({
)

if (loading) {
return <Menu.Item icon={<IconSpinner22 size="mdS" />} />
return <Menu.Item icon={<IconSpinner22 size="mdS" />} text="正在加載中…" />
}

if (data?.user?.__typename !== 'User') return null
Expand Down

0 comments on commit 27fc32c

Please sign in to comment.