Rename room info to room details everywhere
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
f917730a21
commit
f3f1436bb0
4 changed files with 15 additions and 15 deletions
|
@ -17,7 +17,7 @@ limitations under the License.
|
||||||
|
|
||||||
import {LeftPanelViewModel} from "./leftpanel/LeftPanelViewModel.js";
|
import {LeftPanelViewModel} from "./leftpanel/LeftPanelViewModel.js";
|
||||||
import {RoomViewModel} from "./room/RoomViewModel.js";
|
import {RoomViewModel} from "./room/RoomViewModel.js";
|
||||||
import {RoomInfoViewModel} from "./rightpanel/RoomInfoViewModel.js";
|
import {RoomDetailsViewModel} from "./rightpanel/RoomDetailsViewModel.js";
|
||||||
import {UnknownRoomViewModel} from "./room/UnknownRoomViewModel.js";
|
import {UnknownRoomViewModel} from "./room/UnknownRoomViewModel.js";
|
||||||
import {InviteViewModel} from "./room/InviteViewModel.js";
|
import {InviteViewModel} from "./room/InviteViewModel.js";
|
||||||
import {LightboxViewModel} from "./room/LightboxViewModel.js";
|
import {LightboxViewModel} from "./room/LightboxViewModel.js";
|
||||||
|
@ -63,7 +63,7 @@ export class SessionViewModel extends ViewModel {
|
||||||
if (!this._gridViewModel) {
|
if (!this._gridViewModel) {
|
||||||
this._updateRoom(roomId);
|
this._updateRoom(roomId);
|
||||||
}
|
}
|
||||||
this._toggleRoomInformationPanel();
|
this._toggleRoomDetailsPanel();
|
||||||
}));
|
}));
|
||||||
if (!this._gridViewModel) {
|
if (!this._gridViewModel) {
|
||||||
this._updateRoom(currentRoomId.get());
|
this._updateRoom(currentRoomId.get());
|
||||||
|
@ -82,8 +82,8 @@ export class SessionViewModel extends ViewModel {
|
||||||
this._updateLightbox(lightbox.get());
|
this._updateLightbox(lightbox.get());
|
||||||
|
|
||||||
const details = this.navigation.observe("details");
|
const details = this.navigation.observe("details");
|
||||||
this.track(details.subscribe(() => this._toggleRoomInformationPanel()));
|
this.track(details.subscribe(() => this._toggleRoomDetailsPanel()));
|
||||||
this._toggleRoomInformationPanel();
|
this._toggleRoomDetailsPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
get id() {
|
get id() {
|
||||||
|
@ -118,8 +118,8 @@ export class SessionViewModel extends ViewModel {
|
||||||
return this._roomViewModelObservable?.get();
|
return this._roomViewModelObservable?.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
get roomInfoViewModel() {
|
get roomDetailsViewModel() {
|
||||||
return this._roomInfoViewModel;
|
return this._roomDetailsViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateGrid(roomIds) {
|
_updateGrid(roomIds) {
|
||||||
|
@ -256,14 +256,14 @@ export class SessionViewModel extends ViewModel {
|
||||||
return room;
|
return room;
|
||||||
}
|
}
|
||||||
|
|
||||||
_toggleRoomInformationPanel() {
|
_toggleRoomDetailsPanel() {
|
||||||
this._roomInfoViewModel = this.disposeTracked(this._roomInfoViewModel);
|
this._roomDetailsViewModel = this.disposeTracked(this._roomDetailsViewModel);
|
||||||
const enable = !!this.navigation.path.get("details")?.value;
|
const enable = !!this.navigation.path.get("details")?.value;
|
||||||
if (enable) {
|
if (enable) {
|
||||||
const room = this._roomFromNavigation();
|
const room = this._roomFromNavigation();
|
||||||
this._roomInfoViewModel = this.track(new RoomInfoViewModel(this.childOptions({ room })));
|
this._roomDetailsViewModel = this.track(new RoomDetailsViewModel(this.childOptions({ room })));
|
||||||
}
|
}
|
||||||
this.emitChange("roomInfoViewModel");
|
this.emitChange("roomDetailsViewModel");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {ViewModel} from "../../ViewModel.js";
|
import {ViewModel} from "../../ViewModel.js";
|
||||||
import {avatarInitials, getIdentifierColorNumber, getAvatarHttpUrl} from "../../avatar.js";
|
import {avatarInitials, getIdentifierColorNumber, getAvatarHttpUrl} from "../../avatar.js";
|
||||||
|
|
||||||
export class RoomInfoViewModel extends ViewModel {
|
export class RoomDetailsViewModel extends ViewModel {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
super(options);
|
super(options);
|
||||||
this._room = options.room;
|
this._room = options.room;
|
|
@ -25,7 +25,7 @@ import {StaticView} from "../general/StaticView.js";
|
||||||
import {SessionStatusView} from "./SessionStatusView.js";
|
import {SessionStatusView} from "./SessionStatusView.js";
|
||||||
import {RoomGridView} from "./RoomGridView.js";
|
import {RoomGridView} from "./RoomGridView.js";
|
||||||
import {SettingsView} from "./settings/SettingsView.js";
|
import {SettingsView} from "./settings/SettingsView.js";
|
||||||
import { RoomInfoView } from "./rightpanel/RoomInfoView.js";
|
import { RoomDetailsView } from "./rightpanel/RoomDetailsView.js";
|
||||||
|
|
||||||
export class SessionView extends TemplateView {
|
export class SessionView extends TemplateView {
|
||||||
render(t, vm) {
|
render(t, vm) {
|
||||||
|
@ -33,7 +33,7 @@ export class SessionView extends TemplateView {
|
||||||
className: {
|
className: {
|
||||||
"SessionView": true,
|
"SessionView": true,
|
||||||
"middle-shown": vm => !!vm.activeMiddleViewModel,
|
"middle-shown": vm => !!vm.activeMiddleViewModel,
|
||||||
"right-shown": vm => !!vm.roomInfoViewModel
|
"right-shown": vm => !!vm.roomDetailsViewModel
|
||||||
},
|
},
|
||||||
}, [
|
}, [
|
||||||
t.view(new SessionStatusView(vm.sessionStatusViewModel)),
|
t.view(new SessionStatusView(vm.sessionStatusViewModel)),
|
||||||
|
@ -55,7 +55,7 @@ export class SessionView extends TemplateView {
|
||||||
return new StaticView(t => t.div({className: "room-placeholder"}, t.h2(vm.i18n`Choose a room on the left side.`)));
|
return new StaticView(t => t.div({className: "room-placeholder"}, t.h2(vm.i18n`Choose a room on the left side.`)));
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
t.mapView(vm => vm.roomInfoViewModel, roomInfoViewModel => roomInfoViewModel ? new RoomInfoView(roomInfoViewModel) : null),
|
t.mapView(vm => vm.roomDetailsViewModel, roomDetailsViewModel => roomDetailsViewModel ? new RoomDetailsView(roomDetailsViewModel) : null),
|
||||||
t.mapView(vm => vm.lightboxViewModel, lightboxViewModel => lightboxViewModel ? new LightboxView(lightboxViewModel) : null)
|
t.mapView(vm => vm.lightboxViewModel, lightboxViewModel => lightboxViewModel ? new LightboxView(lightboxViewModel) : null)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { TemplateView } from "../../general/TemplateView.js";
|
||||||
import { text, classNames, tag } from "../../general/html.js";
|
import { text, classNames, tag } from "../../general/html.js";
|
||||||
import { AvatarView } from "../../avatar.js";
|
import { AvatarView } from "../../avatar.js";
|
||||||
|
|
||||||
export class RoomInfoView extends TemplateView {
|
export class RoomDetailsView extends TemplateView {
|
||||||
|
|
||||||
render(t, vm) {
|
render(t, vm) {
|
||||||
const encryptionString = () => vm.isEncrypted ? vm.i18n`On` : vm.i18n`Off`;
|
const encryptionString = () => vm.isEncrypted ? vm.i18n`On` : vm.i18n`Off`;
|
Reference in a new issue