mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
fix: correctly fall back to proxy avatar
This commit is contained in:
parent
913805f336
commit
debfc46776
1 changed files with 2 additions and 4 deletions
|
|
@ -39,8 +39,6 @@
|
|||
else icon_url = item.webhook_avatar_url ?? default_avatar
|
||||
}
|
||||
|
||||
$: icon_url_resized = icon_url ? resizeMedia(icon_url) : default_avatar
|
||||
|
||||
let avatarOpen = false;
|
||||
const toggleAvatarModal = () => (avatarOpen = !avatarOpen);
|
||||
|
||||
|
|
@ -65,8 +63,8 @@
|
|||
<span bind:this={nameElement} style="vertical-align: middle;"><AwaitHtml htmlPromise={htmlNamePromise} /> ({item.id})</span>
|
||||
</div>
|
||||
<div style="margin-left: auto;">
|
||||
{#if item && (item.avatar_url || item.icon)}
|
||||
<img tabindex={0} on:keydown|stopPropagation={(event) => {if (event.key === "Enter") {avatarOpen = true}}} on:click|stopPropagation={toggleAvatarModal} class="rounded-circle avatar" src={icon_url_resized} alt={altText} />
|
||||
{#if item && (item.avatar_url || item.webhook_avatar_url || item.icon)}
|
||||
<img tabindex={0} on:keydown|stopPropagation={(event) => {if (event.key === "Enter") {avatarOpen = true}}} on:click|stopPropagation={toggleAvatarModal} class="rounded-circle avatar" src={icon_url} alt={altText} />
|
||||
{:else}
|
||||
<img class="rounded-circle avatar" src={default_avatar} alt="icon (default)" tabindex={0} />
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue