ae1b91fcc5
Co-authored-by: Cursor <cursoragent@cursor.com>
41 lines
2.2 KiB
HTML
41 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>{% block title %}{{ app_name }}{% endblock %}</title>
|
||
<link rel="stylesheet" href="{{ url_for('static', filename='css/app.css') }}">
|
||
</head>
|
||
<body>
|
||
{% if session.get('user') %}
|
||
<header class="topbar">
|
||
<div class="brand">{{ app_name }}</div>
|
||
<nav class="nav">
|
||
<a href="{{ url_for('dashboard') }}" class="{% if request.endpoint=='dashboard' %}active{% endif %}">总览</a>
|
||
<a href="{{ url_for('records_page') }}" class="{% if request.endpoint in ('records_page', 'record_detail', 'record_annotate') %}active{% endif %}">交易复盘</a>
|
||
<a href="{{ url_for('records_stats_page') }}" class="{% if request.endpoint=='records_stats_page' %}active{% endif %}">统计看板</a>
|
||
<a href="{{ url_for('download_page') }}" class="{% if request.endpoint and 'download' in request.endpoint %}active{% endif %}">下载中心</a>
|
||
{% if is_admin %}
|
||
<a href="{{ url_for('accounts_page') }}" class="{% if request.endpoint and 'account' in request.endpoint %}active{% endif %}">账户</a>
|
||
<a href="{{ url_for('users_page') }}" class="{% if request.endpoint and 'users' in request.endpoint %}active{% endif %}">用户</a>
|
||
<a href="{{ url_for('machines_page') }}" class="{% if request.endpoint and 'machine' in request.endpoint %}active{% endif %}">机器</a>
|
||
{% else %}
|
||
<a href="{{ url_for('accounts_page') }}" class="{% if request.endpoint and 'account' in request.endpoint %}active{% endif %}">我的账户</a>
|
||
{% endif %}
|
||
<a href="{{ url_for('settings_page') }}" class="{% if request.endpoint and 'settings' in request.endpoint %}active{% endif %}">系统设置</a>
|
||
</nav>
|
||
<div class="right">{{ current_user.username }}({{ current_user.role }}) · <a href="{{ url_for('logout') }}">退出</a></div>
|
||
</header>
|
||
{% endif %}
|
||
<main class="wrap">
|
||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||
{% for cat, msg in messages %}
|
||
<div class="flash {{ cat }}">{{ msg }}</div>
|
||
{% endfor %}
|
||
{% endwith %}
|
||
{% block content %}{% endblock %}
|
||
</main>
|
||
{% block scripts %}{% endblock %}
|
||
</body>
|
||
</html>
|