工作台隐藏中控顶栏与报价并铺满视口,登录后默认进入总览。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -125,13 +125,13 @@ def login():
|
|||||||
if u == hub_username() and p == hub_password():
|
if u == hub_username() and p == hub_password():
|
||||||
session["logged_in"] = True
|
session["logged_in"] = True
|
||||||
session.permanent = 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("/"):
|
if not nxt.startswith("/"):
|
||||||
nxt = "/desk"
|
nxt = "/"
|
||||||
return redirect(nxt)
|
return redirect(nxt)
|
||||||
flash("用户名或密码错误")
|
flash("用户名或密码错误")
|
||||||
if session.get("logged_in"):
|
if session.get("logged_in"):
|
||||||
return redirect("/desk")
|
return redirect("/")
|
||||||
return render_template("login.html")
|
return render_template("login.html")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+21
-5
@@ -234,11 +234,24 @@ body.page-instances .main {
|
|||||||
max-width: none;
|
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 {
|
body.page-desk .main {
|
||||||
max-width: none;
|
max-width: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
max-height: 100vh;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 12px 14px;
|
padding: 10px 12px 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
body.page-login {
|
body.page-login {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
@@ -912,7 +925,8 @@ button, .btn {
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 220px minmax(0, 1fr);
|
grid-template-columns: 220px minmax(0, 1fr);
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
min-height: calc(100vh - 70px);
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
transition: grid-template-columns 0.18s ease;
|
transition: grid-template-columns 0.18s ease;
|
||||||
}
|
}
|
||||||
@@ -925,7 +939,8 @@ button, .btn {
|
|||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
overflow: hidden;
|
min-height: 0;
|
||||||
|
overflow: auto;
|
||||||
box-shadow: var(--shadow);
|
box-shadow: var(--shadow);
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
@@ -1002,15 +1017,16 @@ button, .btn {
|
|||||||
background: rgba(34, 211, 238, 0.16);
|
background: rgba(34, 211, 238, 0.16);
|
||||||
border-color: rgba(34, 211, 238, 0.35);
|
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 {
|
.desk-toolbar {
|
||||||
display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
|
display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.desk-frame {
|
.desk-frame {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: calc(100vh - 190px);
|
min-height: 0;
|
||||||
border: 1px solid var(--line);
|
border: 1px solid var(--line);
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
background: #000;
|
background: #000;
|
||||||
|
|||||||
+3
-3
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>{% block title %}加密货币|OKX 期权中控{% endblock %}</title>
|
<title>{% block title %}加密货币|OKX 期权中控{% endblock %}</title>
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='hub.css') }}?v=31">
|
<link rel="stylesheet" href="{{ url_for('static', filename='hub.css') }}?v=32">
|
||||||
</head>
|
</head>
|
||||||
<body class="{% if request.path.startswith('/login') %}page-login{% elif request.path.startswith('/desk') %}page-desk{% elif request.path.startswith('/stats') %}page-stats{% elif request.path.startswith('/instances') %}page-instances{% elif request.path.startswith('/settings') %}page-settings{% elif request.path.startswith('/cond_orders') %}page-cond-orders{% elif request.path == '/' %}page-dashboard{% endif %}">
|
<body class="{% if request.path.startswith('/login') %}page-login{% elif request.path.startswith('/desk') %}page-desk{% elif request.path.startswith('/stats') %}page-stats{% elif request.path.startswith('/instances') %}page-instances{% elif request.path.startswith('/settings') %}page-settings{% elif request.path.startswith('/cond_orders') %}page-cond-orders{% elif request.path == '/' %}page-dashboard{% endif %}">
|
||||||
{% if session.get('logged_in') %}
|
{% if session.get('logged_in') %}
|
||||||
@@ -47,11 +47,11 @@
|
|||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% block body %}{% endblock %}
|
{% block body %}{% endblock %}
|
||||||
</main>
|
</main>
|
||||||
{% if session.get('logged_in') %}
|
{% if session.get('logged_in') and not request.path.startswith('/desk') %}
|
||||||
<script src="{{ url_for('static', filename='hub_quotes.js') }}?v=1"></script>
|
<script src="{{ url_for('static', filename='hub_quotes.js') }}?v=1"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block scripts %}{% endblock %}
|
{% block scripts %}{% endblock %}
|
||||||
{% if session.get('logged_in') %}
|
{% if session.get('logged_in') and not request.path.startswith('/desk') %}
|
||||||
<script>if (window.HubQuotes) HubQuotes.boot();</script>
|
<script>if (window.HubQuotes) HubQuotes.boot();</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user