TSK-433 Allow to send attachments without text

This commit is contained in:
Alexander Onnikov 2022-11-22 12:51:29 +07:00
parent 3ae814cf21
commit 1211caf750
No known key found for this signature in database
GPG Key ID: 3320C3B3324E934C
2 changed files with 3 additions and 1 deletions

View File

@ -44,6 +44,7 @@
const dispatch = createEventDispatcher()
export let content: string = ''
export let showSend = true
export let haveAttachment = false
export let withoutTopBorder = false
const client = getClient()
@ -288,7 +289,7 @@
/>
</div>
{#if showSend}
<button class="sendButton" on:click={submit} disabled={isEmpty}>
<button class="sendButton" on:click={submit} disabled={isEmpty && !haveAttachment}>
<div class="icon"><Send size={'medium'} /></div>
</button>
{/if}

View File

@ -219,6 +219,7 @@
{content}
{showSend}
on:message={onMessage}
haveAttachment={attachments.size > 0}
withoutTopBorder={attachments.size > 0}
on:attach={() => {
inputFile.click()