diff --git a/src/lib/components/party/edit/YouTubeUrlInput.svelte b/src/lib/components/party/edit/YouTubeUrlInput.svelte index e62b561e..7301d3bc 100644 --- a/src/lib/components/party/edit/YouTubeUrlInput.svelte +++ b/src/lib/components/party/edit/YouTubeUrlInput.svelte @@ -19,7 +19,13 @@ label?: string } - let { value = $bindable(), onchange, disabled = false, contained = false, label }: Props = $props() + let { + value = $bindable(), + onchange, + disabled = false, + contained = false, + label + }: Props = $props() // YouTube URL regex - matches youtube.com/watch?v= and youtu.be/ formats const YOUTUBE_REGEX = /(?:youtube\.com\/watch\?v=|youtu\.be\/)([\w-]+)/ @@ -46,7 +52,9 @@ const isValid = $derived(isValidYouTubeUrl(inputValue)) const showError = $derived(touched && !isValid) const showPreview = $derived(videoId != null && isValid) - const thumbnailUrl = $derived(videoId ? `https://img.youtube.com/vi/${videoId}/mqdefault.jpg` : null) + const thumbnailUrl = $derived( + videoId ? `https://img.youtube.com/vi/${videoId}/mqdefault.jpg` : null + ) // Fetch video metadata when videoId changes $effect(() => { @@ -59,10 +67,9 @@ isLoadingMetadata = true const controller = new AbortController() - fetch( - `https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${id}&format=json`, - { signal: controller.signal } - ) + fetch(`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${id}&format=json`, { + signal: controller.signal + }) .then((res) => (res.ok ? res.json() : null)) .then((data) => { if (data?.title) { @@ -282,7 +289,7 @@ .preview-card { background-color: var(--input-bound-bg); - border-radius: $input-corner; + border-radius: $page-corner; padding: $unit; } diff --git a/src/lib/components/party/info/VideoTile.svelte b/src/lib/components/party/info/VideoTile.svelte index 73ff2c7e..e00a9736 100644 --- a/src/lib/components/party/info/VideoTile.svelte +++ b/src/lib/components/party/info/VideoTile.svelte @@ -20,9 +20,7 @@ const thumbnailUrl = $derived( videoId ? `https://img.youtube.com/vi/${videoId}/mqdefault.jpg` : null ) - const embedUrl = $derived( - videoId ? `https://www.youtube.com/embed/${videoId}?autoplay=1` : null - ) + const embedUrl = $derived(videoId ? `https://www.youtube.com/embed/${videoId}?autoplay=1` : null) // Fetch video title when videoId changes $effect(() => { @@ -34,10 +32,9 @@ const controller = new AbortController() - fetch( - `https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${id}&format=json`, - { signal: controller.signal } - ) + fetch(`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${id}&format=json`, { + signal: controller.signal + }) .then((res) => (res.ok ? res.json() : null)) .then((data) => { if (data?.title) { @@ -125,7 +122,7 @@ position: relative; width: 100%; aspect-ratio: 16 / 9; - border-radius: $card-corner; + border-radius: $item-corner; overflow: hidden; } diff --git a/src/lib/components/sidebar/DescriptionPane.svelte b/src/lib/components/sidebar/DescriptionPane.svelte index d13eb3bf..4215e030 100644 --- a/src/lib/components/sidebar/DescriptionPane.svelte +++ b/src/lib/components/sidebar/DescriptionPane.svelte @@ -86,6 +86,7 @@ @use '$src/themes/spacing' as *; @use '$src/themes/typography' as *; @use '$src/themes/effects' as *; + @use '$src/themes/layout' as *; .description-pane { display: flex; @@ -96,7 +97,7 @@ .video-embed { margin-bottom: $unit-2x; - border-radius: $unit; + border-radius: $card-corner; overflow: hidden; iframe {