@nestim/koishi-plugin-qqgm-webui 0.2.22 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/README.md +39 -56
- package/index.js +170 -11
- package/lib/bot.js +44 -0
- package/lib/data.js +49 -8
- package/lib/logbuf.js +79 -0
- package/lib/main-schema.js +16 -0
- package/lib/plugin-config.js +236 -0
- package/package.json +33 -29
- package/public/app.js +997 -190
- package/public/index.html +65 -147
- package/public/styles.css +117 -21
package/public/index.html
CHANGED
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<div class="app">
|
|
11
|
-
<aside class="sidebar">
|
|
11
|
+
<aside class="sidebar" id="sidebar">
|
|
12
12
|
<div class="brand">
|
|
13
13
|
<div class="brand-mark">Q</div>
|
|
14
14
|
<div class="brand-text">
|
|
15
15
|
<strong>QQGM</strong>
|
|
16
16
|
<span>AI OPS</span>
|
|
17
17
|
</div>
|
|
18
|
+
<button class="nav-close" id="navClose" title="关闭菜单" aria-label="关闭菜单">✕</button>
|
|
18
19
|
</div>
|
|
19
20
|
|
|
20
21
|
<nav class="nav">
|
|
@@ -25,7 +26,6 @@
|
|
|
25
26
|
<button class="nav-item" data-page="plugins">
|
|
26
27
|
<svg viewBox="0 0 24 24"><path d="M9 3h6v3h3a2 2 0 0 1 2 2v3h-3a3 3 0 1 0 0 6h3v3a2 2 0 0 1-2 2h-3v-3a3 3 0 1 0-6 0v3H6a2 2 0 0 1-2-2v-3H7a3 3 0 1 0 0-6H4V8a2 2 0 0 1 2-2h3V3Z"/></svg>
|
|
27
28
|
<span>插件</span>
|
|
28
|
-
<em class="nav-dot"></em>
|
|
29
29
|
</button>
|
|
30
30
|
<button class="nav-item" data-page="monitor">
|
|
31
31
|
<svg viewBox="0 0 24 24"><path d="M4 19V5m0 14h16M8 16l3-5 3 2 4-7"/></svg>
|
|
@@ -37,9 +37,12 @@
|
|
|
37
37
|
<span class="nav-badge">128</span>
|
|
38
38
|
</button>
|
|
39
39
|
<div class="nav-section">主插件</div>
|
|
40
|
-
<button class="nav-sub" data-page="main-schema"
|
|
41
|
-
<button class="nav-item" data-page="config">
|
|
40
|
+
<button class="nav-sub nav-sub-icon" data-page="main-schema">
|
|
42
41
|
<svg viewBox="0 0 24 24"><path d="M12 15.5A3.5 3.5 0 1 0 12 8.5a3.5 3.5 0 0 0 0 7Zm8-3.5c0-.6-.06-1.16-.18-1.7l2.02-1.58-2-3.46-2.38.96a8.2 8.2 0 0 0-2.94-1.7L14.2 2h-4.4l-.32 2.52a8.2 8.2 0 0 0-2.94 1.7L4.16 5.26l-2 3.46 2.02 1.58A8.6 8.6 0 0 0 4 12c0 .6.06 1.16.18 1.7l-2.02 1.58 2 3.46 2.38-.96a8.2 8.2 0 0 0 2.94 1.7L9.8 22h4.4l.32-2.52a8.2 8.2 0 0 0 2.94-1.7l2.38.96 2-3.46-2.02-1.58c.12-.54.18-1.1.18-1.7Z"/></svg>
|
|
42
|
+
<span>主插件配置</span>
|
|
43
|
+
</button>
|
|
44
|
+
<button class="nav-item" data-page="config">
|
|
45
|
+
<svg viewBox="0 0 24 24"><path d="m12 3 9 5-9 5-9-5 9-5Zm-9 9 9 5 9-5M3 16l9 5 9-5"/></svg>
|
|
43
46
|
<span>附属配置</span>
|
|
44
47
|
</button>
|
|
45
48
|
<button class="nav-item" data-page="logs">
|
|
@@ -49,26 +52,27 @@
|
|
|
49
52
|
</nav>
|
|
50
53
|
|
|
51
54
|
<div class="sidebar-footer">
|
|
52
|
-
<div class="sys-line"><span class="pulse"></span
|
|
53
|
-
<div class="sys-meta">Koishi
|
|
55
|
+
<div class="sys-line"><span class="pulse" id="sysPulse"></span><span id="sysOnline">系统状态</span> <b id="sysBots">-</b></div>
|
|
56
|
+
<div class="sys-meta" id="sysMeta">Koishi · 读取中</div>
|
|
54
57
|
</div>
|
|
55
58
|
</aside>
|
|
59
|
+
<div class="sidebar-backdrop" id="sidebarBackdrop" hidden></div>
|
|
56
60
|
|
|
57
61
|
<main class="main">
|
|
58
62
|
<header class="topbar">
|
|
59
|
-
<div class="
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
<div class="topbar-left">
|
|
64
|
+
<button class="menu-btn" id="menuBtn" title="打开菜单" aria-label="打开菜单">
|
|
65
|
+
<svg viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h16"/></svg>
|
|
66
|
+
</button>
|
|
67
|
+
<div class="crumb">
|
|
68
|
+
<span class="crumb-muted">QQGM</span>
|
|
69
|
+
<span class="crumb-sep">/</span>
|
|
70
|
+
<strong id="pageTitle">总览</strong>
|
|
71
|
+
</div>
|
|
63
72
|
</div>
|
|
64
73
|
<div class="top-actions">
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
<input id="globalSearch" placeholder="搜索插件、群号、trace…" />
|
|
68
|
-
</label>
|
|
69
|
-
<span class="pill online"><i></i> Bot 在线</span>
|
|
70
|
-
<button class="icon-btn" title="刷新">⟳</button>
|
|
71
|
-
<button class="icon-btn" title="通知">◌</button>
|
|
74
|
+
<span class="pill" id="botStatus" title="Bot 连接状态"><i></i><b>检查中</b></span>
|
|
75
|
+
<button class="icon-btn" id="refreshData" title="刷新数据">⟳</button>
|
|
72
76
|
</div>
|
|
73
77
|
</header>
|
|
74
78
|
|
|
@@ -77,13 +81,12 @@
|
|
|
77
81
|
<div id="overview-monitor">
|
|
78
82
|
<div class="page-head">
|
|
79
83
|
<div>
|
|
80
|
-
<h1>总览 <span class="proto-tag"
|
|
84
|
+
<h1>总览 <span class="proto-tag">实时</span></h1>
|
|
81
85
|
<p>今天 12-02 · 数据来自 qqgm-monitor SQLite</p>
|
|
82
86
|
</div>
|
|
83
87
|
<div class="head-actions">
|
|
84
|
-
<button class="
|
|
85
|
-
<button class="btn
|
|
86
|
-
<button class="btn primary" data-toast="已刷新(原型为 mock 数据)">刷新数据</button>
|
|
88
|
+
<button class="btn ghost" id="exportSnapshot">导出快照</button>
|
|
89
|
+
<button class="btn primary" id="refreshOverview">刷新数据</button>
|
|
87
90
|
</div>
|
|
88
91
|
</div>
|
|
89
92
|
|
|
@@ -117,11 +120,11 @@
|
|
|
117
120
|
<div class="grid two">
|
|
118
121
|
<article class="card chart-card">
|
|
119
122
|
<div class="card-head">
|
|
120
|
-
<div><h2>调用趋势</h2><p>最近 7 天 · 调用次数 / token</p></div>
|
|
121
|
-
<select class="select tiny"><option>最近 7 天</option><option>最近 30 天</option></select>
|
|
123
|
+
<div><h2>调用趋势</h2><p id="trendSub">最近 7 天 · 调用次数 / token</p></div>
|
|
124
|
+
<select class="select tiny" id="trendRange"><option value="7">最近 7 天</option><option value="30">最近 30 天</option></select>
|
|
122
125
|
</div>
|
|
123
126
|
<div class="chart-legend"><span><i class="dot blue"></i>调用</span><span><i class="dot cyan"></i>token</span></div>
|
|
124
|
-
<svg class="line-chart" viewBox="0 0 720 210" preserveAspectRatio="none">
|
|
127
|
+
<svg class="line-chart" id="trendChart" viewBox="0 0 720 210" preserveAspectRatio="none">
|
|
125
128
|
<defs>
|
|
126
129
|
<linearGradient id="g1" x1="0" x2="0" y1="0" y2="1"><stop offset="0" stop-color="#5b8def" stop-opacity=".22"/><stop offset="1" stop-color="#5b8def" stop-opacity="0"/></linearGradient>
|
|
127
130
|
</defs>
|
|
@@ -131,7 +134,7 @@
|
|
|
131
134
|
<path class="line cyan dashed" d="M0 185 C70 175 110 180 160 150 S240 155 290 130 S380 150 430 110 S520 130 570 95 S660 90 720 70"/>
|
|
132
135
|
<g class="dots"><circle cx="130" cy="120" r="3"/><circle cx="260" cy="110" r="3"/><circle cx="390" cy="70" r="3"/><circle cx="520" cy="80" r="3"/><circle cx="660" cy="50" r="3"/></g>
|
|
133
136
|
</svg>
|
|
134
|
-
<div class="axis"><span>11-26</span><span>11-27</span><span>11-28</span><span>11-29</span><span>11-30</span><span>12-01</span><span>12-02</span></div>
|
|
137
|
+
<div class="axis" id="trendAxis"><span>11-26</span><span>11-27</span><span>11-28</span><span>11-29</span><span>11-30</span><span>12-01</span><span>12-02</span></div>
|
|
135
138
|
</article>
|
|
136
139
|
|
|
137
140
|
<article class="card">
|
|
@@ -170,13 +173,12 @@
|
|
|
170
173
|
|
|
171
174
|
<article class="card plugins-mini">
|
|
172
175
|
<div class="card-head">
|
|
173
|
-
<div><h2>附属插件</h2><p
|
|
176
|
+
<div><h2>附属插件</h2><p id="pluginMiniCount">自动识别</p></div>
|
|
174
177
|
<button class="link-btn" data-nav="plugins">管理 →</button>
|
|
175
178
|
</div>
|
|
176
|
-
<div
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
<div class="plugin-line"><span class="plugin-ico purple">P</span><div><b>qqgm-private</b><small>私聊 · 1.0.3</small></div><i class="on"></i></div>
|
|
179
|
+
<div id="pluginMiniList">
|
|
180
|
+
<div class="plugin-line"><span class="plugin-ico blue">M</span><div><b>qqgm-monitor</b><small>监控</small></div><i class="on"></i></div>
|
|
181
|
+
</div>
|
|
180
182
|
</article>
|
|
181
183
|
</div>
|
|
182
184
|
<div class="overview-meta">@nestim/koishi-plugin-qq-group-manager v1.6.0 · 作者 Miseat · 监控 1.0.4</div>
|
|
@@ -191,7 +193,7 @@
|
|
|
191
193
|
<button class="btn primary" id="installMonitor">一键安装监控</button>
|
|
192
194
|
<a class="btn ghost" href="https://github.com/Miseat/koishi-plugin-qqgm-monitor" target="_blank" rel="noreferrer">GitHub</a>
|
|
193
195
|
<a class="btn ghost" href="https://www.npmjs.com/package/@nestim/koishi-plugin-qqgm-monitor" target="_blank" rel="noreferrer">npm</a>
|
|
194
|
-
<button class="link-btn" id="demoMonitor">预览:已装监控 →</button>
|
|
196
|
+
<button class="link-btn" id="demoMonitor" hidden>预览:已装监控 →</button>
|
|
195
197
|
</div>
|
|
196
198
|
</div>
|
|
197
199
|
|
|
@@ -229,9 +231,9 @@
|
|
|
229
231
|
<section class="page" id="page-plugins">
|
|
230
232
|
<div class="page-head">
|
|
231
233
|
<div><h1>插件</h1><p>自动扫描 koishi.yml 与 node_modules,只显示附属插件</p></div>
|
|
232
|
-
<button class="btn primary"
|
|
234
|
+
<button class="btn primary" id="rescanPlugins">重新扫描</button>
|
|
233
235
|
</div>
|
|
234
|
-
<div class="plugin-grid">
|
|
236
|
+
<div class="plugin-grid" id="pluginGrid">
|
|
235
237
|
<article class="plugin-card">
|
|
236
238
|
<div class="plugin-card-top"><span class="plugin-ico blue big">M</span><div><h3>qqgm-monitor</h3><p>@nestim/koishi-plugin-qqgm-monitor</p></div><span class="status ok">运行中</span></div>
|
|
237
239
|
<div class="plugin-meta"><span>v1.0.4</span><span>6 个事件</span><span>SQLite</span></div>
|
|
@@ -271,43 +273,37 @@
|
|
|
271
273
|
<section class="page" id="page-monitor">
|
|
272
274
|
<div class="page-head">
|
|
273
275
|
<div><h1>监控</h1><p>总失败率与分群失败率;延迟按回复消息拆阶段</p></div>
|
|
274
|
-
<div class="head-actions"><select class="select"><option>今日</option><option>最近 7 天</option></select><button class="btn ghost"
|
|
276
|
+
<div class="head-actions"><select class="select" id="monitorRange"><option value="1">今日</option><option value="7">最近 7 天</option></select><button class="btn ghost" id="monitorExport">导出 JSON</button></div>
|
|
275
277
|
</div>
|
|
276
278
|
<div class="metrics three">
|
|
277
|
-
<article class="metric"><div class="metric-top"><span>调用</span><em class="trend">今日</em></div><div class="metric-value">
|
|
278
|
-
<article class="metric"><div class="metric-top"><span>失败率</span><em class="trend danger">
|
|
279
|
-
<article class="metric"><div class="metric-top"><span>账户消耗</span><em class="trend"
|
|
279
|
+
<article class="metric"><div class="metric-top"><span>调用</span><em class="trend" id="monitorRangeLabel">今日</em></div><div class="metric-value" id="monitorCalls">0</div><div class="metric-foot" id="monitorTokens">Token 0 · 成本未配置</div></article>
|
|
280
|
+
<article class="metric"><div class="metric-top"><span>失败率</span><em class="trend danger" id="monitorFailRate">0%</em></div><div class="metric-value" id="monitorFail">0 <small>次</small></div><div class="metric-foot" id="monitorFailFoot">解析 0 · 超时 0 · 其他 0</div></article>
|
|
281
|
+
<article class="metric"><div class="metric-top"><span>账户消耗</span><em class="trend">账户</em></div><div class="metric-value" id="monitorCost">—</div><div class="metric-foot" id="monitorBalance">余额未知</div></article>
|
|
280
282
|
</div>
|
|
281
283
|
<div class="grid two">
|
|
282
284
|
<article class="card">
|
|
283
|
-
<div class="card-head"><div><h2>分群失败率</h2><p>延迟不按群拆,失败率按群看</p></div><span class="badge soft">
|
|
285
|
+
<div class="card-head"><div><h2>分群失败率</h2><p>延迟不按群拆,失败率按群看</p></div><span class="badge soft" id="monitorGroupCount">0 个群</span></div>
|
|
284
286
|
<table class="table compact">
|
|
285
287
|
<thead><tr><th>群</th><th>调用</th><th>失败</th><th>失败率</th><th>Token</th></tr></thead>
|
|
286
|
-
<tbody><tr><td
|
|
287
|
-
<tr><td>343850842</td><td>2</td><td>0</td><td><span class="status ok">0.0%</span></td><td>6.6k</td></tr>
|
|
288
|
-
<tr><td>869328396</td><td>1</td><td>0</td><td><span class="status ok">0.0%</span></td><td>3.3k</td></tr></tbody>
|
|
288
|
+
<tbody id="monitorGroups"><tr><td colspan="5">暂无数据</td></tr></tbody>
|
|
289
289
|
</table>
|
|
290
290
|
</article>
|
|
291
291
|
<article class="card">
|
|
292
292
|
<div class="card-head"><div><h2>延迟分位</h2><p>P50 / P95 / P99</p></div></div>
|
|
293
|
-
<div class="p95-grid">
|
|
294
|
-
<div><span>E2E</span><b
|
|
295
|
-
<div><span>模型</span><b
|
|
296
|
-
<div><span>渲染</span><b
|
|
297
|
-
<div><span>发送</span><b
|
|
293
|
+
<div class="p95-grid" id="monitorLatency">
|
|
294
|
+
<div><span>E2E</span><b>—</b><small>收到→发出</small></div>
|
|
295
|
+
<div><span>模型</span><b>—</b><small>API 调用</small></div>
|
|
296
|
+
<div><span>渲染</span><b>—</b><small>过滤/表情</small></div>
|
|
297
|
+
<div><span>发送</span><b>—</b><small>OneBot</small></div>
|
|
298
298
|
</div>
|
|
299
299
|
<p class="hint">P50=一半请求比它快;P95=95% 比它快;P99=99% 比它快。</p>
|
|
300
300
|
</article>
|
|
301
301
|
</div>
|
|
302
302
|
<article class="card">
|
|
303
|
-
<div class="card-head"><div><h2>调用明细</h2><p
|
|
303
|
+
<div class="card-head"><div><h2>调用明细</h2><p>最近 8 次调用</p></div><label class="search small-search"><svg viewBox="0 0 24 24"><circle cx="11" cy="11" r="6"/><path d="m16 16 4 4"/></svg><input id="monitorSearch" placeholder="过滤群号 / 状态" /></label></div>
|
|
304
304
|
<table class="table">
|
|
305
305
|
<thead><tr><th>时间</th><th>Trace</th><th>来源</th><th>模型</th><th>入/出</th><th>耗时</th><th>状态</th></tr></thead>
|
|
306
|
-
<tbody>
|
|
307
|
-
<tr><td>19:02:41</td><td><code>m8k2p1</code></td><td>群 1103369527</td><td>deepseek-chat</td><td>2.1k / 320</td><td>3.0s</td><td><span class="status ok">成功</span></td></tr>
|
|
308
|
-
<tr><td>19:01:58</td><td><code>m8k2n4</code></td><td>群 1103369527</td><td>deepseek-chat</td><td>2.8k / 410</td><td>8.8s</td><td><span class="status ok">成功</span></td></tr>
|
|
309
|
-
<tr><td>18:58:12</td><td><code>m8k1x9</code></td><td>私聊</td><td>deepseek-chat</td><td>1.0k / 0</td><td>9.9s</td><td><span class="status fail">解析失败</span></td></tr>
|
|
310
|
-
</tbody>
|
|
306
|
+
<tbody id="monitorRecent"><tr><td colspan="7">暂无数据</td></tr></tbody>
|
|
311
307
|
</table>
|
|
312
308
|
</article>
|
|
313
309
|
</section>
|
|
@@ -358,113 +354,35 @@
|
|
|
358
354
|
</section>
|
|
359
355
|
|
|
360
356
|
<section class="page" id="page-config">
|
|
361
|
-
<div class="page-head"><div><h1>附属配置</h1><p
|
|
357
|
+
<div class="page-head"><div><h1>附属配置</h1><p>自动读取插件 Schema 与 koishi.yml;每个字段都有说明,保存前备份</p></div></div>
|
|
362
358
|
<div class="config-layout">
|
|
363
|
-
<aside class="card config-nav">
|
|
364
|
-
|
|
365
|
-
<button class="config-plugin active" data-config="monitor"><span class="plugin-ico blue">M</span><div><b>qqgm-monitor</b><small>监控 · 已安装</small></div></button>
|
|
366
|
-
<button class="config-plugin" data-config="meme"><span class="plugin-ico green">E</span><div><b>qqgm-meme</b><small>表情包 · 已安装</small></div></button>
|
|
367
|
-
<button class="config-plugin" data-config="chat"><span class="plugin-ico orange">S</span><div><b>qqgm-chat-style</b><small>聊天风格 · 已安装</small></div></button>
|
|
368
|
-
<button class="config-plugin" data-config="private"><span class="plugin-ico purple">P</span><div><b>qqgm-private</b><small>私聊 · 已安装</small></div></button>
|
|
369
|
-
<button class="config-plugin" data-config="webui"><span class="plugin-ico slate">W</span><div><b>qqgm-webui</b><small>本插件 · 已安装</small></div></button>
|
|
370
|
-
<button class="config-plugin" data-config="memory"><span class="plugin-ico muted">R</span><div><b>qqgm-memory</b><small>记忆管理 · 已安装</small></div></button>
|
|
371
|
-
</aside>
|
|
372
|
-
|
|
373
|
-
<div class="card config-form">
|
|
374
|
-
<div class="side-panel active" data-panel="monitor">
|
|
375
|
-
<div class="form-head"><div><h2>qqgm-monitor</h2><p>@nestim/koishi-plugin-qqgm-monitor · v1.0.4</p></div><span class="status ok">运行中</span></div>
|
|
376
|
-
<div class="form-section"><h3>采集</h3>
|
|
377
|
-
<label class="field"><span>启用监控</span><input type="checkbox" checked /></label>
|
|
378
|
-
<label class="field"><span>数据库文件</span><input value="data/qqgm-monitor.sqlite" /></label>
|
|
379
|
-
<label class="field"><span>明细保留天数</span><input type="number" value="30" /></label>
|
|
380
|
-
</div>
|
|
381
|
-
<div class="form-section"><h3>成本</h3>
|
|
382
|
-
<div class="field-row"><label class="field"><span>输入价格(元/百万)</span><input type="number" value="0" /></label><label class="field"><span>输出价格(元/百万)</span><input type="number" value="0" /></label></div>
|
|
383
|
-
<p class="hint">为 0 时显示“成本未配置”,不会显示成 ¥0。</p>
|
|
384
|
-
<label class="field"><span>余额查询厂家</span><select><option>auto(推荐)</option><option>deepseek</option><option>openrouter</option><option>moonshot</option><option>siliconflow</option><option>none</option></select></label>
|
|
385
|
-
</div>
|
|
386
|
-
<div class="form-foot"><span>保存前备份 koishi.yml</span><div><button class="btn ghost" data-toast="已还原(原型)">还原</button><button class="btn primary" data-toast="配置已保存(原型,不写盘)">保存</button></div></div>
|
|
387
|
-
</div>
|
|
388
|
-
|
|
389
|
-
<div class="side-panel" data-panel="meme">
|
|
390
|
-
<div class="form-head"><div><h2>qqgm-meme</h2><p>@nestim/koishi-plugin-qqgm-meme · v1.1.1</p></div><span class="status ok">运行中</span></div>
|
|
391
|
-
<div class="form-section"><h3>选择</h3>
|
|
392
|
-
<label class="field"><span>选择模式</span><select><option>hybrid 复合</option><option>candidates 候选</option><option>description 描述</option></select></label>
|
|
393
|
-
<label class="field"><span>候选数量</span><input type="number" value="3" /></label>
|
|
394
|
-
<label class="field"><span>追加概率</span><input type="number" value="0.4" step="0.05" /></label>
|
|
395
|
-
<label class="field"><span>最低匹配分</span><input type="number" value="1.2" step="0.1" /></label>
|
|
396
|
-
</div>
|
|
397
|
-
<div class="form-foot"><span>图库 274 张 · 目录 catalog.md</span><div><button class="btn primary" data-toast="配置已保存(原型)">保存</button></div></div>
|
|
398
|
-
</div>
|
|
399
|
-
|
|
400
|
-
<div class="side-panel" data-panel="chat">
|
|
401
|
-
<div class="form-head"><div><h2>qqgm-chat-style</h2><p>@nestim/koishi-plugin-qqgm-chat-style · v1.1.1</p></div><span class="status ok">运行中</span></div>
|
|
402
|
-
<div class="form-section"><h3>风格</h3>
|
|
403
|
-
<label class="field"><span>主风格</span><select><option>northern-netizen-chat</option></select></label>
|
|
404
|
-
<label class="field"><span>追加风格</span><select><option>naruto-mobile-chat</option></select></label>
|
|
405
|
-
<label class="field"><span>追加概率</span><input type="number" value="0.3" step="0.05" /></label>
|
|
406
|
-
</div>
|
|
407
|
-
<div class="form-foot"><span>分群配置 1 个</span><div><button class="btn primary" data-toast="配置已保存(原型)">保存</button></div></div>
|
|
408
|
-
</div>
|
|
409
|
-
|
|
410
|
-
<div class="side-panel" data-panel="private">
|
|
411
|
-
<div class="form-head"><div><h2>qqgm-private</h2><p>@nestim/koishi-plugin-qqgm-private · v1.0.3</p></div><span class="status ok">运行中</span></div>
|
|
412
|
-
<div class="form-section"><h3>私聊</h3>
|
|
413
|
-
<label class="field"><span>启用</span><input type="checkbox" checked /></label>
|
|
414
|
-
<label class="field"><span>回复间隔(秒)</span><input type="number" value="2" /></label>
|
|
415
|
-
<label class="field"><span>上下文字数</span><input type="number" value="20" /></label>
|
|
416
|
-
<label class="field"><span>主动私发</span><input type="checkbox" /></label>
|
|
417
|
-
</div>
|
|
418
|
-
<div class="form-foot"><span>复用主插件模型与风格</span><div><button class="btn primary" data-toast="配置已保存(原型)">保存</button></div></div>
|
|
419
|
-
</div>
|
|
420
|
-
|
|
421
|
-
<div class="side-panel" data-panel="webui">
|
|
422
|
-
<div class="form-head"><div><h2>qqgm-webui</h2><p>@nestim/koishi-plugin-qqgm-webui · v0.1.0</p></div><span class="status ok">本插件</span></div>
|
|
423
|
-
<div class="form-section"><h3>访问</h3>
|
|
424
|
-
<label class="field"><span>挂载路径</span><input value="/qqgm" /></label>
|
|
425
|
-
<label class="field"><span>访问令牌</span><input type="password" value="••••••••" /></label>
|
|
426
|
-
<label class="field"><span>允许非本机访问</span><input type="checkbox" /></label>
|
|
427
|
-
</div>
|
|
428
|
-
<div class="form-foot"><span>公网访问必须设置 token</span><div><button class="btn primary" data-toast="配置已保存(原型)">保存</button></div></div>
|
|
429
|
-
</div>
|
|
430
|
-
|
|
431
|
-
<div class="side-panel" data-panel="memory">
|
|
432
|
-
<div class="form-head"><div><h2>qqgm-memory</h2><p>@nestim/koishi-plugin-qqgm-memory · v1.0.0</p></div><span class="status ok">运行中</span></div>
|
|
433
|
-
<div class="form-section"><h3>数据库</h3>
|
|
434
|
-
<label class="field"><span>SQLite 文件</span><input value="data/qqgm-memory.sqlite" /></label>
|
|
435
|
-
<label class="field"><span>主插件记忆后端</span><input value="md(默认)" disabled /></label>
|
|
436
|
-
<p class="hint">主插件当前是 MD。把主插件 <code>memoryBackend</code> 改为 <code>sqlite</code> 后,本插件才接管数据;迁移前先备份 MD。</p>
|
|
437
|
-
</div>
|
|
438
|
-
<div class="form-section"><h3>迁移</h3>
|
|
439
|
-
<p class="hint">切到 SQLite 后执行 <code>memdb migrate</code> 导入 Memory_*.md;改回 md 可回滚。当前库 0 条。</p>
|
|
440
|
-
</div>
|
|
441
|
-
<div class="form-foot"><span>和主插件共用同一个 DB 文件</span><div><button class="btn ghost" data-toast="已还原(原型)">还原</button><button class="btn primary" data-toast="记忆配置已保存(原型)">保存</button></div></div>
|
|
442
|
-
</div>
|
|
443
|
-
</div>
|
|
359
|
+
<aside class="card config-nav" id="pluginConfigNav"><div class="schema-loading">读取插件…</div></aside>
|
|
360
|
+
<div class="card config-form" id="pluginConfigForm"><div class="schema-loading">选择一个插件</div></div>
|
|
444
361
|
</div>
|
|
445
362
|
</section>
|
|
446
363
|
|
|
447
364
|
<section class="page" id="page-logs">
|
|
448
|
-
<div class="page-head"><div><h1>日志</h1><p
|
|
365
|
+
<div class="page-head"><div><h1>日志</h1><p>进程内实时日志;默认保留最近 2000 行,可按级别和关键词过滤</p></div>
|
|
366
|
+
<div class="head-actions">
|
|
367
|
+
<label class="search"><svg viewBox="0 0 24 24"><circle cx="11" cy="11" r="6"/><path d="m16 16 4 4"/></svg><input id="logSearch" placeholder="过滤关键词" /></label>
|
|
368
|
+
<button class="btn ghost" id="logPause">暂停</button>
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
449
371
|
<div class="card log-card">
|
|
450
|
-
<div class="log-toolbar"
|
|
451
|
-
|
|
452
|
-
<
|
|
453
|
-
<div class="log-line"><time>19:02:40.812</time><span class="lvl info">INFO</span><span class="src">nestim-qq-group-manager</span><p>[ai] reply sent trace=m8k2p1 e2e=3021ms</p></div>
|
|
454
|
-
<div class="log-line"><time>19:01:58.442</time><span class="lvl warn">WARN</span><span class="src">qqgm-monitor</span><p>model call slow: 8.8s (trace=m8k2n4 kind=reply)</p></div>
|
|
455
|
-
<div class="log-line"><time>18:58:12.108</time><span class="lvl error">ERROR</span><span class="src">nestim-qq-group-manager</span><p>[ai] reply failed: empty response (trace=m8k1x9)</p></div>
|
|
456
|
-
<div class="log-line"><time>18:55:03.771</time><span class="lvl info">INFO</span><span class="src">qqgm-meme</span><p>sent M0107 gist=干饭快乐 tags=干饭,白饭</p></div>
|
|
457
|
-
<div class="log-line"><time>18:51:47.529</time><span class="lvl info">INFO</span><span class="src">qqgm-monitor</span><p>memory.committed scope=group:1103369527 category=偏好 chars=42</p></div>
|
|
372
|
+
<div class="log-toolbar">
|
|
373
|
+
<div class="chips" id="logChips"><button class="chip active" data-level="all">全部</button><button class="chip" data-level="info">INFO</button><button class="chip" data-level="warn">WARN</button><button class="chip" data-level="error">ERROR</button></div>
|
|
374
|
+
<span class="log-meta" id="logMeta">读取中…</span>
|
|
458
375
|
</div>
|
|
376
|
+
<div class="log-view" id="logView"><div class="log-empty">暂无日志</div></div>
|
|
459
377
|
</div>
|
|
460
378
|
</section>
|
|
461
379
|
</div>
|
|
462
380
|
|
|
463
381
|
<footer class="statusbar">
|
|
464
|
-
<span><i class="pulse"></i>
|
|
465
|
-
<span>
|
|
466
|
-
<span
|
|
467
|
-
<span class="right"
|
|
382
|
+
<span><i class="pulse" id="statusPulse"></i> <span id="statusRoute">/qqgm</span></span>
|
|
383
|
+
<span id="statusBots">Bot -</span>
|
|
384
|
+
<span id="statusCalls">-</span>
|
|
385
|
+
<span class="right" id="statusRight">读取 Koishi 状态</span>
|
|
468
386
|
</footer>
|
|
469
387
|
</main>
|
|
470
388
|
</div>
|
package/public/styles.css
CHANGED
|
@@ -41,6 +41,9 @@ svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round
|
|
|
41
41
|
.nav-sub:hover { color: #e8eefb; background: rgba(255,255,255,.04); }
|
|
42
42
|
.nav-sub.active { color: #9db9f5; background: rgba(79,125,243,.1); }
|
|
43
43
|
.nav-sub.active::before { background: #6f96ee; box-shadow: 0 0 0 3px rgba(111,150,238,.14); }
|
|
44
|
+
.nav-sub-icon { padding-left: 12px; gap: 10px; justify-content: flex-start; }
|
|
45
|
+
.nav-sub-icon::before { display: none; }
|
|
46
|
+
.nav-sub-icon svg { width: 17px; height: 17px; flex: 0 0 auto; }
|
|
44
47
|
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #93a1b8; font-size: 13.5px; text-align: left; transition: .15s; position: relative; }
|
|
45
48
|
.nav-item svg { width: 18px; height: 18px; opacity: .9; }
|
|
46
49
|
.pulse { width: 7px; height: 7px; background: #34d399; border-radius: 50%; box-shadow: 0 0 0 4px rgba(52,211,153,.12); display: inline-block; flex: 0 0 auto; }
|
|
@@ -59,8 +62,14 @@ svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round
|
|
|
59
62
|
.user div:nth-child(2) { display: flex; flex-direction: column; line-height: 1.2; }
|
|
60
63
|
.user strong { font-size: 12px; color: #e8eefb; font-weight: 600; }
|
|
61
64
|
.user span { font-size: 10px; color: #71829c; margin-top: 3px; }
|
|
62
|
-
.icon-btn { width: 30px; height: 30px; border-radius: 8px; color: #8ea0ba; display: grid; place-items: center;
|
|
65
|
+
.icon-btn { width: 30px; height: 30px; border-radius: 8px; color: #8ea0ba; display: grid; place-items: center; }
|
|
63
66
|
.icon-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
|
|
67
|
+
.menu-btn { display: none; width: 34px; height: 34px; border-radius: 9px; color: #53637a; background: #fff; border: 1px solid var(--line); place-items: center; flex: 0 0 auto; }
|
|
68
|
+
.menu-btn svg { width: 18px; height: 18px; }
|
|
69
|
+
.menu-btn:hover { border-color: #c8d4e4; }
|
|
70
|
+
.nav-close { display: none; margin-left: auto; width: 28px; height: 28px; border-radius: 8px; color: #8fa0b9; background: rgba(255,255,255,.06); }
|
|
71
|
+
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
|
|
72
|
+
.sidebar-backdrop { display: none; }
|
|
64
73
|
|
|
65
74
|
/* main */
|
|
66
75
|
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
|
|
@@ -74,9 +83,13 @@ svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round
|
|
|
74
83
|
.search svg { width: 15px; height: 15px; color: #9aa8bb; }
|
|
75
84
|
.search input { border: 0; outline: 0; background: transparent; font-size: 12px; width: 100%; color: #3b4a60; }
|
|
76
85
|
.search input::placeholder { color: #aab5c5; }
|
|
77
|
-
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; border-radius: 20px; padding: 5px 10px; }
|
|
86
|
+
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; border-radius: 20px; padding: 5px 10px; background: #f1f4f8; color: #77869a; }
|
|
87
|
+
.pill b { font-weight: 600; }
|
|
78
88
|
.pill.online { color: #17845b; background: #e8f7f0; }
|
|
79
89
|
.pill.online i { width: 6px; height: 6px; background: #21b47b; border-radius: 50%; }
|
|
90
|
+
.pill.offline { color: #b23b3b; background: #fdeeee; }
|
|
91
|
+
.pill.offline i { width: 6px; height: 6px; background: #d9534f; border-radius: 50%; }
|
|
92
|
+
.pulse.off { background: #94a3b8; box-shadow: 0 0 0 4px rgba(148,163,184,.12); }
|
|
80
93
|
.top-actions .icon-btn { color: #7d8ba1; background: #fff; border: 1px solid var(--line); font-size: 15px; }
|
|
81
94
|
.content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 26px 28px 34px; }
|
|
82
95
|
.page { display: none; animation: fade .18s ease; }
|
|
@@ -137,7 +150,8 @@ svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round
|
|
|
137
150
|
.line-chart .line.cyan { stroke: var(--cyan); }
|
|
138
151
|
.line-chart .dashed { stroke-dasharray: 4 4; opacity: .8; }
|
|
139
152
|
.line-chart .dots circle { fill: #fff; stroke: var(--blue); stroke-width: 2; }
|
|
140
|
-
.axis { display:
|
|
153
|
+
.axis { display: grid; grid-auto-flow: column; color: #a0adbe; font-size: 10px; padding: 0 2px; }
|
|
154
|
+
.axis span { text-align: center; overflow: hidden; white-space: nowrap; }
|
|
141
155
|
.latency-list { display: flex; flex-direction: column; gap: 13px; padding-top: 2px; }
|
|
142
156
|
.lat-row { display: grid; grid-template-columns: 82px 1fr 52px; align-items: center; gap: 10px; font-size: 11.5px; color: #5f6e83; }
|
|
143
157
|
.lat-row b { text-align: right; font-weight: 650; color: #2e3d53; }
|
|
@@ -145,6 +159,11 @@ svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round
|
|
|
145
159
|
.lat-bar i { display: block; height: 100%; border-radius: 4px; }
|
|
146
160
|
.lat-total { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; color: #718096; }
|
|
147
161
|
.lat-total b { font-size: 15px; color: #1c2a3d; }
|
|
162
|
+
.p95-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
|
163
|
+
.p95-grid > div { background: #f7f9fc; border: 1px solid #eef2f7; border-radius: 8px; padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
|
|
164
|
+
.p95-grid span { font-size: 10px; color: #8d9aab; }
|
|
165
|
+
.p95-grid b { font-size: 12px; color: #2f4058; overflow-wrap: anywhere; }
|
|
166
|
+
.p95-grid small { font-size: 9.5px; color: #a0adbe; }
|
|
148
167
|
.hint { font-size: 10.5px; color: #95a1b2; line-height: 1.55; margin: 12px 0 0; }
|
|
149
168
|
code { background: #f2f5f9; color: #55657d; border-radius: 4px; padding: 1px 4px; font-family: Consolas, monospace; font-size: 10.5px; }
|
|
150
169
|
|
|
@@ -158,9 +177,10 @@ code { background: #f2f5f9; color: #55657d; border-radius: 4px; padding: 1px 4px
|
|
|
158
177
|
.tag.private { color: #8a63c9; background: #f4efff; }
|
|
159
178
|
.tag.memory { color: #178c6a; background: #eaf8f2; }
|
|
160
179
|
.tag.soft { color: #6b7b90; background: #f1f4f8; }
|
|
161
|
-
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; border-radius: 5px; padding: 3px 6px; }
|
|
180
|
+
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; border-radius: 5px; padding: 3px 6px; white-space: nowrap; }
|
|
162
181
|
.status::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
|
|
163
182
|
.status.ok { color: #16875c; background: #eaf8f1; }
|
|
183
|
+
.status.warn { color: #a06a1a; background: #fff4de; }
|
|
164
184
|
.status.fail { color: #c4574d; background: #fdf0ee; }
|
|
165
185
|
.plugins-mini { display: flex; flex-direction: column; }
|
|
166
186
|
.plugin-line { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #f2f5f9; }
|
|
@@ -169,6 +189,8 @@ code { background: #f2f5f9; color: #55657d; border-radius: 4px; padding: 1px 4px
|
|
|
169
189
|
.plugin-line b { font-size: 11.5px; font-weight: 600; color: #35445a; }
|
|
170
190
|
.plugin-line small { font-size: 10px; color: #95a2b4; margin-top: 2px; }
|
|
171
191
|
.plugin-line .on { width: 6px; height: 6px; border-radius: 50%; background: #2bb37d; margin-left: auto; }
|
|
192
|
+
.plugin-line .off { width: 6px; height: 6px; border-radius: 50%; background: #c3ccd9; margin-left: auto; }
|
|
193
|
+
.plugin-card .plugin-ico { width: 38px; height: 38px; border-radius: 10px; }
|
|
172
194
|
.plugin-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
|
|
173
195
|
.plugin-ico.big { width: 38px; height: 38px; border-radius: 10px; font-size: 14px; }
|
|
174
196
|
.plugin-ico.blue { background: linear-gradient(135deg, #5b8def, #3f68d8); }
|
|
@@ -176,6 +198,9 @@ code { background: #f2f5f9; color: #55657d; border-radius: 4px; padding: 1px 4px
|
|
|
176
198
|
.plugin-ico.orange { background: linear-gradient(135deg, #f0ae5b, #dd8d2c); }
|
|
177
199
|
.plugin-ico.purple { background: linear-gradient(135deg, #a486e8, #7c5bc6); }
|
|
178
200
|
.plugin-ico.slate { background: linear-gradient(135deg, #60738d, #405067); }
|
|
201
|
+
.plugin-ico-svg svg, .group-ico svg { width: 15px; height: 15px; stroke: #fff; fill: none; }
|
|
202
|
+
.group-ico { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #4f7df3, #6a5bd8); }
|
|
203
|
+
.plugin-ico.warn { background: linear-gradient(135deg, #f0ae5b, #dd8d2c); }
|
|
179
204
|
|
|
180
205
|
/* plugins page */
|
|
181
206
|
.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
|
|
@@ -247,10 +272,11 @@ code { background: #f2f5f9; color: #55657d; border-radius: 4px; padding: 1px 4px
|
|
|
247
272
|
.chip.active { background: #eef3ff; color: #3f68d8; }
|
|
248
273
|
.log-meta { font-size: 10px; color: #9aa7b8; }
|
|
249
274
|
.log-view { background: #0f1726; color: #c6d2e4; font-family: Consolas, "Cascadia Mono", monospace; font-size: 11px; line-height: 1.8; padding: 14px 16px; min-height: 420px; }
|
|
250
|
-
.log-line { display: grid; grid-template-columns:
|
|
275
|
+
.log-line { display: grid; grid-template-columns: 86px 52px 150px minmax(0, 1fr); gap: 6px; align-items: baseline; }
|
|
251
276
|
.log-line time { color: #5f718c; }
|
|
252
277
|
.log-line .src { color: #88a2c8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
253
|
-
.log-line p { margin: 0; color: #aebbd0; white-space:
|
|
278
|
+
.log-line p { margin: 0; color: #aebbd0; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
279
|
+
.log-empty { color: #6b7f9c; font-size: 11.5px; padding: 18px 4px; }
|
|
254
280
|
.lvl { font-size: 9px; letter-spacing: .04em; }
|
|
255
281
|
.lvl.info { color: #58c49b; } .lvl.warn { color: #e3ad55; } .lvl.error { color: #ef7f74; }
|
|
256
282
|
|
|
@@ -307,14 +333,23 @@ code { background: #f2f5f9; color: #55657d; border-radius: 4px; padding: 1px 4px
|
|
|
307
333
|
.schema-field { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; padding: 18px 2px; border-bottom: 1px solid #f1f4f8; }
|
|
308
334
|
.schema-field.long { grid-template-columns: 1fr; gap: 10px; }
|
|
309
335
|
.schema-field-info { min-width: 0; }
|
|
310
|
-
.schema-field-title { font-size:
|
|
311
|
-
.schema-field-desc { margin: 0 0 7px; font-size:
|
|
336
|
+
.schema-field-title { font-size: 13px; font-weight: 650; color: #2f4058; margin-bottom: 5px; }
|
|
337
|
+
.schema-field-desc { margin: 0 0 7px; font-size: 11.5px; color: #8190a4; line-height: 1.6; }
|
|
312
338
|
.schema-field-key { display: inline-block; font-size: 9px; color: #a0adbe; background: #f5f7fa; border: 1px solid #eef2f7; border-radius: 4px; padding: 2px 5px; }
|
|
313
339
|
.schema-field-control { min-width: 0; padding-top: 1px; }
|
|
314
340
|
.schema-field-control > input:not([type=checkbox]), .schema-field-control > select, .schema-field-control > textarea { width: 100%; }
|
|
315
341
|
.schema-field-control > input:not([type=checkbox]), .schema-field-control > select { height: 36px; border: 1px solid #e2e8f1; border-radius: 8px; background: #fbfcfe; padding: 0 10px; font-size: 12px; color: #3b4b61; outline: none; }
|
|
316
342
|
.schema-field-control > textarea { border: 1px solid #e2e8f1; border-radius: 8px; background: #fbfcfe; padding: 9px 10px; font-size: 12px; color: #3b4b61; outline: none; resize: vertical; line-height: 1.65; font-family: inherit; }
|
|
317
343
|
.schema-field-control > textarea:focus, .schema-field-control > input:focus, .schema-field-control > select:focus { border-color: #9ab7ef; background: #fff; }
|
|
344
|
+
.secret-field { display: flex; gap: 7px; align-items: center; }
|
|
345
|
+
.secret-field input { flex: 1; min-width: 0; height: 36px; border: 1px solid #e2e8f1; border-radius: 8px; background: #fbfcfe; padding: 0 10px; font-size: 12px; color: #3b4b61; outline: none; font-family: Consolas, monospace; }
|
|
346
|
+
.secret-field input:focus { border-color: #9ab7ef; background: #fff; }
|
|
347
|
+
.eye-btn { width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid #e2e8f1; border-radius: 8px; background: #fff; color: #7c8ca2; display: grid; place-items: center; }
|
|
348
|
+
.eye-btn:hover { border-color: #b9c9df; color: #4f7df3; }
|
|
349
|
+
.eye-btn svg { width: 17px; height: 17px; }
|
|
350
|
+
.sync-note { margin: 12px 0 0; padding: 9px 11px; border-radius: 8px; background: #fff8e8; border: 1px solid #f3e4c4; color: #8d7138; font-size: 10.5px; line-height: 1.6; }
|
|
351
|
+
.sync-note.ok { background: #eef9f3; border-color: #cfeee0; color: #1a7a58; }
|
|
352
|
+
.sync-note b { color: inherit; }
|
|
318
353
|
.schema-field .json-input { font-family: Consolas, monospace; font-size: 10.5px; }
|
|
319
354
|
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
|
|
320
355
|
.switch input { display: none; }
|
|
@@ -323,6 +358,29 @@ code { background: #f2f5f9; color: #55657d; border-radius: 4px; padding: 1px 4px
|
|
|
323
358
|
.switch input:checked + i { background: #4f7df3; }
|
|
324
359
|
.switch input:checked + i::after { transform: translateX(15px); }
|
|
325
360
|
.switch span { font-size: 10.5px; color: #9aa7b8; }
|
|
361
|
+
.list-editor { border: 1px solid #e6ecf4; border-radius: 9px; padding: 8px; background: #fbfcfe; }
|
|
362
|
+
.list-rows { display: flex; flex-direction: column; gap: 6px; }
|
|
363
|
+
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 26px 26px; gap: 6px; align-items: center; }
|
|
364
|
+
.list-row:not(:has(.list-score)) { grid-template-columns: minmax(0, 1fr) 26px 26px; }
|
|
365
|
+
.list-row input { height: 31px; border: 1px solid #e2e8f1; border-radius: 6px; background: #fff; padding: 0 8px; font-size: 11.5px; color: #3b4b61; outline: none; }
|
|
366
|
+
.list-row .list-score { text-align: center; }
|
|
367
|
+
.row-btn { width: 26px; height: 26px; border-radius: 6px; color: #8c9aae; background: #f0f4f9; font-size: 15px; line-height: 1; display: grid; place-items: center; }
|
|
368
|
+
.row-btn.add { color: #3f68d8; background: #edf3ff; }
|
|
369
|
+
.row-btn:hover { filter: brightness(.96); }
|
|
370
|
+
.add-row { margin-top: 7px; font-size: 11px; }
|
|
371
|
+
.group-rules { border: 1px solid #e6ecf4; border-radius: 9px; padding: 12px; background: #fbfcfe; }
|
|
372
|
+
.group-rules-list { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
|
|
373
|
+
.group-rule { border: 1px solid #e4ebf4; border-radius: 9px; background: #fff; overflow: hidden; }
|
|
374
|
+
.group-rule-head { display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: #f7f9fc; }
|
|
375
|
+
.group-rule-id { flex: 1; height: 30px; border: 1px solid #e2e8f1; border-radius: 6px; padding: 0 8px; font-size: 11.5px; background: #fff; outline: none; }
|
|
376
|
+
.group-rule-body { padding: 10px 12px 12px; border-top: 1px solid #eef2f7; }
|
|
377
|
+
.group-rule-hint { margin: 0 0 8px; font-size: 10px; color: #9aa7b8; }
|
|
378
|
+
.group-field { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; align-items: center; padding: 5px 0; font-size: 11.5px; color: #596a80; }
|
|
379
|
+
.group-field.block { display: block; }
|
|
380
|
+
.group-field > span { color: #6b7b90; }
|
|
381
|
+
.group-field > span + input, .group-field > span + select { height: 30px; border: 1px solid #e2e8f1; border-radius: 6px; background: #fff; padding: 0 8px; font-size: 11.5px; outline: none; }
|
|
382
|
+
.group-field.block > span { display: block; margin-bottom: 6px; }
|
|
383
|
+
.group-field .list-editor { padding: 6px; }
|
|
326
384
|
.schema-field .field > span { flex: 0 0 200px; font-family: Consolas, monospace; font-size: 10.5px; color: #3f5270; }
|
|
327
385
|
.schema-field .field input:not([type=checkbox]), .schema-field .field select, .schema-field .field textarea { width: 100%; }
|
|
328
386
|
.form-hint { margin: 5px 0 0 200px; font-size: 9.5px; color: #9aa7b8; line-height: 1.5; }
|
|
@@ -349,20 +407,58 @@ code { background: #f2f5f9; color: #55657d; border-radius: 4px; padding: 1px 4px
|
|
|
349
407
|
.grid.two, .grid.wide { grid-template-columns: 1fr; }
|
|
350
408
|
.plugin-grid { grid-template-columns: 1fr 1fr; }
|
|
351
409
|
.welcome-grid { grid-template-columns: 1fr 1fr; }
|
|
410
|
+
.config-layout { grid-template-columns: 210px minmax(0, 1fr); }
|
|
411
|
+
.schema-field { grid-template-columns: 210px minmax(0, 1fr); gap: 18px; }
|
|
352
412
|
}
|
|
413
|
+
|
|
353
414
|
@media (max-width: 820px) {
|
|
354
|
-
|
|
355
|
-
.
|
|
356
|
-
.sidebar {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
.
|
|
362
|
-
.
|
|
363
|
-
.
|
|
364
|
-
.
|
|
365
|
-
.
|
|
366
|
-
.
|
|
415
|
+
html, body { overflow: hidden; }
|
|
416
|
+
.app { display: block; height: 100dvh; }
|
|
417
|
+
.sidebar {
|
|
418
|
+
position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 50;
|
|
419
|
+
padding: 20px 14px 16px; transform: translateX(-105%); transition: transform .22s ease;
|
|
420
|
+
box-shadow: 20px 0 50px rgba(8, 15, 27, .28);
|
|
421
|
+
}
|
|
422
|
+
.sidebar.open { transform: none; }
|
|
423
|
+
.sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(8, 15, 27, .48); }
|
|
424
|
+
.sidebar-backdrop[hidden] { display: none; }
|
|
425
|
+
.nav-close { display: grid; }
|
|
426
|
+
.menu-btn { display: grid; }
|
|
427
|
+
.main { height: 100dvh; }
|
|
428
|
+
.topbar { padding: 0 14px; height: 58px; flex-basis: 58px; }
|
|
429
|
+
.topbar .crumb-muted, .topbar .crumb-sep { display: none; }
|
|
430
|
+
.top-actions { gap: 7px; }
|
|
431
|
+
.content { padding: 16px 14px 28px; }
|
|
432
|
+
.page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
|
|
433
|
+
.page-head h1 { font-size: 21px; }
|
|
434
|
+
.head-actions { flex-wrap: wrap; }
|
|
435
|
+
.metrics, .metrics.three { grid-template-columns: 1fr 1fr; }
|
|
436
|
+
.plugin-grid, .memory-layout, .config-layout, .welcome-grid { grid-template-columns: 1fr; }
|
|
437
|
+
.scope-list { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 12px; }
|
|
438
|
+
.scope-list h3 { width: 100%; margin: 2px 6px 2px; }
|
|
439
|
+
.scope-list h3.mt { margin-top: 8px; }
|
|
440
|
+
.scope { width: auto; gap: 8px; }
|
|
441
|
+
.schema-field, .schema-field.long { grid-template-columns: 1fr; gap: 8px; padding: 14px 0; }
|
|
442
|
+
.schema-field .field > span { flex: 0 0 120px; }
|
|
443
|
+
.field > span { flex: 0 0 120px; }
|
|
444
|
+
.config-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
|
|
445
|
+
.config-nav .config-group-label { width: 100%; }
|
|
446
|
+
.config-plugin { width: auto; gap: 7px; padding: 7px 9px; }
|
|
447
|
+
.config-plugin small { display: none; }
|
|
448
|
+
.form-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
|
|
449
|
+
.log-line { grid-template-columns: 72px 44px minmax(0, 1fr); }
|
|
367
450
|
.log-line .src { display: none; }
|
|
451
|
+
.log-view { min-height: 55vh; padding: 12px; }
|
|
452
|
+
.statusbar { gap: 10px; padding: 0 12px; }
|
|
453
|
+
.statusbar #statusRight { display: none; }
|
|
454
|
+
.statusbar #statusCalls { display: none; }
|
|
455
|
+
.modal-card { width: 94vw; padding: 15px; }
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
@media (max-width: 520px) {
|
|
459
|
+
.metrics, .metrics.three { grid-template-columns: 1fr; }
|
|
460
|
+
.top-actions .pill b { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
461
|
+
.welcome-hero { padding: 22px 20px; }
|
|
462
|
+
.welcome-actions { flex-wrap: wrap; }
|
|
463
|
+
.brand { padding-bottom: 18px; }
|
|
368
464
|
}
|