UBERF-6068 Show collaborators in collaborative editors (#5335)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2024-04-15 18:11:47 +07:00
committed by GitHub
parent 07ff2a9d3c
commit 2220d7e19e
24 changed files with 296 additions and 69 deletions
@@ -14,13 +14,14 @@
-->
<script lang="ts">
import attachment, { Attachment } from '@hcengineering/attachment'
import contact from '@hcengineering/contact'
import { Account, Doc, Ref, generateId } from '@hcengineering/core'
import { IntlString, setPlatformStatus, unknownError } from '@hcengineering/platform'
import { IntlString, getResource, setPlatformStatus, unknownError } from '@hcengineering/platform'
import { KeyedAttribute, createQuery, getClient } from '@hcengineering/presentation'
import textEditor, { AttachIcon, CollaborativeAttributeBox, RefAction } from '@hcengineering/text-editor'
import { navigate } from '@hcengineering/ui'
import { AnySvelteComponent, navigate } from '@hcengineering/ui'
import view from '@hcengineering/view'
import { getObjectLinkFragment } from '@hcengineering/view-resources'
import { getCollaborationUser, getObjectLinkFragment } from '@hcengineering/view-resources'
import AttachmentsGrid from './AttachmentsGrid.svelte'
import { uploadFile } from '../utils'
import { defaultRefActions, getModelRefActions } from '@hcengineering/text-editor/src/components/editor/actions'
@@ -38,6 +39,12 @@
const client = getClient()
const user = getCollaborationUser()
let userComponent: AnySvelteComponent | undefined
void getResource(contact.component.CollaborationUserAvatar).then((component) => {
userComponent = component
})
let editor: CollaborativeAttributeBox
let refActions: RefAction[] = []
@@ -235,6 +242,8 @@
bind:this={editor}
{object}
{key}
{user}
{userComponent}
{focusIndex}
{placeholder}
{boundary}