Add small inbox fixes (#5621)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-05-20 16:57:45 +04:00 committed by GitHub
parent a22062cad5
commit f98765af3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 30 additions and 20 deletions

View File

@ -49,7 +49,7 @@
{:else if mark.type === MarkupMarkType.em}
<em><slot /></em>
{:else if mark.type === MarkupMarkType.link}
<a href={attrs.href} target={attrs.target} on:click={handleLink} on:contextmenu|stopPropagation>
<a href={attrs.href} target={attrs.target} on:click|stopPropagation={handleLink} on:contextmenu|stopPropagation>
<slot />
</a>
{:else if mark.type === MarkupMarkType.strike}

View File

@ -13,12 +13,13 @@
// limitations under the License.
-->
<script lang="ts">
import { Label } from '@hcengineering/ui'
import { Label, tooltip } from '@hcengineering/ui'
import { DocNotifyContext } from '@hcengineering/notification'
import activity, { ActivityMessage } from '@hcengineering/activity'
import { createQuery, getClient } from '@hcengineering/presentation'
import { Doc, Ref } from '@hcengineering/core'
import { getDocLinkTitle, ObjectIcon } from '@hcengineering/view-resources'
import { getDocLinkTitle, getDocTitle, ObjectIcon } from '@hcengineering/view-resources'
import { getEmbeddedLabel } from '@hcengineering/platform'
import contact from '@hcengineering/contact'
import ActivityMessagePreview from './ActivityMessagePreview.svelte'
@ -56,13 +57,18 @@
<Label label={activity.string.In} />
</span>
{#if object}
<span class="flex-presenter flex-gap-0-5">
<ObjectIcon
value={object}
size={hierarchy.isDerived(object._class, contact.class.Person) ? 'tiny' : 'small'}
/>
{title}
</span>
{#await getDocTitle(client, object._id, object._class, object) then tooltipLabel}
<span
class="flex-presenter flex-gap-0-5"
use:tooltip={tooltipLabel ? { label: getEmbeddedLabel(tooltipLabel) } : undefined}
>
<ObjectIcon
value={object}
size={hierarchy.isDerived(object._class, contact.class.Person) ? 'tiny' : 'small'}
/>
{title}
</span>
{/await}
{/if}
{/if}
</span>

View File

@ -13,13 +13,14 @@
// limitations under the License.
-->
<script lang="ts">
import { Label } from '@hcengineering/ui'
import { Label, tooltip } from '@hcengineering/ui'
import { DocNotifyContext } from '@hcengineering/notification'
import { getClient } from '@hcengineering/presentation'
import { Class, Doc, Ref } from '@hcengineering/core'
import { getDocLinkTitle, ObjectIcon } from '@hcengineering/view-resources'
import { getDocLinkTitle, getDocTitle, ObjectIcon } from '@hcengineering/view-resources'
import { ChatMessage, ThreadMessage } from '@hcengineering/chunter'
import contact from '@hcengineering/contact'
import { getEmbeddedLabel } from '@hcengineering/platform'
import chunter from '../../plugin'
import ChatMessagePreview from '../chat-message/ChatMessagePreview.svelte'
@ -74,21 +75,24 @@
{:else}
<Label label={chunter.string.Message} />
{/if}
{#if title}
{#if title && object}
<span class="lower">
<Label label={chunter.string.In} />
</span>
<span class="flex-presenter flex-gap-0-5">
{#if object}
{#await getDocTitle(client, object._id, object._class, object) then tooltipLabel}
<span
class="flex-presenter flex-gap-0-5"
use:tooltip={tooltipLabel ? { label: getEmbeddedLabel(tooltipLabel) } : undefined}
>
<ObjectIcon
value={object}
size={hierarchy.isDerived(object._class, contact.class.Person) ? 'tiny' : 'small'}
/>
{/if}
<div class="overflow-label">
{title}
</div>
</span>
<span class="overflow-label">
{title}
</span>
</span>
{/await}
{/if}
</span>
<span class="font-normal">