diff --git a/web/src/routes/playlists/[id]/+page.svelte b/web/src/routes/playlists/[id]/+page.svelte index 0767e0f4..ee23199d 100644 --- a/web/src/routes/playlists/[id]/+page.svelte +++ b/web/src/routes/playlists/[id]/+page.svelte @@ -2,7 +2,7 @@ import { page } from '$app/state'; import { goto } from '$app/navigation'; import { pageTitle } from '$lib/branding'; - import { Pencil, Trash2 } from 'lucide-svelte'; + import { Pencil, Trash2, Link as LinkIcon } from 'lucide-svelte'; import { useQueryClient } from '@tanstack/svelte-query'; import PlaylistTrackRow from '$lib/components/PlaylistTrackRow.svelte'; import ApiErrorBanner from '$lib/components/ApiErrorBanner.svelte'; @@ -130,6 +130,18 @@ } } + async function onCopyLink() { + const href = `${window.location.origin}/playlists/${id}`; + try { + await navigator.clipboard.writeText(href); + pushToast('Link copied to clipboard.'); + } catch { + // navigator.clipboard fails in insecure contexts and older browsers. + // Fall back to selecting the link in a prompt so the user can copy. + window.prompt('Copy the playlist link:', href); + } + } + // --- System-playlist refresh (#411 R2: generic by-kind) --- let refreshingSystem = $state(false); @@ -188,6 +200,17 @@ {refreshingSystem ? 'Refreshing…' : 'Refresh'} {/if} + {#if isOwner && pl.is_public} + + {/if} {#if isOwner}