基于官方 nousresearch/hermes-agent 镜像的 CLI、Docker Compose 与 Web 管理界面,支持多实例部署;敏感配置与实例数据由 .gitignore 排除。 Co-authored-by: Cursor <cursoragent@cursor.com>
122 lines
3.9 KiB
HTML
122 lines
3.9 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 %}Hermes Agent Web{% endblock %}</title>
|
|
<style>
|
|
:root {
|
|
--bg: #0f1419;
|
|
--surface: #1a2332;
|
|
--border: #2d3a4d;
|
|
--text: #e7edf4;
|
|
--muted: #8b9cb3;
|
|
--accent: #3d9eff;
|
|
--danger: #f0696a;
|
|
--ok: #4cc38a;
|
|
--warn: #e6b35a;
|
|
}
|
|
* { box-sizing: border-box; }
|
|
body {
|
|
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
margin: 0;
|
|
line-height: 1.5;
|
|
min-height: 100vh;
|
|
}
|
|
a { color: var(--accent); text-decoration: none; }
|
|
a:hover { text-decoration: underline; }
|
|
header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 1rem 1.25rem;
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--surface);
|
|
}
|
|
header h1 { font-size: 1.125rem; margin: 0; font-weight: 600; }
|
|
main { max-width: 960px; margin: 0 auto; padding: 1.25rem; }
|
|
.flash {
|
|
padding: 0.75rem 1rem;
|
|
border-radius: 8px;
|
|
margin-bottom: 1rem;
|
|
border: 1px solid var(--border);
|
|
}
|
|
.flash.success { border-color: #2a5c42; background: #15251c; color: #b8e8c8; }
|
|
.flash.error { border-color: #6b3030; background: #251515; color: #f5c0c0; }
|
|
.flash.warning { border-color: #6b5a30; background: #252015; color: #f0dfb0; }
|
|
.muted { color: var(--muted); font-size: 0.875rem; }
|
|
button, .btn {
|
|
font: inherit;
|
|
cursor: pointer;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
padding: 0.35rem 0.65rem;
|
|
}
|
|
button.primary { background: #1a4d7a; border-color: #2563a8; }
|
|
button.danger { background: #4a2525; border-color: #8b4040; color: #fecaca; }
|
|
button.linkish {
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--accent);
|
|
padding: 0;
|
|
}
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 0.9rem;
|
|
}
|
|
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
|
|
th { color: var(--muted); font-weight: 500; }
|
|
code { font-size: 0.85em; background: #0c1017; padding: 0.15rem 0.35rem; border-radius: 4px; }
|
|
.row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
|
|
textarea.code {
|
|
width: 100%;
|
|
min-height: 420px;
|
|
font-family: ui-monospace, "SF Mono", Menlo, monospace;
|
|
font-size: 0.85rem;
|
|
background: #0c1017;
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 0.75rem;
|
|
resize: vertical;
|
|
}
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 0.12rem 0.45rem;
|
|
border-radius: 999px;
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
}
|
|
.badge.ok { background: #1a3d2a; color: #8fe3b0; }
|
|
.badge.off { background: #2a2a2a; color: #aaa; }
|
|
.badge.err { background: #3d1a1a; color: #f0a0a0; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1><a href="{{ url_for('index') }}" style="color:inherit;text-decoration:none;">Hermes Agent Web</a></h1>
|
|
{% if session.get('logged_in') %}
|
|
<form method="post" action="{{ url_for('logout') }}" style="margin:0;">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<button type="submit" class="linkish">退出</button>
|
|
</form>
|
|
{% endif %}
|
|
</header>
|
|
<main>
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, msg in messages %}
|
|
<div class="flash {{ category }}">{{ msg }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% block body %}{% endblock %}
|
|
</main>
|
|
</body>
|
|
</html>
|