UBERF-13864: Fix social id presenter (#10035)

This commit is contained in:
Alexey Zinoviev
2025-10-06 17:42:52 +07:00
committed by GitHub
parent c235d0d83d
commit e7ff7c0958
2 changed files with 17 additions and 5 deletions
@@ -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()
@@ -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}
+2 -1
View File
@@ -402,7 +402,8 @@ export default async (): Promise<Resources> => ({
ContactNamePresenter,
PersonIdFilter,
AssigneePopup,
TranslationSettings
TranslationSettings,
SocialIdentityPresenter
},
completion: {
EmployeeQuery: async (