Initial meeting minutes (#7111)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-11-07 17:08:15 +07:00
committed by GitHub
parent 1ce18226ab
commit e34f59ca37
111 changed files with 2543 additions and 589 deletions
@@ -13,7 +13,7 @@
// limitations under the License.
-->
<script lang="ts">
import { DisplayActivityMessage, ActivityMessageViewType } from '@hcengineering/activity'
import { DisplayActivityMessage, ActivityMessageViewType, ActivityMessage } from '@hcengineering/activity'
import view from '@hcengineering/view'
import { getClient } from '@hcengineering/presentation'
import { Action, Component } from '@hcengineering/ui'
@@ -41,6 +41,7 @@
export let compact = false
export let readonly = false
export let onClick: (() => void) | undefined = undefined
export let onReply: ((message: ActivityMessage) => void) | undefined = undefined
const client = getClient()
const hierarchy = client.getHierarchy()
@@ -74,7 +75,8 @@
type,
compact,
readonly,
onClick
onClick,
onReply
}}
/>
{/if}
@@ -16,7 +16,8 @@
import activity, {
ActivityMessageViewlet,
DisplayActivityMessage,
ActivityMessageViewType
ActivityMessageViewType,
ActivityMessage
} from '@hcengineering/activity'
import { Person } from '@hcengineering/contact'
import { Avatar, SystemAvatar } from '@hcengineering/contact-resources'
@@ -63,6 +64,7 @@
export let excludedActions: Ref<ViewAction>[] = []
export let readonly: boolean = false
export let onClick: (() => void) | undefined = undefined
export let onReply: ((message: ActivityMessage) => void) | undefined = undefined
export let socialIcon: Asset | undefined = undefined
@@ -146,9 +148,14 @@
if (readonly) return
const showCustomPopup = !isTextClicked(event.target as HTMLElement, event.clientX, event.clientY)
if (showCustomPopup) {
showMenu(event, { object: message, baseMenuClass: activity.class.ActivityMessage, excludedActions }, () => {
isActionsOpened = false
})
const overrides = onReply ? new Map([[activity.action.Reply, onReply]]) : []
showMenu(
event,
{ object: message, baseMenuClass: activity.class.ActivityMessage, excludedActions, overrides },
() => {
isActionsOpened = false
}
)
isActionsOpened = true
}
}
@@ -247,7 +254,7 @@
<slot name="content" {readonly} />
{#if !hideFooter}
<Replies {embedded} object={message} />
<Replies {embedded} object={message} {onReply} />
{/if}
<ReactionsPresenter object={message} {readonly} />
{#if parentMessage && showEmbedded}
@@ -263,6 +270,7 @@
{actions}
{withActionMenu}
{excludedActions}
{onReply}
onOpen={handleActionsOpened}
onClose={handleActionsClosed}
/>