Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
-->
<script lang="ts">
import { onMount } from 'svelte'
import { Icon, Label } from '@hcengineering/ui'
import { Icon, Label, tooltip } from '@hcengineering/ui'
import contact, { SocialIdentity, SocialIdentityProvider } from '@hcengineering/contact'
import { getClient } from '@hcengineering/presentation'

export let value: SocialIdentity
export let socialIdProvider: SocialIdentityProvider | undefined = undefined
export let shouldShowAvatar = true

const client = getClient()

Expand All @@ -33,12 +34,22 @@
</script>

{#if socialIdProvider != null}
<div class="flex-row-center flex-gap-2">
<div class="icon"><Icon size="full" {icon} /></div>
<div class="flex-row-center" class:flex-gap-2={shouldShowAvatar}>
<div
class="icon"
use:tooltip={{
component: Label,
props: { label: socialIdProvider.label }
}}
>
<Icon size="full" {icon} />
</div>

<div class="flex-col flex-gap-0-5">
<div>{value.displayValue ?? value.value}</div>
<div class="type"><Label label={socialIdProvider.label} /></div>
{#if shouldShowAvatar}
<div class="type"><Label label={socialIdProvider.label} /></div>
{/if}
</div>
</div>
{/if}
Expand Down
3 changes: 2 additions & 1 deletion plugins/contact-resources/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ export default async (): Promise<Resources> => ({
ContactNamePresenter,
PersonIdFilter,
AssigneePopup,
TranslationSettings
TranslationSettings,
SocialIdentityPresenter
},
completion: {
EmployeeQuery: async (
Expand Down
Loading