forked from mystiq/hydrogen-web
show encrypted status of room
This commit is contained in:
parent
0e3084cce3
commit
843e3e6b1c
3 changed files with 10 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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),
|
||||
});
|
||||
|
|
|
@ -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…`)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue