feat: 增强更新功能,支持开发版本的自我升级检查;优化仪表板和应用日志页面的用户界面

This commit is contained in:
ryan
2026-03-11 22:19:27 +08:00
parent 6140ed1718
commit c240838692
7 changed files with 359 additions and 249 deletions
+15 -5
View File
@@ -1,12 +1,22 @@
import { dashboardNavigation } from '@/lib/constants/navigation';
import type { NavigationItem } from '@/types/navigation';
const navigationPathAliases: Record<string, string> = {
'/apply-log': '/node',
};
function normalizeNavigationPath(pathname: string) {
return navigationPathAliases[pathname] ?? pathname;
}
export function isPathActive(pathname: string, href: string) {
if (href === '/') {
return pathname === '/';
}
return pathname === href || pathname.startsWith(`${href}/`);
const normalizedPathname = normalizeNavigationPath(pathname);
if (href === '/') {
return normalizedPathname === '/';
}
return normalizedPathname === href || normalizedPathname.startsWith(`${href}/`);
}
export function isNavigationItemActive(pathname: string, item: NavigationItem): boolean {