diff --git a/src/lib/CardsHeader.svelte b/src/lib/CardsHeader.svelte index d873eb81..fe09f7bc 100644 --- a/src/lib/CardsHeader.svelte +++ b/src/lib/CardsHeader.svelte @@ -5,6 +5,8 @@ export let item: any; + let icon_url = item.avatar_url ? item.avatar_url : item.icon ? item.icon : default_avatar; + let avatarOpen = false; const toggleAvatarModal = () => (avatarOpen = !avatarOpen); @@ -22,15 +24,15 @@ {#if loading}
{/if} - {#if item && item.avatar_url} - {if (event.key === "Enter") avatarOpen = true}} on:click={toggleAvatarModal} class="rounded-circle avatar" src={item.avatar_url} alt="Icon" /> + {#if item && (item.avatar_url || item.icon)} + {if (event.key === "Enter") avatarOpen = true}} on:click={toggleAvatarModal} class="rounded-circle avatar" src={icon_url} alt="Icon" /> {:else} your system avatar (default) {/if}
- Your system avatar + Your system avatar
\ No newline at end of file