Skip to content

Commit aca786b

Browse files
authored
🐛 不支持更新的就不要显示更新 (#1418)
1 parent b70537c commit aca786b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/pages/options/routes/ScriptList/components.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,11 @@ export const UpdateTimeCell = React.memo(({ className, script }: { className?: s
173173

174174
return (
175175
<Space size={4}>
176-
<Tooltip content={t("check_update")} position="tl">
177-
<Typography.Text className={`tw-cursor-pointer ${className ?? ""}`} onClick={handleClick}>
176+
<Tooltip content={t("check_update")} position="tl" disabled={!script.checkUpdateUrl}>
177+
<Typography.Text
178+
className={`${script.checkUpdateUrl ? "tw-cursor-pointer" : ""} ${className ?? ""}`}
179+
onClick={script.checkUpdateUrl ? handleClick : undefined}
180+
>
178181
{script.updatetime && semTime(new Date(script.updatetime))}
179182
</Typography.Text>
180183
</Tooltip>

0 commit comments

Comments
 (0)