admin: change path behaviour for the billionth time

URLs are made with app.ExternalURI (now included in window.pages), which
itself should include Base. Also fixed the subfolder being removed from
the url after login.
This commit is contained in:
Harvey Tindall
2025-05-27 15:40:08 +01:00
parent d8e624ad22
commit 42d1abe130
7 changed files with 32 additions and 13 deletions
+9 -7
View File
@@ -6,6 +6,7 @@ import { Login } from "./modules/login.js";
import { Discord, Telegram, Matrix, ServiceConfiguration, MatrixConfiguration } from "./modules/account-linking.js";
import { Validator, ValidatorConf, ValidatorRespDTO } from "./modules/validator.js";
import { PageManager } from "./modules/pages.js";
import { generateCodeLink } from "./modules/invites.js";
interface userWindow extends GlobalWindow {
jellyfinID: string;
@@ -305,14 +306,15 @@ class ReferralCard {
this._code = c;
let u = new URL(window.location.href);
const path = window.pages.Base + window.pages.Form + "/" + this._code;
u.pathname = path;
u.hash = "";
u.search = "";
// let u = new URL(window.location.href);
// const path = window.pages.Base + window.pages.Form + "/" + this._code;
//
// u.pathname = path;
// u.hash = "";
// u.search = "";
this._url = u.toString();
// this._url = u.toString();
this._url = generateCodeLink(this._code);
}
get remaining_uses(): number { return this._remainingUses; }