chore: refac
This commit is contained in:
@@ -251,8 +251,6 @@ export default function App() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const layoutVariant = theme.layoutVariant ?? "standard";
|
const layoutVariant = theme.layoutVariant ?? "standard";
|
||||||
const mainMaxWidth =
|
|
||||||
layoutVariant === "tiled" ? "max-w-none" : "max-w-[1600px]";
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!mobileOpen) return;
|
if (!mobileOpen) return;
|
||||||
@@ -463,20 +461,20 @@ export default function App() {
|
|||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<PageHeaderProvider pluginTabs={pluginTabMeta}>
|
<PageHeaderProvider pluginTabs={pluginTabMeta}>
|
||||||
<main
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative z-2 flex min-w-0 min-h-0 flex-1 flex-col",
|
"relative z-2 flex min-w-0 min-h-0 flex-1 flex-col",
|
||||||
"overflow-y-auto",
|
"px-3 sm:px-6",
|
||||||
"px-3 pb-4 sm:px-6 sm:pb-8",
|
|
||||||
"pt-2 sm:pt-4 lg:pt-6",
|
"pt-2 sm:pt-4 lg:pt-6",
|
||||||
|
"pb-4 sm:pb-8",
|
||||||
|
isDocsRoute && "min-h-0 flex-1",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<PluginSlot name="pre-main" />
|
<PluginSlot name="pre-main" />
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"mx-auto w-full",
|
"w-full min-w-0",
|
||||||
mainMaxWidth,
|
isDocsRoute && "min-h-0 flex flex-1 flex-col",
|
||||||
isDocsRoute && "min-h-0 flex-1 flex flex-col",
|
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Routes>
|
<Routes>
|
||||||
@@ -490,7 +488,7 @@ export default function App() {
|
|||||||
</Routes>
|
</Routes>
|
||||||
</div>
|
</div>
|
||||||
<PluginSlot name="post-main" />
|
<PluginSlot name="post-main" />
|
||||||
</main>
|
</div>
|
||||||
</PageHeaderProvider>
|
</PageHeaderProvider>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -48,17 +48,19 @@ export function PageHeaderProvider({
|
|||||||
<div className="flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-hidden">
|
<div className="flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-hidden">
|
||||||
<header
|
<header
|
||||||
className={cn(
|
className={cn(
|
||||||
"z-1 box-border h-14 shrink-0 border-b border-current/20",
|
"z-1 w-full shrink-0",
|
||||||
|
"box-border h-14 min-h-14",
|
||||||
|
"border-b border-current/20",
|
||||||
"bg-background-base/40 backdrop-blur-sm",
|
"bg-background-base/40 backdrop-blur-sm",
|
||||||
"overflow-hidden",
|
"overflow-hidden",
|
||||||
|
"sm:min-h-0",
|
||||||
)}
|
)}
|
||||||
role="banner"
|
role="banner"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex h-full w-full min-w-0 flex-1 flex-col justify-center gap-2",
|
"flex h-full w-full min-w-0 flex-1 flex-col justify-center gap-2",
|
||||||
"px-3 py-2 sm:px-6",
|
"px-3 py-2 sm:flex-row sm:items-center sm:gap-3 sm:px-6 sm:py-0",
|
||||||
"min-h-14 sm:min-h-0 sm:flex-row sm:items-center sm:gap-3 sm:py-0",
|
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="flex min-w-0 flex-1 items-center gap-2 sm:gap-3">
|
<div className="flex min-w-0 flex-1 items-center gap-2 sm:gap-3">
|
||||||
@@ -78,8 +80,12 @@ export function PageHeaderProvider({
|
|||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main
|
<main
|
||||||
className="flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden"
|
className={cn(
|
||||||
|
"min-h-0 w-full min-w-0 flex-1 flex flex-col",
|
||||||
|
"overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -55,10 +55,17 @@ html {
|
|||||||
font-size: var(--theme-base-size);
|
font-size: var(--theme-base-size);
|
||||||
line-height: var(--theme-line-height);
|
line-height: var(--theme-line-height);
|
||||||
letter-spacing: var(--theme-letter-spacing);
|
letter-spacing: var(--theme-letter-spacing);
|
||||||
|
height: 100dvh;
|
||||||
|
max-height: 100dvh;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: var(--theme-font-sans);
|
font-family: var(--theme-font-sans);
|
||||||
|
min-height: 0;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
code, kbd, pre, samp, .font-mono, .font-mono-ui {
|
code, kbd, pre, samp, .font-mono, .font-mono-ui {
|
||||||
@@ -74,7 +81,10 @@ code, kbd, pre, samp, .font-mono, .font-mono-ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#root {
|
#root {
|
||||||
min-height: 100dvh;
|
min-height: 0;
|
||||||
|
height: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Nousnet's hermes-agent layout bumps `small` and `code` to readable
|
/* Nousnet's hermes-agent layout bumps `small` and `code` to readable
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ export default function EnvPage() {
|
|||||||
|
|
||||||
{/* ═══════════════ LLM Providers (grouped) ═══════════════ */}
|
{/* ═══════════════ LLM Providers (grouped) ═══════════════ */}
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader className="sticky top-14 z-10 bg-card border-b border-border">
|
<CardHeader className="border-b border-border bg-card">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Zap className="h-5 w-5 text-muted-foreground" />
|
<Zap className="h-5 w-5 text-muted-foreground" />
|
||||||
<CardTitle className="text-base">{t.env.llmProviders}</CardTitle>
|
<CardTitle className="text-base">{t.env.llmProviders}</CardTitle>
|
||||||
@@ -577,7 +577,7 @@ export default function EnvPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Card key={category}>
|
<Card key={category}>
|
||||||
<CardHeader className="sticky top-14 z-10 bg-card border-b border-border">
|
<CardHeader className="border-b border-border bg-card">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Icon className="h-5 w-5 text-muted-foreground" />
|
<Icon className="h-5 w-5 text-muted-foreground" />
|
||||||
<CardTitle className="text-base">{label}</CardTitle>
|
<CardTitle className="text-base">{label}</CardTitle>
|
||||||
|
|||||||
@@ -254,13 +254,13 @@ export default function SkillsPage() {
|
|||||||
<Toast toast={toast} />
|
<Toast toast={toast} />
|
||||||
|
|
||||||
{/* ═══════════════ Filter panel + Content ═══════════════ */}
|
{/* ═══════════════ Filter panel + Content ═══════════════ */}
|
||||||
<div className="flex flex-col sm:flex-row gap-4">
|
<div className="flex flex-col sm:flex-row sm:items-start gap-4">
|
||||||
{/* ---- Filter panel ---- */}
|
{/* ---- Filter panel ---- */}
|
||||||
<aside
|
<aside
|
||||||
aria-label={t.skills.title}
|
aria-label={t.skills.title}
|
||||||
className="sm:w-56 sm:shrink-0"
|
className="sm:w-56 sm:shrink-0"
|
||||||
>
|
>
|
||||||
<div className="sm:sticky sm:top-4">
|
<div className="sm:sticky sm:top-0">
|
||||||
<div
|
<div
|
||||||
className={`
|
className={`
|
||||||
flex flex-col
|
flex flex-col
|
||||||
|
|||||||
Reference in New Issue
Block a user