mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-13 14:10:59 +00:00
fix: constrain home page content width
This commit is contained in:
@@ -58,6 +58,8 @@ function isExtensionsRoute(pathname: string): boolean {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const HOME_CONTENT_MAX_WIDTH = 'max-w-[1360px]';
|
||||||
|
|
||||||
export default function HomeLayout({
|
export default function HomeLayout({
|
||||||
children,
|
children,
|
||||||
}: Readonly<{
|
}: Readonly<{
|
||||||
@@ -134,7 +136,9 @@ function HomeLayoutInner({ children }: { children: React.ReactNode }) {
|
|||||||
|
|
||||||
<SidebarInset>
|
<SidebarInset>
|
||||||
<header className="flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12">
|
<header className="flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12">
|
||||||
<div className="flex items-center gap-2 px-4">
|
<div
|
||||||
|
className={`mx-auto flex w-full items-center gap-2 px-4 ${HOME_CONTENT_MAX_WIDTH}`}
|
||||||
|
>
|
||||||
<SidebarTrigger className="-ml-1" />
|
<SidebarTrigger className="-ml-1" />
|
||||||
<Separator
|
<Separator
|
||||||
orientation="vertical"
|
orientation="vertical"
|
||||||
@@ -178,9 +182,13 @@ function HomeLayoutInner({ children }: { children: React.ReactNode }) {
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div className="flex-1 overflow-hidden p-4 pt-0 min-w-0">
|
<main className="flex-1 overflow-hidden min-w-0 px-4 pb-4 pt-0">
|
||||||
{mainContent}
|
<div
|
||||||
</div>
|
className={`mx-auto h-full w-full min-w-0 ${HOME_CONTENT_MAX_WIDTH}`}
|
||||||
|
>
|
||||||
|
{mainContent}
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
<SurveyWidget />
|
<SurveyWidget />
|
||||||
</SidebarInset>
|
</SidebarInset>
|
||||||
|
|||||||
@@ -267,8 +267,8 @@ function MonitoringPageContent() {
|
|||||||
return (
|
return (
|
||||||
<div className="w-full h-full overflow-y-auto overflow-x-hidden">
|
<div className="w-full h-full overflow-y-auto overflow-x-hidden">
|
||||||
{/* Filters and Refresh Button - Sticky */}
|
{/* Filters and Refresh Button - Sticky */}
|
||||||
<div className="sticky top-[-1.5rem] z-10 -ml-[2rem] -mr-[1.5rem] -mt-[1.5rem] pt-[1.5rem] pb-4 bg-background">
|
<div className="sticky top-0 z-10 -mt-1 pb-4 pt-1 bg-background">
|
||||||
<div className="ml-[2rem] mr-[1.5rem] px-[0.8rem]">
|
<div>
|
||||||
<div className="flex flex-wrap items-center justify-between gap-4 p-4 bg-card rounded-xl border">
|
<div className="flex flex-wrap items-center justify-between gap-4 p-4 bg-card rounded-xl border">
|
||||||
<MonitoringFilters
|
<MonitoringFilters
|
||||||
selectedBots={filterState.selectedBots}
|
selectedBots={filterState.selectedBots}
|
||||||
@@ -295,7 +295,7 @@ function MonitoringPageContent() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Content Area */}
|
{/* Content Area */}
|
||||||
<div className="flex flex-col gap-6 px-[0.8rem] pb-4">
|
<div className="flex flex-col gap-6 pb-4">
|
||||||
{/* Overview Section */}
|
{/* Overview Section */}
|
||||||
<OverviewCards
|
<OverviewCards
|
||||||
metrics={data?.overview || null}
|
metrics={data?.overview || null}
|
||||||
|
|||||||
Reference in New Issue
Block a user