chore: auto-commit from dashboard

This commit is contained in:
2026-04-28 10:46:30 +00:00
parent 5e930ade02
commit 1462f98ae9
7 changed files with 39 additions and 13 deletions

View File

@@ -234,7 +234,14 @@ class TaskBoardHandler(
self.send_error(404)
else:
self.send_error(404)
elif self.path == '/echo/login' or self.path.startswith('/echo/login?'):
elif self.path in ('/', '/echo', '/echo/'):
self.send_response(302)
self.send_header('Location', '/echo/index.html')
self.send_header('Content-Length', '0')
self.end_headers()
return
elif self.path in ('/echo/login', '/login') or \
self.path.startswith(('/echo/login?', '/login?')):
# If already logged in, redirect to workspace; otherwise serve
# login.html (created in Lane B2).
if self._check_dashboard_cookie():
@@ -275,6 +282,12 @@ class TaskBoardHandler(
self.send_error(403)
return
if fpath.is_file():
if fpath.name != 'login.html' and not self._check_dashboard_cookie():
self.send_response(302)
self.send_header('Location', '/echo/login')
self.send_header('Content-Length', '0')
self.end_headers()
return
html = fpath.read_text('utf-8').replace('<!--NAV-->', NAV_HTML)
body = html.encode('utf-8')
self.send_response(200)

View File

@@ -168,7 +168,7 @@
<section class="login-card">
<h1 class="login-title">Echo Dashboard</h1>
<p class="login-subtitle">Autentificare</p>
<form id="login-form" method="post" action="/api/auth/login" novalidate>
<form id="login-form" method="post" action="/echo/api/auth/login" novalidate>
<div class="form-field">
<label class="form-label" for="token-input">Token de acces</label>
<input
@@ -239,7 +239,7 @@
var body = 'token=' + encodeURIComponent(token);
fetch('/api/auth/login', {
fetch('/echo/api/auth/login', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',

View File

@@ -13,7 +13,7 @@
"ok": true,
"status": "OK",
"message": "Nicio modificare detectată",
"lastCheck": "25 Apr 2026, 16:00",
"lastCheck": "28 Apr 2026, 10:00",
"changesCount": 0
}
}