mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 19:11:33 +03:00
Make comments more compact in inbox (#4965)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
b96b32a87a
commit
086c96a63c
@ -38,6 +38,7 @@
|
||||
export let attachmentImageSize: 'x-large' | undefined = undefined
|
||||
export let showLinksPreview = true
|
||||
export let videoPreload = true
|
||||
export let compact = false
|
||||
export let onClick: (() => void) | undefined = undefined
|
||||
export let onReply: (() => void) | undefined = undefined
|
||||
|
||||
@ -70,6 +71,7 @@
|
||||
attachmentImageSize,
|
||||
showLinksPreview,
|
||||
videoPreload,
|
||||
compact,
|
||||
onClick,
|
||||
onReply
|
||||
}}
|
||||
|
@ -15,7 +15,7 @@
|
||||
<script lang="ts">
|
||||
import activity, { ActivityReference } from '@hcengineering/activity'
|
||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||
import { Action, Label } from '@hcengineering/ui'
|
||||
import { Action, Label, ShowMore } from '@hcengineering/ui'
|
||||
import { personAccountByIdStore, personByIdStore } from '@hcengineering/contact-resources'
|
||||
import { Account, Doc, Ref, getCurrentAccount } from '@hcengineering/core'
|
||||
import { Person, type PersonAccount } from '@hcengineering/contact'
|
||||
@ -42,6 +42,7 @@
|
||||
export let excludedActions: string[] = []
|
||||
export let hoverable = true
|
||||
export let hoverStyles: 'borderedHover' | 'filledHover' = 'borderedHover'
|
||||
export let compact = false
|
||||
export let onClick: (() => void) | undefined = undefined
|
||||
export let onReply: (() => void) | undefined = undefined
|
||||
|
||||
@ -145,7 +146,9 @@
|
||||
</span>
|
||||
</svelte:fragment>
|
||||
<svelte:fragment slot="content">
|
||||
<ReferenceContent {value} />
|
||||
<ShowMore limit={compact ? 80 : undefined}>
|
||||
<ReferenceContent {value} />
|
||||
</ShowMore>
|
||||
</svelte:fragment>
|
||||
</ActivityMessageTemplate>
|
||||
|
||||
|
@ -49,6 +49,7 @@
|
||||
export let attachmentImageSize: AttachmentImageSize = 'auto'
|
||||
export let showLinksPreview = true
|
||||
export let videoPreload = true
|
||||
export let compact = false
|
||||
export let onClick: (() => void) | undefined = undefined
|
||||
export let onReply: (() => void) | undefined = undefined
|
||||
|
||||
@ -191,7 +192,7 @@
|
||||
<svelte:fragment slot="content">
|
||||
{#if !isEditing}
|
||||
{#if withShowMore}
|
||||
<ShowMore>
|
||||
<ShowMore limit={compact ? 80 : undefined}>
|
||||
<div class="clear-mins">
|
||||
<MessageViewer message={value.message} />
|
||||
<AttachmentDocList {value} {attachments} imageSize={attachmentImageSize} {videoPreload} />
|
||||
|
@ -142,6 +142,7 @@
|
||||
hoverable={false}
|
||||
{withFlatActions}
|
||||
videoPreload={false}
|
||||
compact
|
||||
onReply={() => {
|
||||
handleReply(displayMessage)
|
||||
}}
|
||||
|
@ -26,7 +26,7 @@
|
||||
import { IntlString, translate } from '@hcengineering/platform'
|
||||
import { createQuery, getClient, MessageViewer } from '@hcengineering/presentation'
|
||||
import notification, { CommonInboxNotification } from '@hcengineering/notification'
|
||||
import { ActionIcon, IconMoreH, Label, showPopup } from '@hcengineering/ui'
|
||||
import { ActionIcon, IconMoreH, Label, ShowMore, showPopup } from '@hcengineering/ui'
|
||||
import { getDocLinkTitle, Menu } from '@hcengineering/view-resources'
|
||||
import { ActivityDocLink } from '@hcengineering/activity-resources'
|
||||
import view from '@hcengineering/view'
|
||||
@ -139,7 +139,9 @@
|
||||
|
||||
<div class="flex-row-center">
|
||||
<div class="customContent">
|
||||
<MessageViewer message={content} />
|
||||
<ShowMore limit={80}>
|
||||
<MessageViewer message={content} />
|
||||
</ShowMore>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user