启动器:接入 Gitea Releases 自动检查更新 + 更新日志页

- server.py: 新增 /api/update/check、/api/update/changelog 接口,
  用标准库 urllib 请求自托管仓库 Lingbao/90CNServer 的 Releases,
  带 5 分钟缓存与 8 秒超时;本地版本号写死 v2026.11.04
- shell.js: 版本卡片改为动态读取远程最新 tag,发现新版本绿色可点击
  跳转;新增 loadChangelog 渲染发布记录
- index.html/shell.css: 更新日志页改为动态容器,补充卡片样式
This commit is contained in:
hanfuit committed 2026-11-04 19:16:05 +08:00
1 parent d31a34e9aa
commit f2debaf9bf
4 files changed
+181 -3

No files matched your search

+14
View File
@@ -126,6 +126,20 @@ button,input,select{font:inherit}
.change-row b{font-weight:400;color:#bdd5c8;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.change-row em{font-style:normal;color:#5e7e6f;width:70px;text-align:right}
/* 更新日志(从 Gitea Releases 拉取) */
#changelogBody{margin-top:14px;display:flex;flex-direction:column;gap:12px}
.changelog-item{border:1px solid #1b3529;background:#0b1712;border-radius:8px;padding:14px 16px}
.changelog-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.changelog-tag{font-family:Consolas,monospace;font-size:12px;color:#4c9c76;background:#12241c;padding:2px 8px;border-radius:4px;border:1px solid #1e3a2e}
.changelog-name{font-size:13px;font-weight:600;color:#d1e6dc}
.changelog-time{font-size:11px;color:#607f70;margin-left:auto}
.changelog-body{font-size:12px;color:#8eada0;line-height:1.9}
.changelog-assets{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.changelog-asset{font-size:11px;color:#5fc08d;text-decoration:none;border:1px solid #1e3a2e;padding:3px 10px;border-radius:4px;background:#0e1d17}
.changelog-asset:hover{background:#132a20}
.changelog-link{display:inline-block;margin-top:10px;font-size:11px;color:#5f8272;text-decoration:none}
.changelog-link:hover{color:#8fc9ae}
/* buttons/input */
.shell-btn{background:#11271e;border:1px solid #2b5542;color:#b8d8c8;padding:6px 12px;cursor:pointer;border-radius:2px}
.shell-btn:hover{background:#19392b;color:#fff}