show either attachment or send button, depending on composer value

This commit is contained in:
Bruno Windels 2021-11-05 19:05:35 +01:00
parent c3203fdacd
commit 2f15c9a4a7
2 changed files with 10 additions and 4 deletions

View file

@ -579,8 +579,12 @@ a {
background-position: center; background-position: center;
} }
.MessageComposer_input > button.send:disabled { .MessageComposer.MessageComposer_canSend button.sendFile {
background-color: #E3E8F0; display: none;
}
.MessageComposer:not(.MessageComposer_canSend) button.send {
display: none;
} }
.SettingsBody { .SettingsBody {

View file

@ -65,11 +65,13 @@ export class MessageComposer extends TemplateView {
t.button({ t.button({
className: "send", className: "send",
title: vm.i18n`Send`, title: vm.i18n`Send`,
disabled: vm => !vm.canSend,
onClick: () => this._trySend(), onClick: () => this._trySend(),
}, vm.i18n`Send`), }, vm.i18n`Send`),
]); ]);
return t.div({ className: "MessageComposer" }, [replyPreview, input]); return t.div({ className: {
MessageComposer: true,
MessageComposer_canSend: vm => vm.canSend
} }, [replyPreview, input]);
} }
unmount() { unmount() {