fix(instance): light-theme journal AI buttons and mood checkboxes

Fix secondary button contrast, exclude checkboxes from dark input fill, style mood-grid; bump theme assets to v4.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-04 13:12:44 +08:00
parent 21b3e97571
commit 3b4120a36e
20 changed files with 86 additions and 45 deletions
+9 -9
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""为四所 templates 注入 instance_theme 脚本/样式与切换按钮。"""
#!/usr/bin/env python3
"""涓哄洓鎵€ templates 娉ㄥ叆 instance_theme 鑴氭湰/鏍峰紡涓庡垏鎹㈡寜閽€?""
from __future__ import annotations
from pathlib import Path
@@ -8,16 +8,16 @@ ROOT = Path(__file__).resolve().parents[1]
EXCHANGES = ("crypto_monitor_binance", "crypto_monitor_okx", "crypto_monitor_gate", "crypto_monitor_gate_bot")
FILES = ("index.html", "login.html", "key_focus_v2.html", "order_focus_v2.html")
SCRIPT_TAG = ' <script src="/static/instance_theme.js?v=3"></script>\n'
CSS_LINK = ' <link rel="stylesheet" href="/static/instance_theme.css?v=3">\n'
SCRIPT_TAG = ' <script src="/static/instance_theme.js?v=4"></script>\n'
CSS_LINK = ' <link rel="stylesheet" href="/static/instance_theme.css?v=4">\n'
THEME_TOGGLE = """ <div class="theme-toggle instance-theme-toggle" role="group" aria-label="界面主题">
<button type="button" class="theme-toggle-btn is-active" data-theme-value="dark" aria-pressed="true" title="暗色主题">
THEME_TOGGLE = """ <div class="theme-toggle instance-theme-toggle" role="group" aria-label="鐣岄潰涓婚">
<button type="button" class="theme-toggle-btn is-active" data-theme-value="dark" aria-pressed="true" title="鏆楄壊涓婚">
<svg class="theme-icon" viewBox="0 0 24 24" width="18" height="18" aria-hidden="true">
<path fill="currentColor" d="M12.1 3a9 9 0 1 0 8.9 11 6.5 6.5 0 1 1-8.9-11z"/>
</svg>
</button>
<button type="button" class="theme-toggle-btn" data-theme-value="light" aria-pressed="false" title="亮色主题">
<button type="button" class="theme-toggle-btn" data-theme-value="light" aria-pressed="false" title="浜壊涓婚">
<svg class="theme-icon" viewBox="0 0 24 24" width="18" height="18" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
<circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/>
</svg>
@@ -26,12 +26,12 @@ THEME_TOGGLE = """ <div class="theme-toggle instance-theme-toggle" role="
"""
INDEX_HEADER_OLD = """ <div class="header">
<h1>加密货币|交易监控 + AI复盘一体化</h1>
<h1>鍔犲瘑璐у竵锝滀氦鏄撶洃鎺?+ AI澶嶇洏涓浣撳寲</h1>
<div class="exchange-tag">{{ exchange_display }}</div>
</div>"""
INDEX_HEADER_NEW = """ <div class="header">
<h1>加密货币|交易监控 + AI复盘一体化</h1>
<h1>鍔犲瘑璐у竵锝滀氦鏄撶洃鎺?+ AI澶嶇洏涓浣撳寲</h1>
<div class="header-row">
<div class="exchange-tag">{{ exchange_display }}</div>
""" + THEME_TOGGLE + """ </div>