Merge pull request #2391 from hcengineering/tsk-433-comment-without-text

TSK-433 Allow to send attachments without text
This commit is contained in:
Alexander Onnikov 2022-11-23 15:52:57 +07:00 committed by GitHub
commit 13ba272718
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -44,6 +44,7 @@
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
export let content: string = '' export let content: string = ''
export let showSend = true export let showSend = true
export let haveAttachment = false
export let withoutTopBorder = false export let withoutTopBorder = false
const client = getClient() const client = getClient()
@ -288,7 +289,7 @@
/> />
</div> </div>
{#if showSend} {#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> <div class="icon"><Send size={'medium'} /></div>
</button> </button>
{/if} {/if}

View File

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