UBERF-6464: update activity mentions display (#5339)

This commit is contained in:
Kristina
2024-04-16 21:13:18 +07:00
committed by GitHub
parent fb0194af3e
commit de6e0739c2
34 changed files with 300 additions and 194 deletions
@@ -19,6 +19,7 @@
import { Document } from '@hcengineering/document'
import { tooltip } from '@hcengineering/ui'
import { DocNavLink, ObjectMention } from '@hcengineering/view-resources'
import { ObjectPresenterType } from '@hcengineering/view'
import document from '../plugin'
import DocumentIcon from './DocumentIcon.svelte'
@@ -31,12 +32,13 @@
export let breadcrumb: boolean = false
export let maxWidth = ''
export let shouldShowAvatar = true
export let type: ObjectPresenterType = 'link'
</script>
{#if value}
{#if inline}
<ObjectMention object={value} {disabled} {accent} {noUnderline} component={document.component.EditDoc} />
{:else}
{:else if type === 'link'}
<DocNavLink {disabled} object={value} {accent} {noUnderline} component={document.component.EditDoc}>
<div
class="flex-presenter"
@@ -54,5 +56,9 @@
</span>
</div>
</DocNavLink>
{:else if type === 'text'}
<span class="overflow-label" use:tooltip={{ label: document.string.Document }}>
{value.name}
</span>
{/if}
{/if}
+3 -1
View File
@@ -43,6 +43,7 @@ import DocumentSearchIcon from './components/DocumentSearchIcon.svelte'
import NotificationDocumentPresenter from './components/NotificationDocumentPresenter.svelte'
import Move from './components/Move.svelte'
import DocumentToDoPresenter from './components/DocumentToDoPresenter.svelte'
import DocumentIcon from './components/DocumentIcon.svelte'
import document from './plugin'
import { createEmptyDocument, documentTitleProvider, getDocumentLink, getDocumentUrl, resolveLocation } from './utils'
@@ -135,7 +136,8 @@ export default async (): Promise<Resources> => ({
DocumentSearchIcon,
NotificationDocumentPresenter,
Move,
DocumentToDoPresenter
DocumentToDoPresenter,
DocumentIcon
},
completion: {
DocumentQuery: async (