mirror of
https://github.com/Blah-IM/Weblah.git
synced 2025-05-01 00:31:08 +00:00
refactor: ProfilePicture to use Identity instead of Account
This commit is contained in:
parent
308eef1cff
commit
055f7240df
1 changed files with 8 additions and 8 deletions
|
@ -1,25 +1,25 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Account } from '$lib/accounts/accountStore';
|
import type { BlahIdentityDescription } from '@blah-im/core/identity';
|
||||||
import { AvatarBeam } from 'svelte-boring-avatars';
|
import { AvatarBeam } from 'svelte-boring-avatars';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
account: Account | undefined;
|
identity: BlahIdentityDescription | undefined;
|
||||||
size?: number;
|
size?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
let { account, size = 32 }: Props = $props();
|
let { identity, size = 32 }: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if account}
|
{#if identity}
|
||||||
{#key account.id_key}
|
{#key identity.id_key}
|
||||||
<AvatarBeam {size} name={account.id_key} />
|
<AvatarBeam {size} name={identity.id_key} />
|
||||||
{/key}
|
{/key}
|
||||||
<span class="sr-only">{account.profile.signee.payload.name}</span>
|
<span class="sr-only">{identity.profile.signee.payload.name}</span>
|
||||||
{:else}
|
{:else}
|
||||||
<div
|
<div
|
||||||
class="border-ss-primary box-border size-(--weblah-profile-pic-size) rounded-full border-2 border-dashed"
|
class="border-ss-primary box-border size-(--weblah-profile-pic-size) rounded-full border-2 border-dashed"
|
||||||
style:--weblah-profile-pic-size={`${size}px`}
|
style:--weblah-profile-pic-size={`${size}px`}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
></div>
|
></div>
|
||||||
<span class="sr-only">Account Unavailable</span>
|
<span class="sr-only">Identity Unavailable</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Add table
Reference in a new issue