feat(plugins): add plugin new version detection (#1865)

* feat(plugins): 添加插件更新检测功能

* perf: card style

---------

Co-authored-by: Junyan Qin <rockchinq@gmail.com>
This commit is contained in:
sheetung
2025-12-18 12:17:25 +08:00
committed by GitHub
parent 82e2123fe7
commit 3ab9ffb7b7
8 changed files with 132 additions and 10 deletions

View File

@@ -159,12 +159,17 @@ export default function PluginCardComponent({
}}
>
<DropdownMenuTrigger asChild>
<Button
variant="ghost"
className="bg-white dark:bg-[#1f1f22] hover:bg-gray-100 dark:hover:bg-[#2a2a2d]"
>
<Ellipsis className="w-4 h-4" />
</Button>
<div className="relative">
<Button
variant="ghost"
className="bg-white dark:bg-[#1f1f22] hover:bg-gray-100 dark:hover:bg-[#2a2a2d]"
>
<Ellipsis className="w-4 h-4" />
</Button>
{cardVO.hasUpdate && (
<div className="absolute -top-0.5 -right-0.5 w-2.5 h-2.5 bg-red-500 rounded-full border-2 border-white dark:border-[#1f1f22]"></div>
)}
</div>
</DropdownMenuTrigger>
<DropdownMenuContent>
{/**upgrade */}
@@ -179,6 +184,11 @@ export default function PluginCardComponent({
>
<ArrowUp className="w-4 h-4" />
<span>{t('plugins.update')}</span>
{cardVO.hasUpdate && (
<Badge className="ml-auto bg-red-500 hover:bg-red-500 text-white text-[0.6rem] px-1.5 py-0 h-4">
{t('plugins.new')}
</Badge>
)}
</DropdownMenuItem>
)}
{/**view source */}