m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-11 14:43:49 -05:00

feat: add badges to web UI to quickly show which version is running and which the user will upgrade to

This is an example of a bad, long commit message.
This commit is contained in:
Sergio
2025-03-21 15:57:49 +02:00
parent 5fbbba32f1
commit dd68c5097a
3 changed files with 38 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ import {
TriangleAlert,
X,
} from "lucide-react";
import Badge from "./Badge";
const clickable_registries = [
"registry-1.docker.io",
@@ -60,12 +61,20 @@ export default function Image({ data }: { data: Image }) {
>
<Box className={`size-6 shrink-0 text-${theme}-500`} />
<span className="font-mono">{data.reference}</span>
<WithTooltip
text={info.description}
className={`ml-auto size-6 shrink-0 ${info.color}`}
>
<info.icon />
</WithTooltip>
<div className="ml-auto flex gap-2">
{data.result.info?.type === "version" ? (
<Badge
from={data.result.info.current_version}
to={data.result.info.new_version}
/>
) : null}
<WithTooltip
text={info.description}
className={`size-6 shrink-0 ${info.color}`}
>
<info.icon />
</WithTooltip>
</div>
</li>
</button>
<Dialog open={open} onClose={setOpen} className="relative z-10">