mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-27 20:14:57 +02:00
UBERF-6068 Show collaborators in collaborative editors (#5335)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user