mirror of
https://github.com/anten-ka/gotelegram_pro.git
synced 2026-05-19 20:36:04 +00:00
v2.5.0: remove local web admin token gate
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user