From f3f1436bb01c47a1d176d6cc9475a59f4a626ac3 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Mon, 7 Jun 2021 00:19:31 +0530 Subject: [PATCH] Rename room info to room details everywhere Signed-off-by: RMidhunSuresh --- src/domain/session/SessionViewModel.js | 20 +++++++++---------- ...foViewModel.js => RoomDetailsViewModel.js} | 2 +- src/platform/web/ui/session/SessionView.js | 6 +++--- .../{RoomInfoView.js => RoomDetailsView.js} | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) rename src/domain/session/rightpanel/{RoomInfoViewModel.js => RoomDetailsViewModel.js} (95%) rename src/platform/web/ui/session/rightpanel/{RoomInfoView.js => RoomDetailsView.js} (97%) diff --git a/src/domain/session/SessionViewModel.js b/src/domain/session/SessionViewModel.js index ab59c2af..e5755a21 100644 --- a/src/domain/session/SessionViewModel.js +++ b/src/domain/session/SessionViewModel.js @@ -17,7 +17,7 @@ limitations under the License. import {LeftPanelViewModel} from "./leftpanel/LeftPanelViewModel.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 {InviteViewModel} from "./room/InviteViewModel.js"; import {LightboxViewModel} from "./room/LightboxViewModel.js"; @@ -63,7 +63,7 @@ export class SessionViewModel extends ViewModel { if (!this._gridViewModel) { this._updateRoom(roomId); } - this._toggleRoomInformationPanel(); + this._toggleRoomDetailsPanel(); })); if (!this._gridViewModel) { this._updateRoom(currentRoomId.get()); @@ -82,8 +82,8 @@ export class SessionViewModel extends ViewModel { this._updateLightbox(lightbox.get()); const details = this.navigation.observe("details"); - this.track(details.subscribe(() => this._toggleRoomInformationPanel())); - this._toggleRoomInformationPanel(); + this.track(details.subscribe(() => this._toggleRoomDetailsPanel())); + this._toggleRoomDetailsPanel(); } get id() { @@ -118,8 +118,8 @@ export class SessionViewModel extends ViewModel { return this._roomViewModelObservable?.get(); } - get roomInfoViewModel() { - return this._roomInfoViewModel; + get roomDetailsViewModel() { + return this._roomDetailsViewModel; } _updateGrid(roomIds) { @@ -256,14 +256,14 @@ export class SessionViewModel extends ViewModel { return room; } - _toggleRoomInformationPanel() { - this._roomInfoViewModel = this.disposeTracked(this._roomInfoViewModel); + _toggleRoomDetailsPanel() { + this._roomDetailsViewModel = this.disposeTracked(this._roomDetailsViewModel); const enable = !!this.navigation.path.get("details")?.value; if (enable) { 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"); } } diff --git a/src/domain/session/rightpanel/RoomInfoViewModel.js b/src/domain/session/rightpanel/RoomDetailsViewModel.js similarity index 95% rename from src/domain/session/rightpanel/RoomInfoViewModel.js rename to src/domain/session/rightpanel/RoomDetailsViewModel.js index 281c557b..6430b922 100644 --- a/src/domain/session/rightpanel/RoomInfoViewModel.js +++ b/src/domain/session/rightpanel/RoomDetailsViewModel.js @@ -1,7 +1,7 @@ import {ViewModel} from "../../ViewModel.js"; import {avatarInitials, getIdentifierColorNumber, getAvatarHttpUrl} from "../../avatar.js"; -export class RoomInfoViewModel extends ViewModel { +export class RoomDetailsViewModel extends ViewModel { constructor(options) { super(options); this._room = options.room; diff --git a/src/platform/web/ui/session/SessionView.js b/src/platform/web/ui/session/SessionView.js index a6830fa7..31d5befa 100644 --- a/src/platform/web/ui/session/SessionView.js +++ b/src/platform/web/ui/session/SessionView.js @@ -25,7 +25,7 @@ import {StaticView} from "../general/StaticView.js"; import {SessionStatusView} from "./SessionStatusView.js"; import {RoomGridView} from "./RoomGridView.js"; import {SettingsView} from "./settings/SettingsView.js"; -import { RoomInfoView } from "./rightpanel/RoomInfoView.js"; +import { RoomDetailsView } from "./rightpanel/RoomDetailsView.js"; export class SessionView extends TemplateView { render(t, vm) { @@ -33,7 +33,7 @@ export class SessionView extends TemplateView { className: { "SessionView": true, "middle-shown": vm => !!vm.activeMiddleViewModel, - "right-shown": vm => !!vm.roomInfoViewModel + "right-shown": vm => !!vm.roomDetailsViewModel }, }, [ 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.`))); } }), - 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) ]); } diff --git a/src/platform/web/ui/session/rightpanel/RoomInfoView.js b/src/platform/web/ui/session/rightpanel/RoomDetailsView.js similarity index 97% rename from src/platform/web/ui/session/rightpanel/RoomInfoView.js rename to src/platform/web/ui/session/rightpanel/RoomDetailsView.js index 43a0f994..3bbeb2da 100644 --- a/src/platform/web/ui/session/rightpanel/RoomInfoView.js +++ b/src/platform/web/ui/session/rightpanel/RoomDetailsView.js @@ -2,7 +2,7 @@ import { TemplateView } from "../../general/TemplateView.js"; import { text, classNames, tag } from "../../general/html.js"; import { AvatarView } from "../../avatar.js"; -export class RoomInfoView extends TemplateView { +export class RoomDetailsView extends TemplateView { render(t, vm) { const encryptionString = () => vm.isEncrypted ? vm.i18n`On` : vm.i18n`Off`;