hit-cxf
2026-05-13 bf683066ff6e7d75ab2c6dd896ad675ba31f52b5
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>