diff --git a/plugins/activity-resources/src/components/TxView.svelte b/plugins/activity-resources/src/components/TxView.svelte index 9ceff3a6b6..c634a30751 100644 --- a/plugins/activity-resources/src/components/TxView.svelte +++ b/plugins/activity-resources/src/components/TxView.svelte @@ -239,7 +239,7 @@ {#if viewlet && viewlet.component && viewlet.display !== 'inline'}
- + {#if tx.collectionAttribute !== undefined && tx.txes.length > 0}
diff --git a/plugins/activity-resources/src/components/TxViewTx.svelte b/plugins/activity-resources/src/components/TxViewTx.svelte index 46735fb648..cb4d26076e 100644 --- a/plugins/activity-resources/src/components/TxViewTx.svelte +++ b/plugins/activity-resources/src/components/TxViewTx.svelte @@ -17,27 +17,35 @@ } -{#each filterTx([tx, ...tx.txes], core.class.TxCreateDoc) as ctx, i} - {#if i === 0} -
- {/if} -
- {#if typeof viewlet?.component === 'string'} - - {:else} - +
+ {#each filterTx([tx, ...tx.txes], core.class.TxCreateDoc) as ctx, i} + {#if i === 0} +
{/if} -
-{/each} -{#each filterTx([tx, ...tx.txes], core.class.TxRemoveDoc) as ctx, i} - {#if i === 0} -
- {/if} -
- {#if typeof viewlet?.component === 'string'} - - {:else} - + {#if typeof viewlet?.component === 'string'} + + {:else} + + {/if} + {/each} + {#each filterTx([tx, ...tx.txes], core.class.TxRemoveDoc) as ctx, i} + {#if i === 0} +
{/if} -
-{/each} + {#if typeof viewlet?.component === 'string'} + + {:else} + + {/if} + {/each} +
+ + diff --git a/plugins/activity-resources/src/components/utils.ts b/plugins/activity-resources/src/components/utils.ts index 4f00425a87..d7ac4c516d 100644 --- a/plugins/activity-resources/src/components/utils.ts +++ b/plugins/activity-resources/src/components/utils.ts @@ -16,7 +16,8 @@ export type TxDisplayViewlet = async function createPseudoViewlet ( client: TxOperations, dtx: DisplayTx, - label: IntlString + label: IntlString, + display: 'inline' | 'content' | 'emphasized' = 'inline' ): Promise { const doc = dtx.doc if (doc === undefined) { @@ -36,7 +37,7 @@ async function createPseudoViewlet ( const presenter = await getObjectPresenter(client, doc._class, { key: 'doc-presenter' }) if (presenter !== undefined) { return { - display: 'inline', + display, icon: docClass.icon ?? activity.icon.Activity, label: label, labelParams: { _class: trLabel, collection: dtx.collectionAttribute?.label !== undefined ? await translate(dtx.collectionAttribute?.label, {}) : '' }, @@ -90,7 +91,7 @@ async function checkInlineViewlets ( ): Promise<{ viewlet: TxDisplayViewlet, model: AttributeModel[] }> { if (dtx.collectionAttribute !== undefined && dtx.txes.length > 0) { // Check if we have a class presenter we could have a pseudo viewlet based on class presenter. - viewlet = await createPseudoViewlet(client, dtx, activity.string.CollectionUpdated) + viewlet = await createPseudoViewlet(client, dtx, activity.string.CollectionUpdated, 'content') } else if (dtx.tx._class === core.class.TxCreateDoc) { // Check if we have a class presenter we could have a pseudo viewlet based on class presenter. viewlet = await createPseudoViewlet(client, dtx, activity.string.DocCreated) diff --git a/plugins/contact-resources/src/components/ChannelsView.svelte b/plugins/contact-resources/src/components/ChannelsView.svelte index ee98ab90bc..e8b4e050bf 100644 --- a/plugins/contact-resources/src/components/ChannelsView.svelte +++ b/plugins/contact-resources/src/components/ChannelsView.svelte @@ -103,20 +103,20 @@ class="channels {length}" class:one={displayItems?.length === 1} class:reverse - class:small-gap={size === 'small'} - class:normal-gap={size !== 'small'} > {#each displayItems as item,i} - - { - dispatch('click', item) - }} - /> - +
+ + { + dispatch('click', item) + }} + /> + +
{/each}
\ No newline at end of file diff --git a/plugins/tags-resources/src/components/TagsEditor.svelte b/plugins/tags-resources/src/components/TagsEditor.svelte index d1a744d014..9093af6e25 100644 --- a/plugins/tags-resources/src/components/TagsEditor.svelte +++ b/plugins/tags-resources/src/components/TagsEditor.svelte @@ -17,7 +17,7 @@ import { translate } from '@anticrm/platform' import { KeyedAttribute } from '@anticrm/presentation' import { TagElement, TagReference } from '@anticrm/tags' - import { CircleButton, IconAdd, IconClose, Label, showPopup, Tooltip } from '@anticrm/ui' + import { CircleButton, IconAdd, IconClose, Label, ShowMore, showPopup, Tooltip } from '@anticrm/ui' import { createEventDispatcher } from 'svelte' import tags from '../plugin' import TagItem from './TagItem.svelte' @@ -74,34 +74,36 @@
{/if} -
-
-
- - - -
-
- {#if items.length === 0} + +
+
+
+ + + +
+
+ {#if items.length === 0} {#if keyLabel} -
-
+
+
{/if} - {/if} - {#each items as tag} + {/if} + {#each items as tag} { - removeTag(tag._id) - }} + {tag} + element={elements.get(tag.tag)} + action={IconClose} + on:action={() => { + removeTag(tag._id) + }} /> - {/each} + {/each} +
-
+