From c51c505b61f00df4667172a7e35cd085032af35c Mon Sep 17 00:00:00 2001 From: Antigravity Date: Mon, 5 Oct 2026 11:19:56 +0300 Subject: [PATCH] fix(ui,auth): fix login overlay styles, PWA service worker scope, favicon, and update user config to kopri --- app/main.py | 12 +++++++++ app/static/css/style.css | 58 +++++++++++++++++++++++++++++++++------- app/static/index.html | 7 ++--- app/static/js/app.js | 10 +++---- docker-compose.yml | 4 +-- 5 files changed, 72 insertions(+), 19 deletions(-) diff --git a/app/main.py b/app/main.py index 0859d05..ff07d98 100644 --- a/app/main.py +++ b/app/main.py @@ -147,6 +147,18 @@ async def manifest_endpoint(): raise HTTPException(status_code=404, detail="Manifest not found") +@app.get("/favicon.ico", include_in_schema=False) +async def favicon_endpoint(): + icon_path = config.BASE_DIR / "app" / "static" / "icons" / "icon-192.png" + if icon_path.exists(): + return Response( + content=icon_path.read_bytes(), + media_type="image/png", + headers={"Cache-Control": "public, max-age=86400"}, + ) + raise HTTPException(status_code=404, detail="Favicon not found") + + @app.get("/sw.js", include_in_schema=False) async def service_worker_endpoint(): sw_path = config.BASE_DIR / "app" / "static" / "sw.js" diff --git a/app/static/css/style.css b/app/static/css/style.css index dbda065..e9fb04f 100644 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -88,17 +88,23 @@ body { display: none !important; } -/* Auth Screen */ -.auth-screen { +/* Auth Screen / Login Overlay */ +.auth-screen, +.login-overlay { + position: fixed; + inset: 0; + z-index: 10000; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; - background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 70%); + background-color: var(--bg-main); + background-image: radial-gradient(circle at top, rgba(56, 189, 248, 0.15), transparent 70%); } -.auth-card { +.auth-card, +.login-card { background-color: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); @@ -106,31 +112,65 @@ body { width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); + animation: fadeInScale 0.2s ease-out; } -.auth-header { +@keyframes fadeInScale { + from { + opacity: 0; + transform: scale(0.96); + } + to { + opacity: 1; + transform: scale(1); + } +} + +.auth-header, +.login-header { text-align: center; margin-bottom: 28px; } -.auth-header .app-logo { +.auth-header .app-logo, +.login-header .login-logo { font-size: 48px; margin-bottom: 8px; + display: block; } -.auth-header h2 { +.auth-header h2, +.login-header h1 { font-size: 24px; font-weight: 700; color: var(--text-main); } -.auth-header p { +.auth-header p, +.login-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; } -.auth-footer { +.login-form { + display: flex; + flex-direction: column; +} + +.login-error { + background-color: var(--danger-dim); + color: var(--danger); + border: 1px solid var(--danger); + padding: 10px 14px; + border-radius: var(--radius-sm); + font-size: 13px; + margin-bottom: 16px; + text-align: center; +} + +.auth-footer, +.login-footer { margin-top: 24px; text-align: center; font-size: 12px; diff --git a/app/static/index.html b/app/static/index.html index 32d3a62..f61b6af 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -13,6 +13,7 @@ + @@ -28,7 +29,7 @@
- +
@@ -43,13 +44,13 @@
-
+