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; return success;
} }
sendAttachment() {
this._roomVM._sendFile();
}
get canSend() { get canSend() {
return !this._isEmpty; return !this._isEmpty;
} }

View file

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