v2.5.0: remove local web admin token gate

This commit is contained in:
Виталий Литвинов
2026-04-24 22:00:08 +03:00
parent 8804319e19
commit 008143a617
10 changed files with 15 additions and 136 deletions

View File

@@ -36,10 +36,6 @@ async function api(path, options = {}) {
};
if (options.body && !headers["Content-Type"]) headers["Content-Type"] = "application/json";
const res = await fetch(path, { ...options, headers, credentials: "same-origin" });
if (res.status === 401) {
$("#authLock").classList.remove("hidden");
throw new Error("Unauthorized");
}
const data = await res.json().catch(() => ({}));
if (!res.ok || data.ok === false) throw new Error(data.error || `HTTP ${res.status}`);
return data.data ?? data;

View File

@@ -7,14 +7,6 @@
<link rel="stylesheet" href="/styles.css">
</head>
<body>
<div id="authLock" class="auth-lock hidden">
<div class="auth-panel">
<div class="mark">GT</div>
<h1>GoTelegram Admin</h1>
<p>Откройте ссылку из Telegram-бота после запуска SSH-туннеля.</p>
</div>
</div>
<div class="shell">
<aside class="sidebar">
<div class="brand">

View File

@@ -352,34 +352,6 @@ td code {
transform: translateY(0);
}
.auth-lock {
position: fixed;
inset: 0;
z-index: 20;
display: grid;
place-items: center;
background: rgba(245, 247, 251, .92);
backdrop-filter: blur(8px);
}
.auth-panel {
width: min(420px, calc(100vw - 32px));
border: 1px solid var(--line);
border-radius: 8px;
background: white;
padding: 26px;
box-shadow: var(--shadow);
}
.auth-panel h1 {
margin-top: 16px;
}
.auth-panel p {
margin-top: 8px;
color: var(--muted);
}
.hidden {
display: none;
}