UBER-397: Fix panel activity (#3370)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2023-06-07 01:52:13 +07:00 committed by GitHub
parent 5c9c672038
commit 8e11da1a2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 19 deletions

View File

@ -197,10 +197,12 @@
<div class="popupPanel-body__mobile-content clear-mins" class:max={useMaxWidth}>
<slot />
{#if !withoutActivity}
<Component
is={activity.component.Activity}
props={{ object, showCommenInput: !withoutInput, shouldScroll: embedded, focusIndex: 1000 }}
/>
{#key object._id}
<Component
is={activity.component.Activity}
props={{ object, showCommenInput: !withoutInput, shouldScroll: embedded, focusIndex: 1000 }}
/>
{/key}
{/if}
</div>
{:else}
@ -215,10 +217,12 @@
<div class="popupPanel-body__main-content py-8 clear-mins" class:max={useMaxWidth}>
<slot />
{#if !withoutActivity}
<Component
is={activity.component.Activity}
props={{ object, showCommenInput: !withoutInput, shouldScroll: embedded, focusIndex: 1000 }}
/>
{#key object._id}
<Component
is={activity.component.Activity}
props={{ object, showCommenInput: !withoutInput, shouldScroll: embedded, focusIndex: 1000 }}
/>
{/key}
{/if}
</div>
</Scroller>

View File

@ -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}
>
<!-- <div
class="flex-center icon"
class:svg={value.type === 'image/svg+xml'}
class:image={isImage(value.type)}
style={imgStyle}
>
{#if !isImage(value.type)}{iconLabel(value.name)}{/if}
</div> -->
<div class="flex-center icon">
{iconLabel(value.name)}
</div>
{#if showPreview}
<div
class="flex-center icon"
class:svg={value.type === 'image/svg+xml'}
class:image={isImage(value.type)}
style={imgStyle}
>
{#if !isImage(value.type)}{iconLabel(value.name)}{/if}
</div>
{:else}
<div class="flex-center icon">
{iconLabel(value.name)}
</div>
{/if}
</a>
<div class="flex-col info-container">
<div class="name">

View File

@ -379,6 +379,7 @@
<AttachmentPresenter
value={attachment}
removable
showPreview
on:remove={(result) => {
if (result !== undefined) removeAttachment(attachment)
}}