1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-08 17:06:42 +00:00

show login on logout

This commit is contained in:
Laura
2025-08-16 17:33:32 +02:00
parent 5f62bffd98
commit dbac0d7b50

View File

@@ -28,8 +28,6 @@
models = {},
modelList = [];
let authToken;
let autoScrolling = false,
searchAvailable = false,
jsonMode = false,
@@ -688,6 +686,10 @@
if (!response.ok) {
const err = await response.json();
if (err?.error === "unauthorized") {
showLogin();
}
throw new Error(err?.error || response.statusText);
}
@@ -910,6 +912,12 @@
}
}
function showLogin() {
$password.value = "";
$authentication.classList.add("open");
}
async function loadData() {
const data = await json("/-/data");