refactor: serve static frontend with Go APIs

This commit is contained in:
brother7 committed 2026-08-16 20:47:45 +08:00
1 parent 763d2f0648
commit b14b4fced7
101 files changed
+963 -3928

No files matched your search

+3 -14
View File
@@ -16,8 +16,8 @@ import {
} from "lucide-react";
import clsx from "clsx";
import { revealChildren, runScopedMotion } from "@/lib/ui/motion";
import type { AuthUser } from "@/lib/auth/session";
import { AccountUsageMenu } from "@/components/account-usage-menu";
import { useBrowserAuth } from "@/components/browser-auth";
const nav = [
{ href: "/create", label: "创作", icon: Sparkles },
@@ -28,19 +28,8 @@ const nav = [
{ href: "/billing", label: "计费", icon: WalletCards }
];
export function AppShell({
children,
user,
authRequired,
isAdmin,
isSuperAdmin
}: {
children: React.ReactNode;
user?: AuthUser | null;
authRequired?: boolean;
isAdmin?: boolean;
isSuperAdmin?: boolean;
}) {
export function AppShell({ children }: { children: React.ReactNode }) {
const { user, authRequired, isAdmin, isSuperAdmin } = useBrowserAuth();
const pathname = usePathname();
const shellRef = useRef<HTMLDivElement | null>(null);
const isAuthPage = pathname.startsWith("/auth");