fix(about): show update badge instead of green check when newer version available

This commit is contained in:
Jason
2026-02-24 10:23:18 +08:00
parent c380528a27
commit e1e2bdef2a
+4 -5
View File
@@ -525,15 +525,14 @@ export function AboutSection({ isPortable }: AboutSectionProps) {
{isLoadingTools || loadingTools[toolName] ? ( {isLoadingTools || loadingTools[toolName] ? (
<Loader2 className="h-4 w-4 animate-spin text-muted-foreground" /> <Loader2 className="h-4 w-4 animate-spin text-muted-foreground" />
) : tool?.version ? ( ) : tool?.version ? (
<div className="flex items-center gap-1.5"> tool.latest_version &&
{tool.latest_version && tool.version !== tool.latest_version ? (
tool.version !== tool.latest_version && (
<span className="text-[10px] px-1.5 py-0.5 rounded-full bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 border border-yellow-500/20"> <span className="text-[10px] px-1.5 py-0.5 rounded-full bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 border border-yellow-500/20">
{tool.latest_version} {tool.latest_version}
</span> </span>
)} ) : (
<CheckCircle2 className="h-4 w-4 text-green-500" /> <CheckCircle2 className="h-4 w-4 text-green-500" />
</div> )
) : ( ) : (
<AlertCircle className="h-4 w-4 text-yellow-500" /> <AlertCircle className="h-4 w-4 text-yellow-500" />
)} )}