From e01985b1e9bf8a60ea20f47fc3e7a7a9a969bca9 Mon Sep 17 00:00:00 2001 From: Innei Date: Mon, 16 Sep 2024 22:05:26 +0800 Subject: [PATCH] fix: disabled ghost button style Signed-off-by: Innei --- locales/app/zh-CN.json | 10 +++++----- .../src/components/ui/button/variants.tsx | 5 +++++ .../entry-column/components/mark-all-button.tsx | 17 +++++++++-------- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/locales/app/zh-CN.json b/locales/app/zh-CN.json index 05f46e4a16..e88c000a04 100644 --- a/locales/app/zh-CN.json +++ b/locales/app/zh-CN.json @@ -63,10 +63,10 @@ "feed_claim_modal.choose_verification_method": "提供三种认证方式,选择其中一种继续:", "feed_claim_modal.claim_button": "认证", "feed_claim_modal.content_instructions": "复制以下内容,发布到需要认证的订阅源", - "feed_claim_modal.description_current": "当前描述:", + "feed_claim_modal.description_current": "当前描述:", "feed_claim_modal.description_instructions": "复制以下内容,添加到需要认证的订阅源的 字段内", "feed_claim_modal.failed_to_load": "加载认证数据失败", - "feed_claim_modal.rss_format_choice": "RSS生成器通常有两种格式可供选择,根据需要复制下面内容", + "feed_claim_modal.rss_format_choice": "RSS 生成器通常有两种格式可供选择,根据需要复制下面内容", "feed_claim_modal.rss_instructions": "复制以下内容并粘贴到对应的 RSS 生成工具", "feed_claim_modal.rss_json_format": "JSON 格式", "feed_claim_modal.rss_xml_format": "XML 格式", @@ -107,10 +107,10 @@ "feed_view_type.videos": "视频", "mark_all_read_button.auto_confirm_info": "3 秒后自动确认", "mark_all_read_button.confirm": "确认", - "mark_all_read_button.confirm_mark_all": "将 {{which}} 标记为已读?", + "mark_all_read_button.confirm_mark_all": "将{{which}}标记为已读?", "mark_all_read_button.confirm_mark_all_info": "确认将全部标记为已读?", "mark_all_read_button.mark_all_as_read": "全部标记为已读", - "mark_all_read_button.mark_as_read": "标记 {{which}} 为已读", + "mark_all_read_button.mark_as_read": "标记{{which}}为已读", "mark_all_read_button.undo": "撤销", "player.back_10s": "后退 10s", "player.close": "关闭", @@ -174,7 +174,7 @@ "tip_modal.tip_amount_sent": "发送给作者", "tip_modal.tip_now": "立即打赏", "tip_modal.tip_sent": "成功打赏!感谢支持", - "tip_modal.tip_support": "⭐ 打赏表示支持!", + "tip_modal.tip_support": "⭐ 打赏表示支持!", "tip_modal.unclaimed_feed": "这个订阅源还没有被认证,收到的 Power 将存放在区块链直到源所有者完成认证", "user_button.account": "账号", "user_button.download_desktop_app": "下载客户端", diff --git a/src/renderer/src/components/ui/button/variants.tsx b/src/renderer/src/components/ui/button/variants.tsx index 93d87ffc4d..629f3870ad 100644 --- a/src/renderer/src/components/ui/button/variants.tsx +++ b/src/renderer/src/components/ui/button/variants.tsx @@ -28,6 +28,11 @@ export const styledButtonVariant = cva( status: "disabled", className: "opacity-60", }, + { + variant: "ghost", + status: "disabled", + className: "opacity-50 hover:!bg-transparent", + }, ], variants: { size: { diff --git a/src/renderer/src/modules/entry-column/components/mark-all-button.tsx b/src/renderer/src/modules/entry-column/components/mark-all-button.tsx index 1917030b27..b7f0194999 100644 --- a/src/renderer/src/modules/entry-column/components/mark-all-button.tsx +++ b/src/renderer/src/modules/entry-column/components/mark-all-button.tsx @@ -181,7 +181,6 @@ export const FlatMarkAllReadButton: FC = (props) => { const [status, setStatus] = useState<"initial" | "confirm" | "done">("initial") const handleMarkAll = useMarkAllByRoute(filter) - if (status === "done") return null const animate = { initial: { rotate: -30, opacity: 0.9 }, exit: { rotate: -30, opacity: 0.9 }, @@ -190,7 +189,12 @@ export const FlatMarkAllReadButton: FC = (props) => { return (