diff --git a/src/domain/RootViewModel.js b/src/domain/RootViewModel.js index c13f7ce6..8e74244b 100644 --- a/src/domain/RootViewModel.js +++ b/src/domain/RootViewModel.js @@ -40,28 +40,28 @@ export class RootViewModel extends ViewModel { this.track(this.navigation.observe("login").subscribe(() => this._applyNavigation())); this.track(this.navigation.observe("session").subscribe(() => this._applyNavigation())); this.track(this.navigation.observe("sso").subscribe(() => this._applyNavigation())); - this.track(this.navigation.observe("forced-logout").subscribe(() => this._applyNavigation())); + this.track(this.navigation.observe("logout").subscribe(() => this._applyNavigation())); this._applyNavigation(true); } async _applyNavigation(shouldRestoreLastUrl) { const isLogin = this.navigation.path.get("login"); const logoutSessionId = this.navigation.path.get("logout")?.value; - const forcedLogoutSessionId = this.navigation.path.get("forced-logout")?.value; + const isForcedLogout = this.navigation.path.get("forced")?.value; const sessionId = this.navigation.path.get("session")?.value; const loginToken = this.navigation.path.get("sso")?.value; if (isLogin) { if (this.activeSection !== "login") { this._showLogin(); } + } else if (logoutSessionId && isForcedLogout) { + if (this.activeSection !== "forced-logout") { + this._showForcedLogout(logoutSessionId); + } } else if (logoutSessionId) { if (this.activeSection !== "logout") { this._showLogout(logoutSessionId); } - } else if (forcedLogoutSessionId) { - if (this.activeSection !== "forced-logout") { - this._showForcedLogout(forcedLogoutSessionId); - } } else if (sessionId === true) { if (this.activeSection !== "picker") { this._showPicker(); diff --git a/src/domain/navigation/index.ts b/src/domain/navigation/index.ts index c1fbee13..849d870a 100644 --- a/src/domain/navigation/index.ts +++ b/src/domain/navigation/index.ts @@ -23,7 +23,7 @@ export type SegmentType = { "session": string | boolean; "sso": string; "logout": true; - "forced-logout": true; + "forced": true; "room": string; "rooms": string[]; "settings": true; @@ -49,9 +49,7 @@ function allowsChild(parent: Segment | undefined, child: Segment | undefined, child: Segment