mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-06 17:57:42 +02:00
UBERF-6068 Show collaborators in collaborative editors (#5335)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
@@ -15,8 +15,9 @@
|
||||
//
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Extensions, FocusPosition } from '@tiptap/core'
|
||||
import contact from '@hcengineering/contact'
|
||||
import { Document } from '@hcengineering/document'
|
||||
import { getResource } from '@hcengineering/platform'
|
||||
import {
|
||||
CollaboratorEditor,
|
||||
HeadingsExtension,
|
||||
@@ -25,6 +26,9 @@
|
||||
TodoItemExtension,
|
||||
TodoListExtension
|
||||
} from '@hcengineering/text-editor'
|
||||
import { AnySvelteComponent } from '@hcengineering/ui'
|
||||
import { getCollaborationUser } from '@hcengineering/view-resources'
|
||||
import { Extensions, FocusPosition } from '@tiptap/core'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
|
||||
import ToDoItemNodeView from './node-view/ToDoItemNodeView.svelte'
|
||||
@@ -38,6 +42,12 @@
|
||||
export let overflow: 'auto' | 'none' = 'none'
|
||||
export let editorAttributes: Record<string, string> = {}
|
||||
|
||||
const user = getCollaborationUser()
|
||||
let userComponent: AnySvelteComponent | undefined
|
||||
void getResource(contact.component.CollaborationUserAvatar).then((component) => {
|
||||
userComponent = component
|
||||
})
|
||||
|
||||
let collabEditor: CollaboratorEditor
|
||||
|
||||
export function focus (position?: FocusPosition): void {
|
||||
@@ -83,6 +93,8 @@
|
||||
objectClass={object._class}
|
||||
objectId={object._id}
|
||||
objectAttr="content"
|
||||
{user}
|
||||
{userComponent}
|
||||
{focusIndex}
|
||||
{readonly}
|
||||
{attachFile}
|
||||
|
||||
Reference in New Issue
Block a user