Skip to content

Commit cab4652

Browse files
authored
Merge pull request #293 from techulus/fix/service-card-favicon-domain
Move service favicon to domain row
2 parents 30af295 + eb9010a commit cab4652

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

‎web/components/service/service-canvas.tsx‎

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
ArrowLeftRight,
55
Box,
66
Github,
7-
Globe,
87
HardDrive,
98
LayoutGrid,
109
LoaderCircle,
@@ -403,28 +402,28 @@ function ServiceCard({
403402
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"
404403
style={{ minHeight: SERVICE_CARD_HEIGHT }}
405404
>
406-
<SummaryCardTitle className="flex items-center gap-2">
407-
{publicDomain && (
408-
<Image
409-
src={`https://www.google.com/s2/favicons?domain_url=${encodeURIComponent(`https://${publicDomain}`)}&sz=64`}
410-
alt=""
411-
width={16}
412-
height={16}
413-
unoptimized
414-
className="size-4 shrink-0 rounded-sm"
415-
referrerPolicy="no-referrer"
416-
onError={(event) => {
417-
event.currentTarget.hidden = true;
418-
}}
419-
/>
420-
)}
421-
<span className="min-w-0 truncate">{service.name}</span>
422-
</SummaryCardTitle>
405+
<SummaryCardTitle>{service.name}</SummaryCardTitle>
423406

424407
{(publicDomain || volumeNames) && (
425408
<div className="mt-1.5 space-y-0.5">
426409
{publicDomain && (
427-
<SummaryCardLine icon={Globe} value={publicDomain} />
410+
<div className="flex items-center gap-2.5 text-xs leading-5">
411+
<Image
412+
src={`https://www.google.com/s2/favicons?domain_url=${encodeURIComponent(`https://${publicDomain}`)}&sz=64`}
413+
alt=""
414+
width={16}
415+
height={16}
416+
unoptimized
417+
className="size-4 shrink-0 rounded-sm"
418+
referrerPolicy="no-referrer"
419+
onError={(event) => {
420+
event.currentTarget.hidden = true;
421+
}}
422+
/>
423+
<span className="min-w-0 flex-1 truncate font-mono text-foreground">
424+
{publicDomain}
425+
</span>
426+
</div>
428427
)}
429428
{volumeNames && (
430429
<SummaryCardLine icon={HardDrive} value={volumeNames} />

0 commit comments

Comments
 (0)