From af12ac43be57bd3c9201b756660a375b294cc67f Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sun, 11 May 2025 19:47:38 -0400 Subject: [PATCH] [skip ci] Display YouTube profile in web app --- playlet-web/src/lib/ProfileAvatar.svelte | 10 ++++++--- playlet-web/src/lib/ProfilesDialog.svelte | 26 +++++++++++++++-------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/playlet-web/src/lib/ProfileAvatar.svelte b/playlet-web/src/lib/ProfileAvatar.svelte index 84ffb88d..baa4e4f5 100644 --- a/playlet-web/src/lib/ProfileAvatar.svelte +++ b/playlet-web/src/lib/ProfileAvatar.svelte @@ -19,9 +19,13 @@ class="rounded-full w-8 ring ring-offset-base-100 ring-offset-2" style="background-color: {currentProfile.color}" > - {currentProfile.username.substring(0, 1).toUpperCase()} + {#if currentProfile.type === "youtube" && currentProfile.thumbnail} + Avatar + {:else} + {currentProfile.username.substring(0, 1).toUpperCase()} + {/if} {:else} diff --git a/playlet-web/src/lib/ProfilesDialog.svelte b/playlet-web/src/lib/ProfilesDialog.svelte index c2d66f4c..84cf367f 100644 --- a/playlet-web/src/lib/ProfilesDialog.svelte +++ b/playlet-web/src/lib/ProfilesDialog.svelte @@ -98,9 +98,13 @@ : ''} " style="background-color: {profile.color}" > - {profile.username.substring(0, 1).toUpperCase()} + {#if profile.type === "youtube" && profile.thumbnail} + Avatar + {:else} + {profile.username.substring(0, 1).toUpperCase()} + {/if} @@ -109,12 +113,16 @@ {profile.username}
- {profile.serverUrl} + {#if profile.type === "youtube"} +
YouTube
+ {:else} + {profile.serverUrl} + {/if}