pikvm/pikvm#1462: relative root location

This commit is contained in:
Maxim Devaev
2025-02-02 07:09:21 +02:00
parent b51ea5e374
commit 73238e18e9
36 changed files with 170 additions and 96 deletions

View File

@@ -51,9 +51,9 @@ function __login() {
} else {
let passwd = $("passwd-input").value + $("code-input").value;
let body = `user=${encodeURIComponent(user)}&passwd=${encodeURIComponent(passwd)}`;
tools.httpPost("/api/auth/login", null, function(http) {
tools.httpPost("api/auth/login", null, function(http) {
if (http.status === 200) {
document.location.href = "/";
tools.currentOpen("");
} else if (http.status === 403) {
wm.error("Invalid credentials").then(__tryAgain);
} else {