From b92c463fb17937331dc81bec585cc7b81aabb1e7 Mon Sep 17 00:00:00 2001 From: dekun Date: Sun, 4 Oct 2026 20:59:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E4=B8=AD=E6=8E=A7=E9=A1=B6=E6=A0=8F=E4=B8=8E=E6=8A=A5=E4=BB=B7?= =?UTF-8?q?=E5=B9=B6=E9=93=BA=E6=BB=A1=E8=A7=86=E5=8F=A3=EF=BC=8C=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=90=8E=E9=BB=98=E8=AE=A4=E8=BF=9B=E5=85=A5=E6=80=BB?= =?UTF-8?q?=E8=A7=88=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- app.py | 6 +++--- static/hub.css | 26 +++++++++++++++++++++----- templates/base.html | 6 +++--- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/app.py b/app.py index 75452b9..0313226 100644 --- a/app.py +++ b/app.py @@ -125,13 +125,13 @@ def login(): if u == hub_username() and p == hub_password(): session["logged_in"] = True session.permanent = True - nxt = (request.args.get("next") or request.form.get("next") or "/desk").strip() or "/desk" + nxt = (request.args.get("next") or request.form.get("next") or "/").strip() or "/" if not nxt.startswith("/"): - nxt = "/desk" + nxt = "/" return redirect(nxt) flash("用户名或密码错误") if session.get("logged_in"): - return redirect("/desk") + return redirect("/") return render_template("login.html") diff --git a/static/hub.css b/static/hub.css index bdb49e0..d8f8783 100644 --- a/static/hub.css +++ b/static/hub.css @@ -234,11 +234,24 @@ body.page-instances .main { max-width: none; } } +body.page-desk { + height: 100vh; + overflow: hidden; +} +body.page-desk .topbar-brand, +body.page-desk .topbar-row { + display: none; +} body.page-desk .main { max-width: none; width: 100%; + height: 100vh; + max-height: 100vh; margin: 0; - padding: 0 12px 14px; + padding: 10px 12px 10px; + display: flex; + flex-direction: column; + overflow: hidden; } body.page-login { min-height: 100vh; @@ -912,7 +925,8 @@ button, .btn { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; - min-height: calc(100vh - 70px); + flex: 1; + min-height: 0; max-width: none; transition: grid-template-columns 0.18s ease; } @@ -925,7 +939,8 @@ button, .btn { border-radius: var(--radius); padding: 10px; min-width: 0; - overflow: hidden; + min-height: 0; + overflow: auto; box-shadow: var(--shadow); backdrop-filter: blur(10px); } @@ -1002,15 +1017,16 @@ button, .btn { background: rgba(34, 211, 238, 0.16); border-color: rgba(34, 211, 238, 0.35); } -.desk-main { display: flex; flex-direction: column; min-height: calc(100vh - 130px); min-width: 0; } +.desk-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; height: 100%; } .desk-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; + flex-shrink: 0; } .desk-frame { flex: 1; width: 100%; - min-height: calc(100vh - 190px); + min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #000; diff --git a/templates/base.html b/templates/base.html index 7bc336e..23b77d2 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,7 +4,7 @@ {% block title %}加密货币|OKX 期权中控{% endblock %} - + {% if session.get('logged_in') %} @@ -47,11 +47,11 @@ {% endwith %} {% block body %}{% endblock %} - {% if session.get('logged_in') %} + {% if session.get('logged_in') and not request.path.startswith('/desk') %} {% endif %} {% block scripts %}{% endblock %} - {% if session.get('logged_in') %} + {% if session.get('logged_in') and not request.path.startswith('/desk') %} {% endif %}