From 143d4e616c3ae50b6bfec6d680aa830a2f7e96bc Mon Sep 17 00:00:00 2001
From: Xinfan Chen <2024111082@stu.hit.edu.cn>
Date: Tue, 12 May 2026 21:49:24 +0800
Subject: [PATCH] 优化排版
---
aigc-director/aigc-claw/frontend/components/AppShell.tsx | 28 +++++++++++++++++++++++++---
1 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/aigc-director/aigc-claw/frontend/components/AppShell.tsx b/aigc-director/aigc-claw/frontend/components/AppShell.tsx
index 7025b63..3a5d2c9 100644
--- a/aigc-director/aigc-claw/frontend/components/AppShell.tsx
+++ b/aigc-director/aigc-claw/frontend/components/AppShell.tsx
@@ -2,17 +2,19 @@
import Link from 'next/link';
import { usePathname } from 'next/navigation';
-import { ChevronLeft, ChevronRight, Clapperboard, Hexagon, Home, PanelLeftOpen, Repeat2, UserRound } from 'lucide-react';
+import { ChevronLeft, ChevronRight, Clapperboard, Hexagon, Home, PanelLeftOpen, Repeat2, Settings, UserRound } from 'lucide-react';
import clsx from 'clsx';
import { useState } from 'react';
const NAV_ITEMS = [
{ href: '/', label: 'AIGC-Claw', icon: Home },
{ href: '/sandbox', label: '临时工作台', icon: Hexagon },
- { href: '/pipelines/standard', label: '静态短视频', icon: Clapperboard },
+ { href: '/pipelines/standard', label: '文艺短视频', icon: Clapperboard },
{ href: '/pipelines/action-transfer', label: '动作迁移', icon: Repeat2 },
{ href: '/pipelines/digital-human', label: '数字人口播', icon: UserRound },
];
+
+const SETTINGS_ITEM = { href: '/settings', label: '设置', icon: Settings };
export default function AppShell({ children }: { children: React.ReactNode }) {
const pathname = usePathname();
@@ -33,7 +35,7 @@
<span className="text-sm font-semibold text-gray-800 truncate">AIGC-Claw</span>
</div>
</div>
- <nav className="p-3 space-y-1">
+ <nav className="p-3 pb-20 space-y-1">
{NAV_ITEMS.map(item => {
const Icon = item.icon;
const active = item.href === '/' ? pathname === '/' : pathname.startsWith(item.href);
@@ -54,6 +56,26 @@
);
})}
</nav>
+ <div className="absolute bottom-0 left-0 right-0 border-t border-gray-100 p-3">
+ {(() => {
+ const Icon = SETTINGS_ITEM.icon;
+ const active = pathname.startsWith(SETTINGS_ITEM.href);
+ return (
+ <Link
+ href={SETTINGS_ITEM.href}
+ className={clsx(
+ 'flex items-center gap-3 rounded-xl px-3 py-2.5 text-sm font-medium transition-colors',
+ active
+ ? 'bg-blue-50 text-blue-600'
+ : 'text-gray-500 hover:bg-gray-50 hover:text-gray-800'
+ )}
+ >
+ <Icon className="w-4 h-4 flex-shrink-0" />
+ <span className="truncate">{SETTINGS_ITEM.label}</span>
+ </Link>
+ );
+ })()}
+ </div>
</div>
</aside>
--
Gitblit v1.8.0