diff --git a/src/domain/session/room/RoomViewModel.js b/src/domain/session/room/RoomViewModel.js index a2ea5f66..ab453e01 100644 --- a/src/domain/session/room/RoomViewModel.js +++ b/src/domain/session/room/RoomViewModel.js @@ -90,6 +90,10 @@ export class RoomViewModel extends ViewModel { return this._timelineVM; } + get isEncrypted() { + return this._room.isEncrypted; + } + get error() { if (this._timelineError) { return `Something went wrong loading the timeline: ${this._timelineError.message}`; @@ -147,6 +151,10 @@ class ComposerViewModel extends ViewModel { this._isEmpty = true; } + get isEncrypted() { + return this._roomVM.isEncrypted; + } + sendMessage(message) { const success = this._roomVM._sendMessage(message); if (success) { diff --git a/src/ui/web/session/room/MessageComposer.js b/src/ui/web/session/room/MessageComposer.js index e07e77e3..88d7f903 100644 --- a/src/ui/web/session/room/MessageComposer.js +++ b/src/ui/web/session/room/MessageComposer.js @@ -24,7 +24,7 @@ export class MessageComposer extends TemplateView { render(t, vm) { this._input = t.input({ - placeholder: "Send a message ...", + placeholder: vm.isEncrypted ? "Send an encrypted message…" : "Send a message…", onKeydown: e => this._onKeyDown(e), onInput: () => vm.setInput(this._input.value), }); diff --git a/src/ui/web/session/room/TimelineLoadingView.js b/src/ui/web/session/room/TimelineLoadingView.js index 88d07f43..503c2243 100644 --- a/src/ui/web/session/room/TimelineLoadingView.js +++ b/src/ui/web/session/room/TimelineLoadingView.js @@ -21,7 +21,7 @@ export class TimelineLoadingView extends TemplateView { render(t, vm) { return t.div({className: "TimelineLoadingView"}, [ spinner(t), - t.div(vm.i18n`Loading messages…`) + t.div(vm.isEncrypted ? vm.i18n`Loading encrypted messages…` : vm.i18n`Loading messages…`) ]); } }