Skip to content

fix(frontend): 同步关于页版本号#382

Merged
JefferyHcool merged 1 commit into
JefferyHcool:developfrom
techotaku39:fix/frontend-about-version
May 26, 2026
Merged

fix(frontend): 同步关于页版本号#382
JefferyHcool merged 1 commit into
JefferyHcool:developfrom
techotaku39:fix/frontend-about-version

Conversation

@techotaku39
Copy link
Copy Markdown

@techotaku39 techotaku39 commented May 26, 2026

改动概述

让前端关于页版本号从构建时注入的应用版本读取,不再在页面中硬编码 BiliNote v2.0.0

为什么

About 页版本号此前写死为 2.0.0,发版或 Docker 镜像构建时容易与实际应用版本不一致。

做了什么

  • 在 Vite 构建中注入 __APP_VERSION__
  • 默认从 BillNote_frontend/src-tauri/tauri.conf.json 读取版本号。
  • 支持通过 VITE_APP_VERSION 覆盖构建版本。
  • 更新 Dockerfile / Docker 构建 workflow,确保镜像构建也能传入版本号。
  • About 页改为展示 BiliNote v{appVersion}

测试方式

  • 前端构建通过:CI=true npx -y pnpm@9.15.0 install --frozen-lockfile && npx -y pnpm@9.15.0 build。当前前端包未提供 typecheck script,按构建验证处理。
  • 后端验证:N/A,本 PR 不涉及后端 Python 代码。
  • 手动验证步骤:用户已基于 fix/frontend-about-version 分支打包/运行验证,About 页版本显示修复正常。

回归风险

风险较低。改动集中在前端构建时版本注入和 About 页展示;若 tauri.conf.json 读取失败,会回退为 0.0.0。Docker 构建路径新增版本参数,需关注 CI/Docker 构建是否正常传递。

Checklist

  • 分支命名遵循 CONTRIBUTING.md §3feature/* / fix/* / release/* / hotfix/*
  • base 分支正确(常规改动 → develop;线上紧急 → master;发版 → 见 §4.3)
  • Commit message 遵循 type(scope): subject 格式(CONTRIBUTING.md §5.1
  • 已自测核心流程
  • 已更新相关文档(N/A:本 PR 不涉及 README / CHANGELOG / CLAUDE.md / 模块 README 变更)
  • 未夹带 secrets / .env / 大型二进制
  • 单 PR 不跨多个工作区做无关改动

@JefferyHcool JefferyHcool merged commit 2ea95b2 into JefferyHcool:develop May 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants