Use per-exchange PWA names and logos for instance app installs.

Show Binance/OKX/Gate 交易系统 with distinct exchange icons in manifests, apple titles, and login branding.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-16 08:44:07 +08:00
parent 717a3d5694
commit 19a4a5194d
62 changed files with 327 additions and 89 deletions
+11
View File
@@ -179,10 +179,21 @@ def register_embed_routes(
return jsonify({"ok": True, "page": tab, "html": html})
def pwa_app_name(exchange_key: str) -> str:
"""安装 App / 主屏幕显示名(各所独立标识)."""
ex = (exchange_key or "").strip().lower()
return {
"binance": "Binance 交易系统",
"okx": "OKX 交易系统",
"gate": "Gate 交易系统",
}.get(ex, "交易系统")
def embed_context_extras(exchange_key: str) -> dict:
return {
"order_rule_tips_tpl": order_rule_tips_template(exchange_key),
"include_transfer_block": include_transfer_block(exchange_key),
"ui_open_guard_enabled": ui_open_guard_enabled(exchange_key),
"ui_orphan_recovery_enabled": ui_orphan_recovery_enabled(exchange_key),
"pwa_app_name": pwa_app_name(exchange_key),
}
+1 -1
View File
@@ -10,7 +10,7 @@
<link rel="stylesheet" href="/static/instance_theme.css?v=92">
<script src="/static/account_risk_badge.js?v=4"></script>
<meta name="theme-color" content="#0b0d14">
<title>{{ exchange_display }} · 加密货币 | 交易监控复盘系统</title>
<title>{{ pwa_app_name }}</title>
</head>
<body
data-embed-shell="1"
+2 -2
View File
@@ -10,12 +10,12 @@
<script src="/static/account_risk_badge.js?v=4"></script>
<meta name="theme-color" content="#0b0d14">
<meta name="apple-mobile-web-app-title" content="监控">
<meta name="apple-mobile-web-app-title" content="{{ pwa_app_name }}">
<link rel="icon" href="/static/icons/favicon.ico" sizes="32x32">
<link rel="icon" href="/static/icons/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/static/icons/apple-touch-icon.png">
<link rel="manifest" href="/static/icons/manifest.webmanifest">
<title>{{ exchange_display }} · 加密货币 | 交易监控复盘系统</title>
<title>{{ pwa_app_name }}</title>
<link rel="stylesheet" href="/static/instance_page.css?v=3">
<link rel="stylesheet" href="/static/instance_theme.css?v=92">
+9 -3
View File
@@ -4,7 +4,13 @@
<meta charset="UTF-8">
<script src="/static/instance_theme.js?v=4"></script>
<title>登录 · {{ exchange_display }}</title>
<meta name="theme-color" content="#0b0d14">
<meta name="apple-mobile-web-app-title" content="{{ pwa_app_name }}">
<link rel="icon" href="/static/icons/favicon.ico" sizes="32x32">
<link rel="icon" href="/static/icons/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/static/icons/apple-touch-icon.png">
<link rel="manifest" href="/static/icons/manifest.webmanifest">
<title>登录 · {{ pwa_app_name }}</title>
<style>
* {
margin: 0;
@@ -113,8 +119,8 @@
</div>
<body>
<div class="login-box">
<h2>交易监控系统登录</h2>
<p class="exchange-line">交易所:<strong>{{ exchange_display }}</strong></p>
<h2>{{ pwa_app_name }}</h2>
<p class="exchange-line">登录 · <strong>{{ exchange_display }}</strong></p>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="flash">{{ messages[0] }}</div>