urlpaths: seemingly full functionality

various subpath combos seem to work, and trailing slashes from them are
trimmed (including for the empty admin path "/", which is now "" by
default).
This commit is contained in:
Harvey Tindall
2025-05-14 20:08:21 +01:00
parent 302c4c189c
commit 0967d471ee
5 changed files with 41 additions and 22 deletions
-1
View File
@@ -178,7 +178,6 @@ for (const tab of tabs) {
}
}
// Default tab
// if ((window.URLBase + "/").includes(window.location.pathname)) {
if (!matchedTab) {
window.tabs.switch("", true);
}
+1 -1
View File
@@ -660,7 +660,7 @@ document.addEventListener("details-reload", () => {
expiryCard.expiry = details.expiry;
const adminBackButton = document.getElementById("admin-back-button") as HTMLAnchorElement;
adminBackButton.href = window.location.href.replace(window.pages.MyAccount, window.pages.Admin);
adminBackButton.href = window.pages.Base + window.pages.Admin;
let messageCard = document.getElementById("card-message");
if (details.accounts_admin) {