From 3b494932c7fe6038aa319ba4811b977a3e340511 Mon Sep 17 00:00:00 2001 From: dekun Date: Tue, 7 Jul 2026 01:58:06 +0800 Subject: [PATCH] feat: settings risk sections as 2x2 nested subcards Co-authored-by: Cursor --- lib/common/static/instance_theme.css | 33 ++++++++++++++++++++ lib/instance/templates/embed_shell.html | 2 +- lib/instance/templates/index.html | 2 +- lib/instance/templates/settings_panel.html | 36 ++++++++++++---------- 4 files changed, 54 insertions(+), 19 deletions(-) diff --git a/lib/common/static/instance_theme.css b/lib/common/static/instance_theme.css index 4e2d003..2a1af3b 100644 --- a/lib/common/static/instance_theme.css +++ b/lib/common/static/instance_theme.css @@ -2201,6 +2201,38 @@ html[data-theme="light"] .journal-detail-img-thumb { font-size: 0.8rem; } +.settings-risk-sections { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 12px; + margin-top: 14px; +} + +.settings-subcard { + padding: 12px 14px; + min-width: 0; + margin: 0; +} + +.settings-subcard-title { + margin: 0 0 10px; + font-size: 0.9rem; + font-weight: 600; + color: #cfd3ef; +} + +.settings-kv--compact .settings-kv-row { + grid-template-columns: 8.5em 1fr; + padding: 5px 0; + font-size: 0.8rem; +} + +@media (max-width: 720px) { + .settings-risk-sections { + grid-template-columns: minmax(0, 1fr); + } +} + .settings-section { margin-top: 14px; padding-top: 12px; @@ -2282,6 +2314,7 @@ html[data-theme="light"] .settings-section { border-top-color: #d0dae4; } +html[data-theme="light"] .settings-subcard-title, html[data-theme="light"] .settings-section h3, html[data-theme="light"] .settings-kv-value { color: #142232; diff --git a/lib/instance/templates/embed_shell.html b/lib/instance/templates/embed_shell.html index 1a51121..22036db 100644 --- a/lib/instance/templates/embed_shell.html +++ b/lib/instance/templates/embed_shell.html @@ -7,7 +7,7 @@ - + {{ exchange_display }} · 加密货币 | 交易监控复盘系统 diff --git a/lib/instance/templates/index.html b/lib/instance/templates/index.html index fb480b0..4aefedb 100644 --- a/lib/instance/templates/index.html +++ b/lib/instance/templates/index.html @@ -17,7 +17,7 @@ {{ exchange_display }} · 加密货币 | 交易监控复盘系统 - + 账户限制:{{ instance_settings.trade_policy_note }}

{% endif %}

以下参数读取自本实例 .env,修改后需重启进程生效。

- {% for section in instance_settings.sections %} -
-

{{ section.title }}

-
- {% for row in section.rows %} -
-
{{ row.label }}
-
- {{ row.value }} - {% if row.note %} - {{ row.note }} - {% endif %} -
-
- {% endfor %} -
+
+ {% for section in instance_settings.sections %} +
+

{{ section.title }}

+
+ {% for row in section.rows %} +
+
{{ row.label }}
+
+ {{ row.value }} + {% if row.note %} + {{ row.note }} + {% endif %} +
+
+ {% endfor %} +
+
+ {% endfor %}
- {% endfor %}