Rename room info to room details everywhere

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-06-07 00:19:31 +05:30
parent f917730a21
commit f3f1436bb0
4 changed files with 15 additions and 15 deletions

View file

@ -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");
}
}

View file

@ -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;

View file

@ -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)
]);
}

View file

@ -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`;