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
@@ -13,17 +13,26 @@
// limitations under the License.
-->
<script lang="ts">
import contact from '@hcengineering/contact'
import { Doc } from '@hcengineering/core'
import { getResource } from '@hcengineering/platform'
import { KeyedAttribute } from '@hcengineering/presentation'
import { CollaborativeAttributeSectionBox } from '@hcengineering/text-editor'
import { AnySvelteComponent } from '@hcengineering/ui'
import { getCollaborationUser } from '../utils'
export let object: Doc
export let key: KeyedAttribute
const user = getCollaborationUser()
let userComponent: AnySvelteComponent | undefined
void getResource(contact.component.CollaborationUserAvatar).then((component) => {
userComponent = component
})
</script>
{#key object._id}
{#key key.key}
<CollaborativeAttributeSectionBox {object} {key} label={key.attr.label} />
<CollaborativeAttributeSectionBox {object} {key} {user} {userComponent} label={key.attr.label} />
{/key}
{/key}
@@ -13,15 +13,24 @@
// limitations under the License.
-->
<script lang="ts">
import contact from '@hcengineering/contact'
import { Doc } from '@hcengineering/core'
import { getResource } from '@hcengineering/platform'
import { KeyedAttribute } from '@hcengineering/presentation'
import { CollaborativeAttributeSectionBox } from '@hcengineering/text-editor'
import { AnySvelteComponent } from '@hcengineering/ui'
import { getCollaborationUser } from '../utils'
export let object: Doc
export let key: KeyedAttribute
const user = getCollaborationUser()
let userComponent: AnySvelteComponent | undefined
void getResource(contact.component.CollaborationUserAvatar).then((component) => {
userComponent = component
})
</script>
{#key object._id}
<CollaborativeAttributeSectionBox {object} {key} label={key.attr.label} />
<CollaborativeAttributeSectionBox {object} {key} {user} {userComponent} label={key.attr.label} />
{/key}