config: start adding path parameters

to change the urls of the admin page, the my account page and of
invites. Seems to work, but need to check all the code over and test.
This commit is contained in:
Harvey Tindall
2025-05-13 21:10:40 +01:00
parent 2d98c6cff4
commit c52ba2162e
43 changed files with 336 additions and 266 deletions
+5 -3
View File
@@ -11,6 +11,8 @@ import { _get, _post, notificationBox, whichAnimationEvent, bindManualDropdowns
import { Updater } from "./modules/update.js";
import { Login } from "./modules/login.js";
declare var window: GlobalWindow;
const theme = new ThemeManager(document.getElementById("button-theme"));
window.lang = new lang(window.langFile as LangFile);
@@ -165,12 +167,12 @@ const defaultTab = tabs[0];
window.tabs = new Tabs();
for (let tab of tabs) {
window.tabs.addTab(tab.id, tab.url, null, tab.reloader);
window.tabs.addTab(tab.id, window.pages.Admin + "/" + tab.url, null, tab.reloader);
}
let matchedTab = false
for (let tab of tabs) {
if (window.location.pathname.startsWith(window.URLBase + "/" + tab.url)) {
for (const tab of tabs) {
if (window.location.pathname.startsWith(window.pages.Base + window.pages.Current + "/" + tab.url)) {
window.tabs.switch(tab.url, true);
matchedTab = true;
}