Files
gold_monitor/app/templates/settings.html
T
dekun 75b9bffe96 Add auto break-even toggle and WeCom hub notifications.
Desktop can auto-pull stop to open+/-1 after a 3$ favorable move; hub pushes open/close events and a 23:00 BJT daily summary via webhook.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-27 11:25:44 +08:00

74 lines
3.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% 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>
<p class="muted">可改用户名和/或密码;须验证当前密码。立即生效。</p>
<form method="post" action="{{ url_for('settings_profile') }}" style="margin-top:12px">
<input type="hidden" name="_prev_username" value="{{ current_user.username }}">
<div class="form-row">
<label>用户名</label>
<input name="username" value="{{ current_user.username }}" required minlength="2" autocomplete="username">
</div>
<div class="form-row">
<label>当前密码(必填)</label>
<input name="old_password" type="password" autocomplete="current-password" required>
</div>
<div class="form-row">
<label>新密码(不改请留空,至少 6 位)</label>
<input name="new_password" type="password" autocomplete="new-password" minlength="6">
</div>
<div class="form-row">
<label>确认新密码</label>
<input name="new_password2" type="password" autocomplete="new-password" minlength="6">
</div>
<button class="btn" type="submit">保存</button>
</form>
</div>
<div class="card">
<h3>服务信息</h3>
<p class="muted">对外地址:{{ public_base }}</p>
<p class="muted">端口:5800</p>
<p class="muted">当前登录用户:{{ current_user.username }}({{ current_user.role }})</p>
<p class="muted" style="margin-top:12px">通用 exe 放置目录:<code>releases/黄金市价辅助.exe</code></p>
</div>
</div>
{% if is_admin %}
<div class="card" style="margin-top:16px">
<h3>企业微信推送</h3>
<p class="muted">
群机器人 Webhook:开仓/平仓即时推送;北京时间
{{ '%02d'|format(wecom.daily_hour|int) }}:{{ '%02d'|format((wecom.daily_minute or 0)|int) }}
推送各账户日报(交易次数、已平盈亏、胜率)。
</p>
<form method="post" action="{{ url_for('settings_wecom') }}" style="margin-top:12px">
<div class="form-row">
<label>
<input type="checkbox" name="enabled" value="1" {% if wecom.enabled %}checked{% endif %}>
启用推送
</label>
</div>
<div class="form-row">
<label>Webhook 地址</label>
<input name="webhook" value="{{ wecom.webhook }}" placeholder="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=..." style="width:100%">
</div>
<button class="btn" type="submit">保存</button>
</form>
<div style="margin-top:12px;display:flex;gap:8px;flex-wrap:wrap">
<form method="post" action="{{ url_for('settings_wecom_test') }}">
<button class="btn secondary" type="submit">发送测试消息</button>
</form>
<form method="post" action="{{ url_for('settings_wecom_daily') }}">
<button class="btn secondary" type="submit">立即推送今日日报</button>
</form>
</div>
{% if wecom.daily_last %}
<p class="muted" style="margin-top:10px">上次自动日报日期:{{ wecom.daily_last }}</p>
{% endif %}
</div>
{% endif %}
{% endblock %}