fix: disabled ghost button style

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-09-16 22:05:26 +08:00
parent ba396beaa7
commit e01985b1e9
3 changed files with 19 additions and 13 deletions
+5 -5
View File
@@ -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": "复制以下内容,添加到需要认证的订阅源的 <code /> 字段内",
"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": "下载客户端",
@@ -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: {
@@ -181,7 +181,6 @@ export const FlatMarkAllReadButton: FC<MarkAllButtonProps> = (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<MarkAllButtonProps> = (props) => {
return (
<Button
variant="ghost"
className={cn("center relative flex h-auto gap-1", className)}
disabled={status === "done"}
className={cn(
"center relative flex h-auto gap-1",
className,
)}
onMouseLeave={() => {
if (status === "confirm") {
setStatus("initial")
@@ -215,12 +219,9 @@ export const FlatMarkAllReadButton: FC<MarkAllButtonProps> = (props) => {
)}
</AnimatePresence>
<span className={cn(status === "confirm" ? "opacity-0" : "opacity-100", "duration-200")}>
<Trans
i18nKey="mark_all_read_button.mark_as_read"
values={{
which: typeof which === "string" ? t.common(`words.which.${which}` as any) : which,
}}
/>
{t("mark_all_read_button.mark_as_read", {
which: typeof which === "string" ? t.common(`words.which.${which}` as any) : which,
})}
</span>
<span
className={cn(