From 340bd150992c8226333e796266d0b9e743bbbbd5 Mon Sep 17 00:00:00 2001 From: findthelorax Date: Sun, 19 Apr 2026 21:55:47 -0400 Subject: [PATCH] fix: external link icon on the detail panel for non URL services --- .../src/components/panels/DetailPanel.tsx | 75 ++++++++++--------- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/frontend/src/components/panels/DetailPanel.tsx b/frontend/src/components/panels/DetailPanel.tsx index b53a8ad..1152112 100644 --- a/frontend/src/components/panels/DetailPanel.tsx +++ b/frontend/src/components/panels/DetailPanel.tsx @@ -662,38 +662,41 @@ const CATEGORY_COLORS: Record = { function ServiceBadge({ svc, host, onEdit, onRemove }: { svc: ServiceInfo; host?: string; onEdit: () => void; onRemove: () => void }) { const url = getServiceUrl(svc, host) const color = CATEGORY_COLORS[svc.category ?? ''] ?? '#8b949e' + const hasPort = svc.port != null - const portLabel = hasPort ? String(svc.port) : '' + const portLabel = hasPort ? String(svc.port) : 'host' const pathLabel = svc.path?.trim() ? svc.path.trim() : '' return (
- - {url ? ( - e.stopPropagation()} - > - {svc.service_name} - - ) : ( - - {svc.service_name} - - )} -
+
+ + + {url ? ( + e.stopPropagation()} + > + {svc.service_name} + + ) : ( + + {svc.service_name} + + )} + {pathLabel && ( @@ -710,34 +713,38 @@ function ServiceBadge({ svc, host, onEdit, onRemove }: { svc: ServiceInfo; host? )} - {hasPort && ( - {portLabel}/{svc.protocol} - )} +
+ +
+ + {portLabel}/{svc.protocol} + + {url ? ( e.stopPropagation()} > ) : ( - + )} + +