feat: scaffold gold_monitor web hub, API, PM2 deploy and docs

This commit is contained in:
dekun
2026-10-17 17:43:17 +08:00
commit fb35968a1f
35 changed files with 2080 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
{% extends "base.html" %}
{% block title %}账户 · {{ app_name }}{% endblock %}
{% block content %}
<h2 style="margin:0 0 14px">账户标注</h2>
<div class="grid cols-2">
<div class="card">
<h3>新增账户</h3>
<form method="post" action="{{ url_for('accounts_create') }}">
<div class="form-row"><label>名称</label><input name="name" required placeholder="如:模拟盘-A"></div>
<div class="form-row"><label>券商</label><input name="broker" placeholder="MT5 券商名"></div>
<div class="form-row"><label>登录号</label><input name="login_id" placeholder="可选"></div>
<div class="form-row">
<label>类型</label>
<select name="account_type">
<option value="demo">模拟</option>
<option value="cent">美分</option>
<option value="real">实盘</option>
</select>
</div>
<div class="form-row"><label>标注</label><textarea name="note" rows="2" placeholder="用途、纪律备注"></textarea></div>
<button class="btn" type="submit">添加</button>
</form>
</div>
<div class="card">
<h3>已有账户</h3>
<table>
<thead><tr><th>名称</th><th>类型</th><th>标注</th><th></th></tr></thead>
<tbody>
{% for a in items %}
<tr>
<td>{{ a.name }}<div class="muted">{{ a.broker }} {{ a.login_id }}</div></td>
<td><span class="tag gray">{{ a.account_type }}</span></td>
<td style="min-width:180px">
<form method="post" action="{{ url_for('accounts_note', aid=a.id) }}">
<input name="note" value="{{ a.note or '' }}" placeholder="标注">
<button class="btn secondary" style="margin-top:6px" type="submit">保存</button>
</form>
</td>
<td>#{{ a.id }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}