ts: use pages modules in admin (kinda), change pseudo-links

pseudo-links are now just links, because i'm lazy and it's easier than
fixing an issue. They now take the form `/?invite=code` and
`/accounts/?user=userid`.

ts/modules.tabs.ts is now a wrapper for ts/modules/pages.ts.

Also, fixed no section appearing when visiting the settings tab.
This commit is contained in:
Harvey Tindall
2024-08-28 14:18:52 +01:00
parent d2e5209832
commit 02f4ba6e8e
10 changed files with 388 additions and 151 deletions
+8 -2
View File
@@ -1804,10 +1804,16 @@ export class accountsList {
this.focusAccount(event.detail);
});
isAccountURL = () => { return window.location.pathname.startsWith(window.URLBase + "/accounts/user/"); }
// FIXME: Use Query Param! so it doesn't get cleared by pages.ts.
isAccountURL = () => {
const urlParams = new URLSearchParams(window.location.search);
const userID = urlParams.get("user");
return Boolean(userID);
}
loadAccountURL = () => {
let userID = window.location.pathname.split(window.URLBase + "/accounts/user/")[1].split("?lang")[0];
const urlParams = new URLSearchParams(window.location.search);
const userID = urlParams.get("user");
this.focusAccount(userID);
}