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:
@@ -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");
|
||||
|
||||
|
Reference in New Issue
Block a user