c5262a0a54
Mobile gets compact trade/records UI with detail modals; static assets are cache-busted and settings cards fold correctly on tablet grid layout. Co-authored-by: Cursor <cursoragent@cursor.com>
113 lines
7.4 KiB
HTML
113 lines
7.4 KiB
HTML
{# Copyright (c) 2025-2026 马建军. All rights reserved. 专有软件,详见 LICENSE.zh-CN.txt #}
|
|
<!DOCTYPE html>
|
|
<html lang="zh-CN" data-theme="dark">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
|
<meta name="theme-color" content="#050508" id="meta-theme-color">
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
<meta name="apple-mobile-web-app-title" content="期货监控">
|
|
<meta name="application-name" content="期货监控">
|
|
<link rel="manifest" href="{{ url_for('web_manifest') }}">
|
|
<link rel="icon" href="{{ url_for('static', filename='icons/icon.svg') }}" type="image/svg+xml">
|
|
<link rel="apple-touch-icon" href="{{ url_for('static', filename='icons/icon-192.png') }}">
|
|
<title>{% block title %}国内期货 · 交易复盘系统{% endblock %}</title>
|
|
<script>
|
|
try {
|
|
var _t = localStorage.getItem('qihuo-theme');
|
|
if (_t === 'light' || _t === 'dark') {
|
|
document.documentElement.setAttribute('data-theme', _t);
|
|
document.documentElement.style.colorScheme = _t;
|
|
document.documentElement.style.background = _t === 'light' ? '#e8eef8' : '#050508';
|
|
}
|
|
} catch (e) { /* ignore */ }
|
|
</script>
|
|
<script>
|
|
(function () {
|
|
var ua = navigator.userAgent || '';
|
|
var isIpad = /iPad/i.test(ua) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
|
|
var isTabletUa = isIpad || (/Android/i.test(ua) && !/Mobile/i.test(ua));
|
|
var isPhoneUa = !isTabletUa && (/iPhone|iPod|Android.*Mobile|HarmonyOS|OpenHarmony|Mobile/i.test(ua));
|
|
var s = Math.min(window.screen.width || 0, window.screen.height || 0);
|
|
var coarse = window.matchMedia('(hover: none) and (pointer: coarse)').matches;
|
|
var layout = 'desktop';
|
|
if (isPhoneUa || (s > 0 && s < 600)) layout = 'phone';
|
|
else if (isTabletUa || (s >= 600 && s <= 1100 && coarse)) layout = 'tablet';
|
|
else if (window.innerWidth <= 767) layout = 'phone';
|
|
var root = document.documentElement;
|
|
root.dataset.layout = layout;
|
|
root.dataset.mobile = layout === 'phone' ? '1' : '0';
|
|
root.dataset.orientation = layout === 'phone' ? 'portrait' : (window.innerWidth >= window.innerHeight ? 'landscape' : 'portrait');
|
|
if (layout === 'phone') root.classList.add('layout-phone');
|
|
else if (layout === 'tablet') root.classList.add('layout-tablet');
|
|
})();
|
|
</script>
|
|
<script src="{{ url_for('static', filename='js/theme.js') }}?v={{ asset_v }}"></script>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/base.css') }}?v={{ asset_v }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/tech.css') }}?v={{ asset_v }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/responsive.css') }}?v={{ asset_v }}">
|
|
{% block extra_css %}{% endblock %}
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/mobile.css') }}?v={{ asset_v }}">
|
|
</head>
|
|
<body>
|
|
<div class="tech-bg" aria-hidden="true">
|
|
<div class="tech-grid"></div>
|
|
<div class="tech-glow"></div>
|
|
<div class="tech-glow-2"></div>
|
|
<div class="tech-scanline"></div>
|
|
</div>
|
|
<div class="page-wrap">
|
|
<header class="site-header">
|
|
<div class="header-bar">
|
|
<button type="button" class="nav-toggle" id="nav-toggle" aria-label="打开菜单" aria-expanded="false" aria-controls="site-nav">
|
|
<span></span><span></span><span></span>
|
|
</button>
|
|
<h1 class="site-title">
|
|
<span class="site-title-mobile">期货监控</span>
|
|
<span class="site-title-desktop">国内期货 · 交易复盘系统<span class="site-title-sub">Position Management · Disciplined Execution</span></span>
|
|
</h1>
|
|
<div class="header-tools">
|
|
<div class="theme-switch" role="group" aria-label="主题模式">
|
|
<button type="button" class="theme-switch-btn" data-theme-pick="dark">深色</button>
|
|
<button type="button" class="theme-switch-btn" data-theme-pick="light">浅色</button>
|
|
</div>
|
|
<button type="button" class="pwa-install-btn" id="pwa-install-btn" hidden>安装 App</button>
|
|
</div>
|
|
<div class="user-bar">{{ session.username or '用户' }}<a href="{{ url_for('logout') }}">退出</a></div>
|
|
</div>
|
|
<p class="pwa-ios-hint" id="pwa-ios-hint">iOS 安装:Safari 浏览器点击底部分享按钮,选择「添加到主屏幕」。</p>
|
|
<button type="button" class="nav-backdrop" id="nav-backdrop" aria-label="关闭菜单" hidden></button>
|
|
<nav class="site-nav" id="site-nav">
|
|
<a href="{{ url_for('positions') }}" class="{% if request.endpoint in ('positions', 'trade_page', 'recommend_page') %}active{% endif %}">下单监控</a>
|
|
{% if nav_items.strategy %}<a href="{{ url_for('strategy_page') }}" class="{% if request.endpoint in ('strategy_page', 'strategy_records_page') %}active{% endif %}">策略交易</a>{% endif %}
|
|
{% if nav_items.plans %}<a href="{{ url_for('plans') }}" class="{% if request.endpoint == 'plans' %}active{% endif %}">开单计划</a>{% endif %}
|
|
<a href="{{ url_for('keys') }}" class="{% if request.endpoint == 'keys' %}active{% endif %}">关键位监控</a>
|
|
{% if nav_items.ai %}<a href="{{ url_for('ai_messages_page') }}" class="{% if request.endpoint == 'ai_messages_page' %}active{% endif %}">AI 分析</a>{% endif %}
|
|
{% if nav_items.market %}<a href="{{ url_for('market_page') }}" class="{% if request.endpoint == 'market_page' %}active{% endif %}">行情K线</a>{% endif %}
|
|
<a href="{{ url_for('records') }}" class="{% if request.endpoint in ('records', 'trades') %}active{% endif %}">交易记录与复盘</a>
|
|
<a href="{{ url_for('stats') }}" class="{% if request.endpoint == 'stats' %}active{% endif %}">统计分析</a>
|
|
{% if nav_items.fees %}<a href="{{ url_for('fees') }}" class="{% if request.endpoint == 'fees' %}active{% endif %}">手续费配置</a>{% endif %}
|
|
<a href="{{ url_for('settings') }}" class="{% if request.endpoint == 'settings' %}active{% endif %}">系统设置</a>
|
|
</nav>
|
|
</header>
|
|
<main class="main">
|
|
{% with msg=get_flashed_messages() %}{% if msg %}<div class="flash">{{ msg[0] }}</div>{% endif %}{% endwith %}
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
</div>
|
|
<div id="orientation-lock" class="orientation-lock" hidden>
|
|
<div class="orientation-lock-box">
|
|
<div class="orientation-lock-icon" aria-hidden="true">↻</div>
|
|
<p id="orientation-lock-msg">请旋转设备</p>
|
|
</div>
|
|
</div>
|
|
<script src="{{ url_for('static', filename='js/orientation.js') }}?v={{ asset_v }}"></script>
|
|
<script src="{{ url_for('static', filename='js/symbol.js') }}?v={{ asset_v }}"></script>
|
|
<script src="{{ url_for('static', filename='js/nav.js') }}?v={{ asset_v }}"></script>
|
|
<script src="{{ url_for('static', filename='js/pwa.js') }}?v={{ asset_v }}"></script>
|
|
{% block extra_js %}{% endblock %}
|
|
</body>
|
|
</html>
|