7 Commits
Author SHA1 Message Date
GloridustandClaude Opus 4.8 7293285d1a feat(panel): 显示构建版本号 + 自动检测新版(Docker Hub/GHCR 红点)
管理界面此前看不到面板版本,也无从知道有没有新版可升。现在:

- 构建时把版本号烤进面板镜像:Dockerfile 新增 ARG/ENV WOC_VERSION(放末尾不
  破坏依赖缓存);release.yml 用 git tag 注入(vX.Y.Z,手动触发为 dev-<sha>),
  仅面板镜像消费;build-local.sh 支持 --build-arg(默认 dev)。
- 后端 version.ts:best-effort 查询 Docker Hub 与 GHCR 上 woc-panel 的语义化
  标签取最大值,与当前版本比对;启动后 4s 首检 + 每 6h 复检 + 接口惰性触发,
  失败静默(离线/被墙/私有源不报错、不显红点)。命名空间从 WOC_WECHAT_IMAGE 推断。
- 接口:GET /api/version(任意登录用户读缓存)、POST /api/admin/version/check
  (管理员手动重查)。
- 前端:管理页「关于」卡显示当前版本/最新版/升级提示/检查更新/发布日志链接;
  侧栏「管理」入口在有新版时点红点(仅管理员)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 22:40:17 +08:00
GloridustandClaude Opus 4.8 167a80a0c3 feat(ci/telegram): issue 新回复也推送(简短)
telegram-notify 增订阅 issue_comment(created),tg-notify.mjs 加 issue_comment 分支:
💬 Issue #N 新回复 · 标题 / 评论人 / 评论摘要(≤400字) / 链接。PR 的评论也走此事件,按 C_PR 跳过;
回复通知不置顶(置顶仍仅限 release)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 21:25:14 +08:00
GloridustandClaude Opus 4.8 8ac0016398 ci(telegram): render release/issue notes as Telegram HTML (not raw markdown)
GitHub-Flavored Markdown ≠ Telegram MarkdownV2, so the old plain-text send
showed literal ## ** | etc. New .github/scripts/tg-notify.mjs converts GFM
→ Telegram-safe HTML (<b>/<i>/<code>/<pre>/<a>; headers→bold, tables→· rows,
lists→•, quotes→▎), escapes <>&, and falls back to plain text if Telegram
rejects the HTML. Adds workflow_dispatch to telegram-notify so you can send
the latest release rendered for testing without cutting a new release.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 00:41:54 +08:00
GloridustandClaude Opus 4.8 54ed841a68 feat(admin/ci): 管理页折叠菜单 + 空状态/主页优化 + Telegram 命令机器人
管理页 UI/UX
- 实例卡片操作改为「管理」分类折叠菜单(默认收起,点开按 运维/设置/危险 分组的
  文字操作),替代之前难辨认的图标排;删除单独成组、红色,降低误点
- 修复展开一张卡片时同行其它卡片被 grid 拉等高(inst-grid align-items:start)
- 管理页空状态(无实例/无子账号)改为图标+标题+说明+引导按钮
- 主页实例卡片加副行(状态·微信版本)、悬停上浮高亮

Telegram 命令机器人(轮询版,纯 GitHub Actions,无服务器)
- .github/workflows/telegram-bot.yml + scripts/telegram-bot.mjs
- 私聊/群组命令:/help /releases /release <tag> /issues /issue <编号>
- cron 每 5 分钟 getUpdates,处理后用 offset 向 Telegram 确认,无需持久化存储
- 受 vars.TELEGRAM_BOT_ENABLED 开关;命令非实时(cron 限制),文档已说明

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 00:29:02 +08:00
GloridustandClaude Opus 4.8 a24977dd1f ci: Telegram notify on release / new issue (serverless via Actions)
New .github/workflows/telegram-notify.yml: on release published or issue
opened, send a message to a Telegram group via @WechatOnCloudBot. Runs on
GitHub Actions (no server). Gated on vars.TELEGRAM_CHAT_ID so unconfigured
forks skip safely. Arbitrary text passed via env (no script injection),
sent as plain text with --data-urlencode (no markdown parse breakage).
Setup documented in doc/发布到GHCR.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 23:45:03 +08:00
GloridustandClaude Opus 4.7 c37588617e ci: optional Docker Hub mirror in release workflow
- release.yml: dual-push to GHCR + Docker Hub when vars.DOCKERHUB_USERNAME
  is set; falls back to GHCR-only when unset (no behavior change for forks).
- .env.example: surface docker.io as a first-class WOC_IMAGE_PREFIX option.
- doc/发布到GHCR.md: document the one-time Variable + Secret setup and the
  prerequisite of pre-creating the public repos on hub.docker.com.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-04 18:18:21 +08:00
Gloridust 5c5e9c8540 update 2026-05-29 22:00:23 +08:00