fix layout merge conflicts
This commit is contained in:
parent
2aaac7ad14
commit
a9bb26001b
3 changed files with 15 additions and 11 deletions
|
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
--radius: 0.5rem;
|
--radius: 0.5rem;
|
||||||
|
|
||||||
--app-header-height: 53px;
|
--app-header-height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ export default function RootLayout({
|
||||||
return (
|
return (
|
||||||
<html lang="en" suppressHydrationWarning>
|
<html lang="en" suppressHydrationWarning>
|
||||||
<body
|
<body
|
||||||
className={`${inter.variable} ${jetbrainsMono.variable} ${chivo.variable} antialiased h-full w-full overflow-hidden`}
|
className={`${inter.variable} ${jetbrainsMono.variable} ${chivo.variable} antialiased h-lvh w-full overflow-hidden`}
|
||||||
>
|
>
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
attribute="class"
|
attribute="class"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import { KnowledgeFilterPanel } from "@/components/knowledge-filter-panel";
|
||||||
import Logo from "@/components/logo/logo";
|
import Logo from "@/components/logo/logo";
|
||||||
import { Navigation } from "@/components/navigation";
|
import { Navigation } from "@/components/navigation";
|
||||||
import { TaskNotificationMenu } from "@/components/task-notification-menu";
|
import { TaskNotificationMenu } from "@/components/task-notification-menu";
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import { UserNav } from "@/components/user-nav";
|
import { UserNav } from "@/components/user-nav";
|
||||||
import { useAuth } from "@/contexts/auth-context";
|
import { useAuth } from "@/contexts/auth-context";
|
||||||
import { useChat } from "@/contexts/chat-context";
|
import { useChat } from "@/contexts/chat-context";
|
||||||
|
|
@ -38,7 +37,6 @@ export function LayoutWrapper({ children }: { children: React.ReactNode }) {
|
||||||
|
|
||||||
// Only fetch conversations on chat page
|
// Only fetch conversations on chat page
|
||||||
const isOnChatPage = pathname === "/" || pathname === "/chat";
|
const isOnChatPage = pathname === "/" || pathname === "/chat";
|
||||||
const isOnKnowledgePage = pathname === "/knowledge";
|
|
||||||
const { data: conversations = [], isLoading: isConversationsLoading } =
|
const { data: conversations = [], isLoading: isConversationsLoading } =
|
||||||
useGetConversationsQuery(endpoint, refreshTrigger, {
|
useGetConversationsQuery(endpoint, refreshTrigger, {
|
||||||
enabled: isOnChatPage && (isAuthenticated || isNoAuthMode),
|
enabled: isOnChatPage && (isAuthenticated || isNoAuthMode),
|
||||||
|
|
@ -52,6 +50,7 @@ export function LayoutWrapper({ children }: { children: React.ReactNode }) {
|
||||||
// List of paths that should not show navigation
|
// List of paths that should not show navigation
|
||||||
const authPaths = ["/login", "/auth/callback", "/onboarding"];
|
const authPaths = ["/login", "/auth/callback", "/onboarding"];
|
||||||
const isAuthPage = authPaths.includes(pathname);
|
const isAuthPage = authPaths.includes(pathname);
|
||||||
|
const isOnKnowledgePage = pathname.startsWith("/knowledge");
|
||||||
|
|
||||||
// List of paths with smaller max-width
|
// List of paths with smaller max-width
|
||||||
const smallWidthPaths = ["/settings", "/settings/connector/new"];
|
const smallWidthPaths = ["/settings", "/settings/connector/new"];
|
||||||
|
|
@ -59,7 +58,7 @@ export function LayoutWrapper({ children }: { children: React.ReactNode }) {
|
||||||
|
|
||||||
// Calculate active tasks for the bell icon
|
// Calculate active tasks for the bell icon
|
||||||
const activeTasks = tasks.filter(
|
const activeTasks = tasks.filter(
|
||||||
task =>
|
(task) =>
|
||||||
task.status === "pending" ||
|
task.status === "pending" ||
|
||||||
task.status === "running" ||
|
task.status === "running" ||
|
||||||
task.status === "processing"
|
task.status === "processing"
|
||||||
|
|
@ -84,10 +83,9 @@ export function LayoutWrapper({ children }: { children: React.ReactNode }) {
|
||||||
|
|
||||||
// For all other pages, render with Langflow-styled navigation and task menu
|
// For all other pages, render with Langflow-styled navigation and task menu
|
||||||
return (
|
return (
|
||||||
<div className="h-screen">
|
<div className="h-full relative">
|
||||||
{/* Header */}
|
<header className="header-arrangement bg-background sticky top-0 z-50 h-10">
|
||||||
<header className="header-arrangement bg-background">
|
<div className="header-start-display px-[16px]">
|
||||||
<div className="header-start-display px-4">
|
|
||||||
{/* Logo/Title */}
|
{/* Logo/Title */}
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<Logo className="fill-primary" width={24} height={22} />
|
<Logo className="fill-primary" width={24} height={22} />
|
||||||
|
|
@ -126,7 +124,6 @@ export function LayoutWrapper({ children }: { children: React.ReactNode }) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"app-grid-cols-arrangement group",
|
"app-grid-cols-arrangement group",
|
||||||
|
|
@ -145,7 +142,14 @@ export function LayoutWrapper({ children }: { children: React.ReactNode }) {
|
||||||
|
|
||||||
{/* Main Content */}
|
{/* Main Content */}
|
||||||
<main className="overflow-y-auto">
|
<main className="overflow-y-auto">
|
||||||
<div className="container p-6 h-full">{children}</div>
|
<div
|
||||||
|
className={cn(
|
||||||
|
"p-6 h-full container",
|
||||||
|
isSmallWidthPath && "max-w-[850px]"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{/* Task Notifications Panel */}
|
{/* Task Notifications Panel */}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue