Picking model weights in Add model or Download more also selects the files that usually go with them (chat template, MTP head, mmproj, ...), shown in a strip where each can be unchecked. Variants are matched by quant, otherwise the best single one; kinds already selected aren't added twice. Which kinds is set in Settings -> Downloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
50 lines
2.0 KiB
TypeScript
50 lines
2.0 KiB
TypeScript
import Link from "next/link";
|
|
import { redirect } from "next/navigation";
|
|
import { auth, signOut } from "@/auth";
|
|
import { AppNav } from "@/components/app-nav";
|
|
import { LabelSettingsProvider } from "@/components/labels";
|
|
import { UserMenu } from "@/components/user-menu";
|
|
import { WorkerIndicator } from "@/components/worker-indicator";
|
|
import { getFileRoleStyles, getRecommendedRoles } from "@/lib/settings";
|
|
import { getWorkerStatus } from "@/lib/worker-status";
|
|
|
|
export default async function AppLayout({ children }: LayoutProps<"/">) {
|
|
const session = await auth();
|
|
if (!session?.user) redirect("/login");
|
|
|
|
const [worker, fileRoles, recommendedRoles] = await Promise.all([
|
|
getWorkerStatus(),
|
|
getFileRoleStyles(),
|
|
getRecommendedRoles(),
|
|
]);
|
|
|
|
return (
|
|
<div className="flex min-h-screen flex-col overflow-x-clip">
|
|
<header className="border-b">
|
|
<div className="mx-auto flex h-14 max-w-7xl items-center gap-3 px-4 sm:gap-6">
|
|
<Link href="/" className="flex items-center gap-2 font-semibold">
|
|
{/* eslint-disable-next-line @next/next/no-img-element */}
|
|
<img src="/icon.svg" alt="" className="size-6" />
|
|
Kaname
|
|
<span className="hidden text-xs font-normal text-muted-foreground sm:inline">{process.env.APP_VERSION ?? "dev"}</span>
|
|
</Link>
|
|
<AppNav />
|
|
<div className="ml-auto flex items-center gap-3">
|
|
<WorkerIndicator initial={worker} />
|
|
<UserMenu
|
|
user={{ name: session.user.name ?? null, email: session.user.email ?? null, image: session.user.image ?? null }}
|
|
signOutAction={async () => {
|
|
"use server";
|
|
await signOut({ redirectTo: "/login" });
|
|
}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<main className="mx-auto w-full max-w-7xl flex-1 px-4 py-6">
|
|
<LabelSettingsProvider fileRoles={fileRoles} recommendedRoles={recommendedRoles}>{children}</LabelSettingsProvider>
|
|
</main>
|
|
</div>
|
|
);
|
|
}
|