diff --git a/main.py b/main.py index 67cae4a..1e1d949 100644 --- a/main.py +++ b/main.py @@ -171,6 +171,10 @@ app.mount("/static", StaticFiles(directory="static"), name="static") MAX_UPLOAD_SIZE = 100 * 1024 * 1024 # 100 MB MAX_MESSAGE_LEN = 10_000 +# ⚠️ Версия UI — единый источник. БАМПАТЬ ПРИ КАЖДОМ ДЕПЛОЕ (формат: YYYY-MM-DD + буква). +# Фронт берёт её через GET /api/version (chat.html + admin.html, элемент .app-version). +APP_VERSION = "2026-06-10a" + # Audit: path → action name mapping _AUDIT_MAP = [ ("POST", "/api/login", "login"), @@ -300,6 +304,12 @@ async def index(): return Path("static/chat.html").read_text(encoding="utf-8") +@app.get("/api/version") +async def version(): + """Public — single source of UI version (stamped into .app-version on the front).""" + return {"version": APP_VERSION} + + # Resumable uploads (tus 1.0.0). Same-process, reuses auth + per-user work dir; # the finished file lands in the work dir exactly like legacy /api/upload. TUS_MAX_SIZE = 3 * 1024 * 1024 * 1024 # 3 GB diff --git a/static/admin.html b/static/admin.html index 84f2749..a7a38f2 100644 --- a/static/admin.html +++ b/static/admin.html @@ -48,7 +48,7 @@ a { color: var(--accent); text-decoration: none; } Журнал Файлы ← Вернуться в чат -