Skip to content

Commit e01985b

Browse files
committed
fix: disabled ghost button style
Signed-off-by: Innei <i@innei.in>
1 parent ba396be commit e01985b

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

locales/app/zh-CN.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@
6363
"feed_claim_modal.choose_verification_method": "提供三种认证方式,选择其中一种继续:",
6464
"feed_claim_modal.claim_button": "认证",
6565
"feed_claim_modal.content_instructions": "复制以下内容,发布到需要认证的订阅源",
66-
"feed_claim_modal.description_current": "当前描述:",
66+
"feed_claim_modal.description_current": "当前描述",
6767
"feed_claim_modal.description_instructions": "复制以下内容,添加到需要认证的订阅源的 <code /> 字段内",
6868
"feed_claim_modal.failed_to_load": "加载认证数据失败",
69-
"feed_claim_modal.rss_format_choice": "RSS生成器通常有两种格式可供选择,根据需要复制下面内容",
69+
"feed_claim_modal.rss_format_choice": "RSS 生成器通常有两种格式可供选择,根据需要复制下面内容",
7070
"feed_claim_modal.rss_instructions": "复制以下内容并粘贴到对应的 RSS 生成工具",
7171
"feed_claim_modal.rss_json_format": "JSON 格式",
7272
"feed_claim_modal.rss_xml_format": "XML 格式",
@@ -107,10 +107,10 @@
107107
"feed_view_type.videos": "视频",
108108
"mark_all_read_button.auto_confirm_info": "3 秒后自动确认",
109109
"mark_all_read_button.confirm": "确认",
110-
"mark_all_read_button.confirm_mark_all": " {{which}} 标记为已读?",
110+
"mark_all_read_button.confirm_mark_all": "将{{which}}标记为已读?",
111111
"mark_all_read_button.confirm_mark_all_info": "确认将全部标记为已读?",
112112
"mark_all_read_button.mark_all_as_read": "全部标记为已读",
113-
"mark_all_read_button.mark_as_read": "标记 {{which}} 为已读",
113+
"mark_all_read_button.mark_as_read": "标记{{which}}为已读",
114114
"mark_all_read_button.undo": "撤销",
115115
"player.back_10s": "后退 10s",
116116
"player.close": "关闭",
@@ -174,7 +174,7 @@
174174
"tip_modal.tip_amount_sent": "发送给作者",
175175
"tip_modal.tip_now": "立即打赏",
176176
"tip_modal.tip_sent": "成功打赏!感谢支持",
177-
"tip_modal.tip_support": "⭐ 打赏表示支持!",
177+
"tip_modal.tip_support": "⭐ 打赏表示支持",
178178
"tip_modal.unclaimed_feed": "这个订阅源还没有被认证,收到的 Power 将存放在区块链直到源所有者完成认证",
179179
"user_button.account": "账号",
180180
"user_button.download_desktop_app": "下载客户端",

src/renderer/src/components/ui/button/variants.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ export const styledButtonVariant = cva(
2828
status: "disabled",
2929
className: "opacity-60",
3030
},
31+
{
32+
variant: "ghost",
33+
status: "disabled",
34+
className: "opacity-50 hover:!bg-transparent",
35+
},
3136
],
3237
variants: {
3338
size: {

src/renderer/src/modules/entry-column/components/mark-all-button.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ export const FlatMarkAllReadButton: FC<MarkAllButtonProps> = (props) => {
181181
const [status, setStatus] = useState<"initial" | "confirm" | "done">("initial")
182182
const handleMarkAll = useMarkAllByRoute(filter)
183183

184-
if (status === "done") return null
185184
const animate = {
186185
initial: { rotate: -30, opacity: 0.9 },
187186
exit: { rotate: -30, opacity: 0.9 },
@@ -190,7 +189,12 @@ export const FlatMarkAllReadButton: FC<MarkAllButtonProps> = (props) => {
190189
return (
191190
<Button
192191
variant="ghost"
193-
className={cn("center relative flex h-auto gap-1", className)}
192+
disabled={status === "done"}
193+
className={cn(
194+
"center relative flex h-auto gap-1",
195+
196+
className,
197+
)}
194198
onMouseLeave={() => {
195199
if (status === "confirm") {
196200
setStatus("initial")
@@ -215,12 +219,9 @@ export const FlatMarkAllReadButton: FC<MarkAllButtonProps> = (props) => {
215219
)}
216220
</AnimatePresence>
217221
<span className={cn(status === "confirm" ? "opacity-0" : "opacity-100", "duration-200")}>
218-
<Trans
219-
i18nKey="mark_all_read_button.mark_as_read"
220-
values={{
221-
which: typeof which === "string" ? t.common(`words.which.${which}` as any) : which,
222-
}}
223-
/>
222+
{t("mark_all_read_button.mark_as_read", {
223+
which: typeof which === "string" ? t.common(`words.which.${which}` as any) : which,
224+
})}
224225
</span>
225226
<span
226227
className={cn(

0 commit comments

Comments
 (0)