mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-23 20:13:20 +00:00
Fix baclink presenter in activity (#4452)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
3a22ee1b96
commit
04bb92da07
@ -29,7 +29,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<span class="text-sm" {title}>
|
<span class="text-sm" {title}>
|
||||||
<DocNavLink {object} component={panelComponent} shrink={0}>
|
<DocNavLink {object} component={panelComponent} shrink={0}>
|
||||||
<span class="overflow-label select-text">{title}</span>
|
<span class="overflow-label select-text" class:withoutMargin={!preposition}>{title}</span>
|
||||||
</DocNavLink>
|
</DocNavLink>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@ -38,5 +38,9 @@
|
|||||||
margin-left: 0.25rem;
|
margin-left: 0.25rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1.25rem;
|
line-height: 1.25rem;
|
||||||
|
|
||||||
|
&.withoutMargin {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -79,7 +79,9 @@
|
|||||||
{#if doc && value}
|
{#if doc && value}
|
||||||
<span class="text-sm lower"><Label label={chunter.string.In} /></span>
|
<span class="text-sm lower"><Label label={chunter.string.In} /></span>
|
||||||
<DocNavLink object={doc} component={docPanel?.component ?? view.component.EditDoc} shrink={0}>
|
<DocNavLink object={doc} component={docPanel?.component ?? view.component.EditDoc} shrink={0}>
|
||||||
<span class="text-sm"><BacklinkReference {value} inline={false} /></span>
|
<span class="text-sm"
|
||||||
|
><BacklinkReference {value} inline={hierarchy.isDerived(doc._class, chunter.class.ChatMessage)} /></span
|
||||||
|
>
|
||||||
</DocNavLink>
|
</DocNavLink>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
import { createQuery, getClient, MessageViewer } from '@hcengineering/presentation'
|
import { createQuery, getClient, MessageViewer } from '@hcengineering/presentation'
|
||||||
import core from '@hcengineering/core/lib/component'
|
import core from '@hcengineering/core/lib/component'
|
||||||
import { AttachmentDocList } from '@hcengineering/attachment-resources'
|
import { AttachmentDocList } from '@hcengineering/attachment-resources'
|
||||||
import { LinkPresenter } from '@hcengineering/view-resources'
|
import { getDocLinkTitle, LinkPresenter } from '@hcengineering/view-resources'
|
||||||
import { Action, Button, IconEdit, ShowMore } from '@hcengineering/ui'
|
import { Action, Button, IconEdit, ShowMore } from '@hcengineering/ui'
|
||||||
import view from '@hcengineering/view'
|
import view from '@hcengineering/view'
|
||||||
import activity, { DisplayActivityMessage } from '@hcengineering/activity'
|
import activity, { DisplayActivityMessage } from '@hcengineering/activity'
|
||||||
import { ActivityMessageTemplate } from '@hcengineering/activity-resources'
|
import { ActivityDocLink, ActivityMessageTemplate } from '@hcengineering/activity-resources'
|
||||||
import chunter, { ChatMessage, ChatMessageViewlet } from '@hcengineering/chunter'
|
import chunter, { ChatMessage, ChatMessageViewlet } from '@hcengineering/chunter'
|
||||||
|
|
||||||
import ChatMessageHeader from './ChatMessageHeader.svelte'
|
import ChatMessageHeader from './ChatMessageHeader.svelte'
|
||||||
@ -43,6 +43,7 @@
|
|||||||
export let excludedActions: string[] = []
|
export let excludedActions: string[] = []
|
||||||
export let withFlatActions: boolean = true
|
export let withFlatActions: boolean = true
|
||||||
export let hoverable = true
|
export let hoverable = true
|
||||||
|
export let inline = false
|
||||||
export let onClick: (() => void) | undefined = undefined
|
export let onClick: (() => void) | undefined = undefined
|
||||||
export let onReply: (() => void) | undefined = undefined
|
export let onReply: (() => void) | undefined = undefined
|
||||||
|
|
||||||
@ -150,7 +151,16 @@
|
|||||||
let refInput: ChatMessageInput
|
let refInput: ChatMessageInput
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if value}
|
{#if inline && object}
|
||||||
|
{#await getDocLinkTitle(client, object._id, object._class, object) then title}
|
||||||
|
<ActivityDocLink
|
||||||
|
{object}
|
||||||
|
{title}
|
||||||
|
panelComponent={hierarchy.classHierarchyMixin(object._class, view.mixin.ObjectPanel)?.component ??
|
||||||
|
view.component.EditDoc}
|
||||||
|
/>
|
||||||
|
{/await}
|
||||||
|
{:else if value && !inline}
|
||||||
<ActivityMessageTemplate
|
<ActivityMessageTemplate
|
||||||
message={value}
|
message={value}
|
||||||
{viewlet}
|
{viewlet}
|
||||||
|
Loading…
Reference in New Issue
Block a user