基于官方 nousresearch/hermes-agent 镜像的 CLI、Docker Compose 与 Web 管理界面,支持多实例部署;敏感配置与实例数据由 .gitignore 排除。 Co-authored-by: Cursor <cursoragent@cursor.com>
126 lines
3.5 KiB
HTML
126 lines
3.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>登录 · Hermes Agent Web</title>
|
|
<style>
|
|
:root {
|
|
--bg: #0f1419;
|
|
--surface: #1a2332;
|
|
--border: #2d3a4f;
|
|
--text: #e7ecf3;
|
|
--muted: #8b9cb3;
|
|
--accent: #5b9cf6;
|
|
--accent-dim: #3d7cd6;
|
|
}
|
|
* { box-sizing: border-box; }
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-family: "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
|
|
font-size: 15px;
|
|
color: var(--text);
|
|
background: radial-gradient(1200px 800px at 10% -10%, #1a2840 0%, var(--bg) 55%);
|
|
}
|
|
.card {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
margin: 24px;
|
|
padding: 32px 28px;
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: 14px;
|
|
box-shadow: 0 18px 50px rgba(0,0,0,0.35);
|
|
}
|
|
h1 {
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
margin: 0 0 8px;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
.sub {
|
|
color: var(--muted);
|
|
font-size: 0.9rem;
|
|
margin-bottom: 24px;
|
|
}
|
|
label {
|
|
display: block;
|
|
font-size: 0.85rem;
|
|
color: var(--muted);
|
|
margin-bottom: 8px;
|
|
}
|
|
input[type="text"],
|
|
input[type="password"] {
|
|
width: 100%;
|
|
padding: 12px 14px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--border);
|
|
background: #0d1218;
|
|
color: var(--text);
|
|
font-size: 15px;
|
|
}
|
|
input[type="text"]:focus,
|
|
input[type="password"]:focus {
|
|
outline: none;
|
|
border-color: var(--accent-dim);
|
|
box-shadow: 0 0 0 3px rgba(91, 156, 246, 0.2);
|
|
}
|
|
.field { margin-top: 16px; }
|
|
.field:first-of-type { margin-top: 0; }
|
|
button {
|
|
margin-top: 20px;
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
border: none;
|
|
border-radius: 10px;
|
|
cursor: pointer;
|
|
background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dim) 100%);
|
|
box-shadow: 0 4px 14px rgba(0,0,0,0.3);
|
|
}
|
|
button:hover { filter: brightness(1.06); }
|
|
.err {
|
|
margin-bottom: 16px;
|
|
padding: 12px 14px;
|
|
border-radius: 10px;
|
|
background: rgba(240, 113, 120, 0.12);
|
|
border: 1px solid rgba(240, 113, 120, 0.35);
|
|
color: #ffb3b8;
|
|
font-size: 0.9rem;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="card">
|
|
<h1>管理员登录</h1>
|
|
<p class="sub">Hermes Agent Web · 请输入用户名和密码登录</p>
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% for category, message in messages %}
|
|
{% if category == 'error' %}
|
|
<div class="err">{{ message }}</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endwith %}
|
|
<form method="post" action="{{ url_for('login') }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<input type="hidden" name="next" value="{{ next_url }}">
|
|
<div class="field">
|
|
<label for="username">用户名</label>
|
|
<input id="username" name="username" type="text" value="{{ default_admin_username }}" autocomplete="username" required>
|
|
</div>
|
|
<div class="field">
|
|
<label for="password">密码</label>
|
|
<input id="password" name="password" type="password" autocomplete="current-password" required autofocus>
|
|
</div>
|
|
<button type="submit">登录</button>
|
|
</form>
|
|
</div>
|
|
</body>
|
|
</html>
|