feat: 隐藏后台面板 + /api/stats 运行统计

- 连点页脚提示 6 次唤出管理面板:本机偏好/播放状态 + 服务器统计
- server.py 新增 GET /api/stats:运行时长、访客 IP(X-Forwarded-For
  末位取真实 IP 防伪造)、TTS 请求与缓存命中率、缓存体积、经典数
- 计数为进程内存统计,重启清零

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
selfrelease
2026-10-05 13:19:59 +08:00
co-authored by Devin
parent 42d5606ab5
commit 490f032d60
5 changed files with 181 additions and 5 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
* - /api/tts 不拦截,直接透传网络
*/
const CACHE = "fj-shell-v1";
const SHELL = ["/", "/index.html", "/style.css?v=10", "/app.js?v=12", "/icon.svg", "/icon-180.png", "/icon-192.png", "/icon-512.png", "/manifest.json"];
const SHELL = ["/", "/index.html", "/style.css?v=11", "/app.js?v=13", "/icon.svg", "/icon-180.png", "/icon-192.png", "/icon-512.png", "/manifest.json"];
self.addEventListener("install", (e) => {
e.waitUntil(caches.open(CACHE).then((c) => c.addAll(SHELL)).then(() => self.skipWaiting()));