支持 Ubuntu 一键部署与 PM2,并增加系统设置改密。

默认账号改为 admin/admin123,去掉 Windows 部署说明,与客户端同套部署流程。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-01 11:03:29 +08:00
parent d20acaf852
commit d726810320
21 changed files with 1456 additions and 105 deletions
+1
View File
@@ -14,6 +14,7 @@
<a href="/" class="{% if request.path == '/' %}active{% endif %}">总览</a>
<a href="/instances" class="{% if request.path.startswith('/instances') %}active{% endif %}">实例</a>
<a href="/desk" class="{% if request.path.startswith('/desk') %}active{% endif %}">工作台</a>
<a href="/settings" class="{% if request.path.startswith('/settings') %}active{% endif %}">系统设置</a>
<a href="/logout">退出</a>
</nav>
</header>
+28
View File
@@ -0,0 +1,28 @@
{% extends "base.html" %}
{% block title %}系统设置 · 期权中控{% endblock %}
{% block body %}
<section class="page-head"><h1>系统设置</h1></section>
<section class="panel settings-card">
<h2>登录账号</h2>
<p class="muted">修改后立即生效,并写入服务器 <code>.env</code>(<code>HUB_USERNAME</code> / <code>HUB_PASSWORD</code>).</p>
<form method="post" class="stack settings-form" autocomplete="off">
<label>当前用户名
<input type="text" value="{{ current_username }}" readonly class="readonly">
</label>
<label>当前密码
<input type="password" name="current_password" required autocomplete="current-password" placeholder="验证身份">
</label>
<label>新用户名
<input type="text" name="new_username" value="{{ current_username }}" required autocomplete="username" minlength="2" maxlength="64">
</label>
<label>新密码
<input type="password" name="new_password" autocomplete="new-password" minlength="6" placeholder="至少 6 位;不改密码可留空">
</label>
<label>确认新密码
<input type="password" name="confirm_password" autocomplete="new-password" minlength="6" placeholder="与新密码一致;不改密码可留空">
</label>
<button type="submit">保存账号</button>
</form>
</section>
{% endblock %}