feat(app): 添加版本更新弹窗功能

- 在顶部导航栏和用户状态组件中集成版本更新弹窗
- 实现版本检查钩子,支持检查最新版本和更新日志
- 解析 CHANGELOG.md 文件并展示版本更新时间线
- 添加版本更新弹窗 UI 组件,显示当前版本和最新版本
- 在 Dockerfile 中更新 bun 版本依赖
- 调整 Next.js 配置以解析版本信息并注入环境变量
- 更新待测试文档中的版本更新功能描述
This commit is contained in:
HouYunFei
2026-05-20 15:25:57 +08:00
parent 2ab499bc54
commit 7a27684e3c
11 changed files with 241 additions and 8 deletions
+4 -1
View File
@@ -7,6 +7,7 @@ import type { ItemType } from "antd/es/menu/interface";
import { GitHubLink } from "@/components/github-link";
import { AnimatedThemeToggler } from "@/components/ui/animated-theme-toggler";
import { VersionReleaseModal } from "@/components/version-release-modal";
import { cn } from "@/lib/utils";
import type { ThemeName } from "@/stores/use-theme-store";
@@ -27,6 +28,7 @@ type UserStatusActionsProps = {
avatarStyle?: CSSProperties;
gitHubClassName?: string;
gitHubStyle?: CSSProperties;
versionStyle?: CSSProperties;
userLabel?: ReactNode;
iconStyle?: CSSProperties;
};
@@ -48,6 +50,7 @@ export function UserStatusActions({
avatarStyle,
gitHubClassName,
gitHubStyle,
versionStyle,
userLabel,
iconStyle,
}: UserStatusActionsProps) {
@@ -76,7 +79,7 @@ export function UserStatusActions({
aria-label={theme === "dark" ? "切换到浅色主题" : "切换到深色主题"}
title={theme === "dark" ? "切换到浅色主题" : "切换到深色主题"}
/>
<span className="shrink-0 text-xs font-medium text-stone-500 dark:text-stone-400">{version}</span>
<VersionReleaseModal currentVersion={version} style={versionStyle} />
<GitHubLink className={cn("bg-transparent hover:bg-transparent dark:hover:bg-transparent", gitHubClassName)} style={gitHubStyle} />
<div ref={accountRef}>
<Dropdown