feat: add profile images
This commit is contained in:
1 parent
74f9a9e8fd
commit
6f80d40c43
4 files changed
+38
-16
No files matched your search
@@ -9,14 +9,27 @@
|
||||
</script>
|
||||
|
||||
{#if profile}
|
||||
<Icon
|
||||
src={UserCircle}
|
||||
mini={selected}
|
||||
size={`${size}`}
|
||||
title={profile.username}
|
||||
class="text-blue-500 flex-shrink-0"
|
||||
style={profile.color
|
||||
? `color: ${profile.color}`
|
||||
: `filter: hue-rotate(${index * 50}deg)`}
|
||||
/>
|
||||
<div style="width: {size}px; height: {size}px;">
|
||||
{#if profile.avatar && !profile.color}
|
||||
<img
|
||||
src="{profile.avatar}?thumbnail=32&format=webp"
|
||||
alt={profile.username}
|
||||
width={size}
|
||||
height={size}
|
||||
class="flex-shrink-0 rounded-full ring-slate-800/50 dark:ring-zinc-200/50"
|
||||
class:ring-2={selected}
|
||||
/>
|
||||
{:else}
|
||||
<Icon
|
||||
src={UserCircle}
|
||||
mini={selected}
|
||||
size={`${size}`}
|
||||
title={profile.username}
|
||||
class="text-blue-500 flex-shrink-0"
|
||||
style={profile.color
|
||||
? `color: ${profile.color}`
|
||||
: `filter: hue-rotate(${index * 50}deg)`}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
Reference in new issue
Block a user