URL hashes relative to the room of the archive
This commit is contained in:
parent
1a0b1403ef
commit
5d9dc638ea
3 changed files with 3 additions and 4 deletions
|
@ -36,7 +36,6 @@ export class URLRouter {
|
|||
}
|
||||
|
||||
attach() {
|
||||
console.log('attach');
|
||||
this._subscription = this._history.subscribe(url => this._applyUrl(url));
|
||||
// subscribe to path before applying initial url
|
||||
// so redirects in _applyNavPathToHistory are reflected in url bar
|
||||
|
@ -76,7 +75,6 @@ export class URLRouter {
|
|||
}
|
||||
|
||||
_applyUrl(url) {
|
||||
console.log('URLRouter _applyUrl', url);
|
||||
const navPath = this._urlAsNavPath(url);
|
||||
this._applyNavPathToNavigation(navPath);
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ export {TextMessageView} from "./platform/web/ui/session/room/timeline/TextMessa
|
|||
export {VideoView} from "./platform/web/ui/session/room/timeline/VideoView.js";
|
||||
|
||||
export {Navigation} from "./domain/navigation/Navigation.js";
|
||||
export {History} from "./platform/web/dom/History.js";
|
||||
export {ComposerViewModel} from "./domain/session/room/ComposerViewModel.js";
|
||||
export {MessageComposer} from "./platform/web/ui/session/room/MessageComposer.js";
|
||||
export {TemplateView} from "./platform/web/ui/general/TemplateView";
|
||||
|
|
|
@ -30,10 +30,10 @@ export class History extends BaseObservableValue {
|
|||
But for SSO, we need to handle <root>/?loginToken=<TOKEN>
|
||||
Handle that as a special case for now.
|
||||
*/
|
||||
if (document.location.search.includes("loginToken")) {
|
||||
if (document?.location?.search.includes("loginToken")) {
|
||||
return document.location.search;
|
||||
}
|
||||
return document.location.hash;
|
||||
return document?.location?.hash;
|
||||
}
|
||||
|
||||
/** does not emit */
|
||||
|
|
Reference in a new issue