From 8e11da1a2f0fe163e5ea6288d306dbeaffac1e4a Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Wed, 7 Jun 2023 01:52:13 +0700 Subject: [PATCH] UBER-397: Fix panel activity (#3370) Signed-off-by: Andrey Sobolev --- packages/panel/src/components/Panel.svelte | 20 ++++++++------ .../src/components/AttachmentPresenter.svelte | 26 +++++++++++-------- .../src/components/AttachmentStyledBox.svelte | 1 + 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/packages/panel/src/components/Panel.svelte b/packages/panel/src/components/Panel.svelte index 7badb3dcb9..e4c8d21696 100644 --- a/packages/panel/src/components/Panel.svelte +++ b/packages/panel/src/components/Panel.svelte @@ -197,10 +197,12 @@
{#if !withoutActivity} - + {#key object._id} + + {/key} {/if}
{:else} @@ -215,10 +217,12 @@
{#if !withoutActivity} - + {#key object._id} + + {/key} {/if}
diff --git a/plugins/attachment-resources/src/components/AttachmentPresenter.svelte b/plugins/attachment-resources/src/components/AttachmentPresenter.svelte index 83a962fa66..9f05943381 100644 --- a/plugins/attachment-resources/src/components/AttachmentPresenter.svelte +++ b/plugins/attachment-resources/src/components/AttachmentPresenter.svelte @@ -22,6 +22,7 @@ export let value: Attachment export let removable: boolean = false + export let showPreview = false const dispatch = createEventDispatcher() @@ -91,17 +92,20 @@ on:click={clickHandler} on:mousedown={middleClickHandler} > - -
- {iconLabel(value.name)} -
+ {#if showPreview} +
+ {#if !isImage(value.type)}{iconLabel(value.name)}{/if} +
+ {:else} +
+ {iconLabel(value.name)} +
+ {/if}
diff --git a/plugins/attachment-resources/src/components/AttachmentStyledBox.svelte b/plugins/attachment-resources/src/components/AttachmentStyledBox.svelte index 479b7fae0e..946aa6ce31 100644 --- a/plugins/attachment-resources/src/components/AttachmentStyledBox.svelte +++ b/plugins/attachment-resources/src/components/AttachmentStyledBox.svelte @@ -379,6 +379,7 @@ { if (result !== undefined) removeAttachment(attachment) }}