Fix AddAttachment control

Signed-off-by: Anna No <anna.no@xored.com>
This commit is contained in:
Anna No 2022-04-13 10:44:13 +07:00
parent b09466453d
commit 543e7616f8
No known key found for this signature in database
GPG Key ID: 08C11FFC23177C87
3 changed files with 33 additions and 34 deletions

View File

@ -31,9 +31,7 @@
<div>
{#if $$slots.control}
<div on:click={openFile}>
<slot name="control"/>
</div>
<slot name="control" click={openFile}/>
{:else}
<CircleButton
icon={IconAdd}

View File

@ -46,37 +46,36 @@
objectId={object._id}
space={object.space}>
<div class:opacity-overlay={dragoverAttachment}>
<div class="flex-between mb-4">
<div class="flex-col">
<div class="fs-title cursor-pointer" on:click={showCard}>{object.title}</div>
</div>
<div class="flex-row-center">
<div class="mr-2">
<Component is={notification.component.NotificationPresenter} props={{ value: object }} />
<div class="flex-between mb-4">
<div class="flex-col">
<div class="fs-title cursor-pointer" on:click={showCard}>{object.title}</div>
</div>
<div class="flex-row-center">
<div class="mr-2">
<Component is={notification.component.NotificationPresenter} props={{ value: object }} />
</div>
<ActionIcon
label={board.string.More}
action={(evt) => {
showMenu(evt)
}}
icon={IconMoreH}
size="small" />
</div>
</div>
<div class="flex-between">
<div class="flex-row-center">
{#if (object.attachments ?? 0) > 0}
<div class="step-lr75">
<AttachmentsPresenter value={object} />
</div>
{/if}
{#if (object.comments ?? 0) > 0}
<div class="step-lr75">
<CommentsPresenter value={object} />
</div>
{/if}
</div>
<ActionIcon
label={board.string.More}
action={(evt) => {
showMenu(evt)
}}
icon={IconMoreH}
size="small" />
</div>
</div>
<div class="flex-between">
<div class="flex-row-center">
{#if (object.attachments ?? 0) > 0}
<div class="step-lr75">
<AttachmentsPresenter value={object} />
</div>
{/if}
{#if (object.comments ?? 0) > 0}
<div class="step-lr75">
<CommentsPresenter value={object} />
</div>
{/if}
</div>
</div>
</div>
</AttachmentDroppable>

View File

@ -54,7 +54,9 @@
{/each}
<div class="mt-2">
<AddAttachment bind:inputFile objectClass={value._class} objectId={value._id} space={value.space}>
<Button label={board.string.AddAttachment} kind="no-border" slot="control" />
<svelte:fragment slot="control" let:click>
<Button label={board.string.AddAttachment} kind="no-border" on:click={click}/>
</svelte:fragment>
</AddAttachment>
</div>
</div>