diff --git a/apps/admin-ui/src/app/live-lists/page.tsx b/apps/admin-ui/src/app/live-lists/page.tsx index 5cd1bb8..4029a34 100644 --- a/apps/admin-ui/src/app/live-lists/page.tsx +++ b/apps/admin-ui/src/app/live-lists/page.tsx @@ -74,6 +74,21 @@ function formFromChannel(c: LiveChannelRow): ChannelForm { }; } +/** Korte preview in zender-overzicht (volledige URL via title/tooltip). */ +function shortUrl(url: string, max = 42): string { + const s = url.trim(); + if (s.length <= max) return s; + try { + const u = new URL(s); + const path = u.pathname.split("/").filter(Boolean).pop() ?? ""; + const host = u.host.replace(/^www\./, ""); + const tip = path ? `${host}/…/${path}` : host; + return tip.length <= max ? tip : `${tip.slice(0, max - 1)}…`; + } catch { + return `${s.slice(0, max - 1)}…`; + } +} + export default function LiveListsPage() { useAuth(); const [lists, setLists] = useState([]);