chore: закоммичены все рабочие файлы smeta-web

Предотвращение потери данных при деплое:
batch_v3, search_engine, xlsx_utils, тесты, скрипты деплоя,
архитектура, security page, admin page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
anor
2026-03-30 04:48:52 +10:00
co-authored by Claude Opus 4.6
parent 223112c085
commit 56ba1bd5aa
15 changed files with 2456 additions and 61 deletions
+7
View File
@@ -90,6 +90,13 @@ const token = localStorage.getItem('token');
if (!token) window.location.href = '/';
const H = {'Authorization': 'Bearer ' + token};
// Check token validity — redirect to login on 401
async function checkAuth() {
const r = await fetch('/api/admin/stats', {headers: H});
if (r.status === 401) { localStorage.removeItem('token'); window.location.href = '/'; }
}
checkAuth();
// Navigation
function showPage(name) {
document.querySelectorAll('.page').forEach(p => p.classList.remove('active'));