mirror of
https://github.com/basketikun/infinite-canvas.git
synced 2026-08-05 17:04:27 +08:00
feat(app): 添加版本更新弹窗功能
- 在顶部导航栏和用户状态组件中集成版本更新弹窗 - 实现版本检查钩子,支持检查最新版本和更新日志 - 解析 CHANGELOG.md 文件并展示版本更新时间线 - 添加版本更新弹窗 UI 组件,显示当前版本和最新版本 - 在 Dockerfile 中更新 bun 版本依赖 - 调整 Next.js 配置以解析版本信息并注入环境变量 - 更新待测试文档中的版本更新功能描述
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user