From 128329804bab61b4de1816346b251fd9cd35856c Mon Sep 17 00:00:00 2001 From: Kristina Date: Wed, 17 Apr 2024 17:14:47 +0400 Subject: [PATCH] Add some chat/activity fixes (#5387) --- models/document/src/index.ts | 5 ++++ .../src/components/DirectIcon.svelte | 15 ++++++++++-- .../src/components/DmPresenter.svelte | 24 ++++++++++++------- .../chat/navigator/ChatNavGroup.svelte | 7 +++--- .../chat/navigator/ChatNavItem.svelte | 9 ++++++- .../components/DocReferencePresenter.svelte | 1 - 6 files changed, 46 insertions(+), 15 deletions(-) diff --git a/models/document/src/index.ts b/models/document/src/index.ts index 9b28d92f2d..e0b173166e 100644 --- a/models/document/src/index.ts +++ b/models/document/src/index.ts @@ -394,6 +394,11 @@ function defineDocument (builder: Builder): void { titleProvider: document.function.DocumentTitleProvider }) + builder.createDoc(activity.class.ActivityExtension, core.space.Model, { + ofClass: document.class.Document, + components: { input: chunter.component.ChatMessageInput } + }) + // Search builder.createDoc( diff --git a/plugins/chunter-resources/src/components/DirectIcon.svelte b/plugins/chunter-resources/src/components/DirectIcon.svelte index 6bf82da9c3..dd3fd19108 100644 --- a/plugins/chunter-resources/src/components/DirectIcon.svelte +++ b/plugins/chunter-resources/src/components/DirectIcon.svelte @@ -35,6 +35,12 @@ getDmPersons(client, value).then((res) => { persons = res }) + + let avatarSize = size + + $: if (size === 'small') { + avatarSize = 'tiny' + } {#if persons.length === 0 && value} @@ -42,7 +48,7 @@ {/if} {#if persons.length === 1} - + {/if} {#if persons.length > 1 && size === 'medium'} @@ -64,7 +70,12 @@ {/if} {#if persons.length > 1 && size !== 'medium'} - _id)} {size} limit={visiblePersons} /> + _id)} + size={avatarSize} + limit={visiblePersons} + /> {/if}