first wokring prototype

This commit is contained in:
2026-06-10 04:10:02 +02:00
parent 50d779a537
commit 7491c0a1b4
90 changed files with 10799 additions and 1 deletions

48
src/layout/AppShell.tsx Normal file
View File

@@ -0,0 +1,48 @@
import { useLocation } from "react-router-dom";
import type { ApiSettings, AuthInfo } from "../types";
import IconRail from "./IconRail";
import Titlebar from "./Titlebar";
import BreadcrumbBar from "./BreadcrumbBar";
type Props = {
children: React.ReactNode;
settings: ApiSettings;
auth: AuthInfo | null;
onSettingsChange: (settings: ApiSettings) => void;
onAuthChange: (auth: AuthInfo | null, accessToken?: string) => void;
publicMode?: boolean;
};
export default function AppShell({
children,
settings,
auth,
onSettingsChange,
onAuthChange,
publicMode = false
}: Props) {
const location = useLocation();
if (publicMode) {
return (
<div className="app-shell public-shell">
<IconRail compact />
<div className="app-main public-main">
<Titlebar settings={settings} auth={auth} onSettingsChange={onSettingsChange} onAuthChange={onAuthChange} />
<main className="public-content">{children}</main>
</div>
</div>
);
}
return (
<div className="app-shell">
<IconRail />
<div className="app-main">
<Titlebar settings={settings} auth={auth} onSettingsChange={onSettingsChange} onAuthChange={onAuthChange} />
<BreadcrumbBar pathname={location.pathname} />
<main className="app-content">{children}</main>
</div>
</div>
);
}