Don't add middile class if in room

This commit is contained in:
RMidhunSuresh 2023-06-19 14:21:23 +05:30
parent eeceb9e6a0
commit ae7f13c7e3
2 changed files with 6 additions and 2 deletions

View File

@ -180,4 +180,8 @@ export class DeviceVerificationViewModel extends ErrorReportViewModel<SegmentTyp
get type(): string { get type(): string {
return "verification"; return "verification";
} }
get isHappeningInRoom(): boolean {
return !!this.navigation.path.get("room");
}
} }

View File

@ -24,10 +24,10 @@ import {VerificationCompleteView} from "./stages/VerificationCompleteView";
import {MissingKeysView} from "./stages/MissingKeysView"; import {MissingKeysView} from "./stages/MissingKeysView";
export class DeviceVerificationView extends TemplateView<DeviceVerificationViewModel> { export class DeviceVerificationView extends TemplateView<DeviceVerificationViewModel> {
render(t: Builder<DeviceVerificationViewModel>) { render(t: Builder<DeviceVerificationViewModel>, vm: DeviceVerificationViewModel) {
return t.div({ return t.div({
className: { className: {
"middle": true, "middle": !vm.isHappeningInRoom,
"DeviceVerificationView": true, "DeviceVerificationView": true,
} }
}, [ }, [