diff --git a/web/components/service/service-canvas.tsx b/web/components/service/service-canvas.tsx index 111f45f4..23cc1eb9 100644 --- a/web/components/service/service-canvas.tsx +++ b/web/components/service/service-canvas.tsx @@ -12,6 +12,7 @@ import { Trash2, Upload, } from "lucide-react"; +import Image from "next/image"; import Link from "next/link"; import { useRouter } from "next/navigation"; import type { AnchorHTMLAttributes, MouseEvent, PointerEvent } from "react"; @@ -383,7 +384,9 @@ function ServiceCard({ (observedReadyPhases as readonly string[]).includes(d.observedPhase), ).length; const statusLabel = getStatusLabel(service.deployments, runningCount); - const publicEndpoint = service.ports.find((p) => p.isPublic && p.domain); + const publicDomain = service.ports.find( + (p) => p.isPublic && p.protocol === "http" && p.domain, + )?.domain; const volumeNames = (service.volumes ?? []).map((v) => v.name).join(", "); return ( @@ -400,12 +403,28 @@ function ServiceCard({ className="relative z-10 flex w-full flex-col rounded-xl border border-slate-200 dark:border-slate-700 bg-white/50 dark:bg-slate-900/50 backdrop-blur-sm px-3.5 py-3" style={{ minHeight: SERVICE_CARD_HEIGHT }} > - {service.name} + + {publicDomain && ( + { + event.currentTarget.hidden = true; + }} + /> + )} + {service.name} + - {(publicEndpoint || volumeNames) && ( + {(publicDomain || volumeNames) && (
- {publicEndpoint?.domain && ( - + {publicDomain && ( + )} {volumeNames && (