hook up UI

This commit is contained in:
Bruno Windels 2020-11-11 11:47:05 +01:00
parent 7088b2cdc8
commit 65d02072c8
2 changed files with 9 additions and 0 deletions

View File

@ -204,6 +204,10 @@ class ComposerViewModel extends ViewModel {
return success;
}
sendAttachment() {
this._roomVM._sendFile();
}
get canSend() {
return !this._isEmpty;
}

View File

@ -30,6 +30,11 @@ export class MessageComposer extends TemplateView {
});
return t.div({className: "MessageComposer"}, [
this._input,
t.button({
className: "attach",
title: vm.i18n`Attach`,
onClick: () => vm.sendAttachment(),
}, vm.i18n`Attach`),
t.button({
className: "send",
title: vm.i18n`Send`,