This commit is contained in:
qsc
2026-09-07 14:31:57 +08:00
parent 2cf54a5e6c
commit 670164b804
11 changed files with 658 additions and 202 deletions
+41 -8
View File
@@ -106,7 +106,7 @@
<div class="section-intro section-intro--actions">
<div>
<h2>查询与图片缓存</h2>
<p>接口数据以 JSON 保存到 SQLite,渲染图片保存到插件数据目录。图片命中时会直接发送,不再请求其上游接口;缓存时间使用秒,填写 0 可关闭对应缓存。</p>
<p>接口数据以 JSON 保存到 SQLite,渲染图片保存到插件数据目录。图片命中时会直接发送,不再请求其上游接口;缓存时间使用秒,填写 0 可关闭对应缓存。每 60 秒自动清理过期缓存,接口请求失败时不使用过期数据。</p>
</div>
<div class="cache-clear-actions">
<button class="button button--secondary" id="clear-api-cache" type="button">清空接口缓存</button>
@@ -115,9 +115,9 @@
</div>
<div class="cache-summary" aria-label="缓存统计">
<div class="cache-stat"><span>接口缓存(SQLite</span><strong id="api-cache-count">0 条</strong><small id="api-cache-size">0 B</small></div>
<div class="cache-stat"><span>接口缓存(SQLite</span><strong id="api-cache-count">0 / 256 </strong><small id="api-cache-size">0 B</small></div>
<div class="cache-stat"><span>图片缓存</span><strong id="image-cache-count">0 张</strong><small id="image-cache-size">0 B</small></div>
<div class="cache-stat"><span>接口内存缓存</span><strong id="api-memory-summary">0 / 256 条</strong><small>最久未使用优先淘汰</small></div>
<div class="cache-stat"><span>接口内存缓存</span><strong id="api-memory-summary">0 B / 16 MB</strong><small id="api-memory-count">0 条,最久未使用优先淘汰</small></div>
<div class="cache-stat"><span>默认缓存时间</span><strong id="cache-default-summary">300 / 600 秒</strong><small>接口 / 图片</small></div>
</div>
@@ -135,8 +135,12 @@
<form class="cache-defaults cache-limits" id="cache-limit-form">
<label>
<span>接口内存缓存最大条数</span>
<input id="api-memory-limit" type="number" min="1" max="100000" step="1" required />
<span>接口内存缓存最大容量(MB</span>
<input id="api-memory-size-limit" type="number" min="1" max="1024" step="1" required />
</label>
<label>
<span>SQLite 接口缓存最大条数</span>
<input id="api-entry-limit" type="number" min="1" max="100000" step="1" required />
</label>
<label>
<span>图片缓存最大容量(MB</span>
@@ -212,12 +216,41 @@
</section>
<section class="panel" id="subscriptions-panel" role="tabpanel" hidden>
<div class="section-intro">
<div><h2>所有会话事件状态</h2><p>总开关和订阅事件均来自本地订阅表</p></div>
<div class="section-intro section-intro--actions">
<div><h2>会话事件推送</h2><p>为会话配置推送总开关和订阅事件,保存后立即生效。推送仍受会话访问模式及绑定区服限制;删除仅移除该会话的推送配置</p></div>
<button class="button button--primary" id="add-subscription" type="button">添加推送会话</button>
</div>
<form class="subscription-editor" id="subscription-form" hidden>
<fieldset id="subscription-fields">
<legend id="subscription-editor-title">添加推送会话</legend>
<div class="subscription-settings">
<label>
<span>会话 ID</span>
<input id="subscription-session" name="session_id" list="session-options" maxlength="512" placeholder="选择已有会话或输入完整会话 ID" required />
</label>
<label class="subscription-choice">
<input id="subscription-enabled" type="checkbox" />
<span>开启事件推送</span>
</label>
</div>
<p class="subscription-hint">关闭总开关会保留事件选择;未选择事件时不会收到推送。令牌事件需在插件配置中填写事件版令牌。</p>
<div class="subscription-toolbar">
<strong id="subscription-selection-count" aria-live="polite">已选择 0 项</strong>
<div>
<button class="link-button" id="subscription-select-all" type="button">全选</button>
<button class="link-button" id="subscription-clear-all" type="button">清空选择</button>
</div>
</div>
<div id="subscription-events"></div>
<div class="subscription-form-actions">
<button class="button button--primary" type="submit">保存推送配置</button>
<button class="button button--secondary" id="cancel-subscription" type="button">取消</button>
</div>
</fieldset>
</form>
<div class="table-wrap">
<table>
<thead><tr><th>会话 ID</th><th>绑定区服</th><th>总开关</th><th>已订阅事件</th></tr></thead>
<thead><tr><th>会话 ID</th><th>绑定区服</th><th>总开关</th><th>已订阅事件</th><th class="actions">操作</th></tr></thead>
<tbody id="subscriptions-body"></tbody>
</table>
</div>