Fix avatars (#302)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2021-11-15 16:51:24 +03:00 committed by GitHub
parent 07629bc91e
commit 03d2100c84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 9 deletions

View File

@ -21,7 +21,6 @@
import { Label, showPopup } from '@anticrm/ui'
import Avatar from './Avatar.svelte'
import UsersPopup from './UsersPopup.svelte'
import IconAvatar from './icons/Avatar.svelte'
import type { Ref, Class } from '@anticrm/core'
import { formatName, Person } from '@anticrm/contact'
@ -66,11 +65,7 @@
}}
>
<button class="focused-button btn" class:selected bind:this={btn}>
{#if selected}
<Avatar size={'medium'} />
{:else}
<IconAvatar />
{/if}
<Avatar avatar={selected ? selected.avatar : undefined} size={'medium'} />
</button>
<div class="selectUser">

View File

@ -24,7 +24,7 @@
</script>
<div class="flex-row-center" on:click>
<Avatar {size} />
<Avatar avatar={value.avatar} {size} />
<div class="flex-col user-info">
{#if subtitle}<div class="subtitle">{subtitle}</div>{/if}
<div class="title">{formatName(value.name)}</div>

View File

@ -24,7 +24,7 @@
<div class="flex-col card-container">
<div class="label">CANDIDATE</div>
<Avatar size={'large'} />
<Avatar avatar={candidate.avatar} size={'large'} />
{#if candidate}
<div class="name">{formatName(candidate.name)}</div>
<div class="description">{candidate.title}</div>

View File

@ -40,7 +40,7 @@
<div class="card-container" {draggable} class:draggable on:dragstart on:dragend>
<div class="content">
<div class="flex-row-center">
<Avatar size={'medium'} />
<Avatar avatar={object.$lookup?.attachedTo?.avatar} size={'medium'} />
<div class="flex-col ml-2">
<div class="fs-title over-underline" on:click={showCandidate}><Label label={formatName(object.$lookup?.attachedTo?.name)} /></div>
<div class="fs-subtitle"><Label label={formatName(object.$lookup?.attachedTo?.title)} /></div>