OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.
Python
WIP styling Settings Page - Ross K
rossdkisere4774ea63e87
diff --git a/frontend/app/chat/page.tsx b/frontend/app/chat/page.tsxindex c5bb60a4f..c30649bcd 100644--- a/frontend/app/chat/page.tsx+++ b/frontend/app/chat/page.tsx@@ -1234,6 +1234,7 @@ export default function ProtectedChatPage() {<divclassName={cn("flex w-full h-full overflow-hidden",+ isCloudBrand && "ibm-chat-page",isCloudBrand &&"bg-[var(--chat-surface-bg)] [background-image:linear-gradient(0deg,var(--chat-surface-gradient),transparent_280px)]",)}diff --git a/frontend/app/globals.css b/frontend/app/globals.cssindex 3d92b053e..1d71c8ca0 100644--- a/frontend/app/globals.css+++ b/frontend/app/globals.css@@ -200,6 +200,13 @@--layered-select-bg: rgba(131, 131, 131, 0.24);--chat-input-border: #f4f4f4;--icon-disabled: #525252;+ /* Contextual layer (~Gray 100); use hsl(var(--layer-contextual)) */+ /* Layer / contextual surfaces (IBM Gray 10 light, Gray 100 dark) */+ --layer-contextual: 0 0% 95.7%;+ --layer-contextual-foreground: 0 0% 9%;+ --text-text-01: 0 0% 9%;+ --link-primary: 217 100% 45%;+ --button-tertiary: 217 100% 45%;}/* IBM Dark */@@ -210,9 +217,10 @@--card-foreground: 0 0% 97%;--popover: 0 0% 12%;--popover-foreground: 0 0% 97%;- --primary: 217 100% 45%; /* IBM Blue 60 #0f62fe */+ /* Dark UI: lighter blue (Blue 40 ~#78A9FF), not Blue 60 */+ --primary: 217 100% 74%;--primary-foreground: 0 0% 9%;- --primary-hover: 217 100% 35%; /* IBM Blue 70 #0043ce */+ --primary-hover: 217 100% 82%;--secondary: 0 0% 12%;--secondary-foreground: 0 0% 97%;--secondary-hover: 0 0% 18%; /* IBM Gray 80 #393939 */@@ -222,7 +230,7 @@--accent-foreground: 0 0% 97%;--border: 0 0% 22.4%; /* IBM Gray 80 #393939 - Ui-border 3 */--input: 0 0% 26%;- --ring: 217 100% 62%;+ --ring: 217 100% 74%;--placeholder-foreground: var(--input); /* placeholder uses shadcn input token */@@ -245,7 +253,7 @@--warning: 46 97% 65%;--warning-foreground: 0 0% 0%;- --component-icon: #4589ff;+ --component-icon: #78a9ff;--flow-icon: #78a9ff;--radius: 0rem;@@ -257,17 +265,43 @@--sidebar-background: 0 0% 12%;--sidebar-foreground: 0 0% 97%;- --sidebar-primary: 217 100% 62%;+ --sidebar-primary: 217 100% 74%;--sidebar-primary-foreground: 0 0% 9%;--sidebar-accent: 0 0% 18%;--sidebar-accent-foreground: 0 0% 97%;--sidebar-border: 0 0% 26%;- --sidebar-ring: 217 100% 62%;+ --sidebar-ring: 217 100% 74%;/* IBM-only UI tokens */--layered-select-bg: rgba(131, 131, 131, 0.24);--chat-input-border: #262626;--icon-disabled: #525252;+ --layer-contextual: 0 0% 15%;+ --layer-contextual-foreground: 0 0% 95.7%;+ --text-text-01: 0 0% 95.7%;+ --link-primary: 217 100% 74%;+ --button-tertiary: 217 100% 74%;+ }++ /* IBM Settings: section titles (productive heading-04); beats CardTitle utilities */+ [data-theme="ibm"] .ibm-settings-section-title {+ color: hsl(var(--text-text-01));+ font-family: inherit;+ font-size: 28px !important;+ font-weight: 400 !important;+ line-height: 36px !important;+ font-style: normal;+ letter-spacing: 0;+ }++ /* IBM Settings: inline links (Link/link-primary) */+ [data-theme="ibm"] .ibm-settings-page a[href] {+ color: hsl(var(--link-primary));+ }++ [data-theme="ibm"] .ibm-settings-page a[href]:hover {+ text-decoration: underline;+ text-underline-offset: 2px;}/* IBM chat nudges / quick actions */@@ -279,6 +313,30 @@background-color: #262626;}+ /*+ * IBM chat page only: body copy #000 (light) / #fff (dark) via tokens.+ * Scoped so OSS and non-chat IBM surfaces keep existing --foreground.+ */+ [data-theme="ibm"] .ibm-chat-page {+ --ibm-chat-text: 0 0% 0%;+ --foreground: var(--ibm-chat-text);+ --muted-foreground: var(--ibm-chat-text);+ }++ [data-theme="ibm"].dark .ibm-chat-page {+ --ibm-chat-text: 0 0% 100%;+ --foreground: var(--ibm-chat-text);+ --muted-foreground: var(--ibm-chat-text);+ }++ [data-theme="ibm"] .ibm-chat-page .markdown.prose {+ color: hsl(var(--ibm-chat-text));+ }++ [data-theme="ibm"] .ibm-chat-page .markdown.prose a {+ color: hsl(var(--primary));+ }+* {@apply border-border;}diff --git a/frontend/app/settings/_components/connector-card.tsx b/frontend/app/settings/_components/connector-card.tsxindex c3e2ab42e..cfde6dde8 100644--- a/frontend/app/settings/_components/connector-card.tsx+++ b/frontend/app/settings/_components/connector-card.tsx@@ -10,6 +10,8 @@ import {CardHeader,CardTitle,} from "@/components/ui/card";+import { useIsCloudBrand } from "@/contexts/brand-context";+import { cn } from "@/lib/utils";import CardIcon from "./card-icon";export interface Connector {@@ -42,12 +44,19 @@ export default function ConnectorCard({onNavigateToKnowledge,onConfigure,}: ConnectorCardProps) {- console.log(connector);+ const isCloudBrand = useIsCloudBrand();const isConnected =connector.status === "connected" && connector.connectionId;return (- <Card className="group relative flex flex-col hover:bg-secondary-hover hover:border-muted-foreground transition-colors">+ <Card+ className={cn(+ "group relative flex flex-col transition-colors",+ isCloudBrand+ ? "rounded-none border-0 bg-layer-contextual text-layer-contextual-foreground shadow-none hover:bg-layer-contextual"+ : "hover:bg-secondary-hover hover:border-muted-foreground",+ )}+ ><CardHeader className="pb-2"><div className="flex flex-col items-start justify-between"><div className="flex flex-col gap-4 mb-2 w-full">@@ -56,17 +65,34 @@ export default function ConnectorCard({{connector.icon}</CardIcon>{isConnected ? (- <div className="flex items-center gap-1.5 rounded-full bg-foreground px-2.5 py-1 text-xs font-medium text-muted">+ <div+ className={cn(+ "flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium",+ isCloudBrand+ ? "bg-primary/10 text-primary dark:bg-white/10 dark:text-layer-contextual-foreground"+ : "bg-foreground text-muted",+ )}+ ><span className="h-2 w-2 rounded-full bg-green-500" />Active</div>) : null}</div><div>- <CardTitle className="flex flex-row items-center">+ <CardTitle+ className={cn(+ "flex flex-row items-center",+ isCloudBrand && "text-layer-contextual-foreground",+ )}+ >{connector.name}</CardTitle>- <CardDescription className="text-sm">+ <CardDescription+ className={cn(+ "text-sm",+ isCloudBrand && "!text-layer-contextual-foreground",+ )}+ >{isConnected || connector?.available? `${connector.name} is configured.`: "Not configured."}@@ -84,7 +110,10 @@ export default function ConnectorCard({variant="default"onClick={() => onNavigateToKnowledge(connector)}disabled={isDisconnecting || isConnecting}- className="cursor-pointer !text-sm truncate rounded-md flex-1"+ className={cn(+ "cursor-pointer !text-sm truncate flex-1 text-primary-foreground [&_svg]:text-primary-foreground",+ isCloudBrand ? "rounded-none" : "rounded-md",+ )}size="md"><Plus className="h-4 w-4" />@@ -96,7 +125,11 @@ export default function ConnectorCard({onConfigure ? onConfigure(connector) : onConnect(connector)}disabled={isConnecting || isDisconnecting}- className="cursor-pointer"+ className={cn(+ "cursor-pointer",+ isCloudBrand &&+ "rounded-none border-button-tertiary text-layer-contextual-foreground hover:bg-black/5 hover:text-layer-contextual-foreground dark:hover:bg-white/5",+ )}size="iconMd">{isConnecting ? (@@ -109,7 +142,10 @@ export default function ConnectorCard({variant="outline"onClick={() => onDisconnect(connector)}disabled={isDisconnecting || isConnecting}- className="cursor-pointer text-destructive hover:text-destructive"+ className={cn(+ "cursor-pointer text-destructive hover:text-destructive",+ isCloudBrand && "rounded-none",+ )}size="iconMd">{isDisconnecting ? (@@ -125,7 +161,13 @@ export default function ConnectorCard({onConfigure ? onConfigure(connector) : onConnect(connector)}disabled={isConnecting}- className="w-full cursor-pointer group-hover:bg-background group-hover:border-zinc-700 group-hover:text-primary"+ variant={isCloudBrand ? "outline" : "default"}+ className={cn(+ "w-full cursor-pointer",+ isCloudBrand+ ? "rounded-none border-primary bg-layer-contextual text-layer-contextual-foreground hover:bg-primary hover:text-primary-foreground hover:border-primary"+ : "group-hover:bg-background group-hover:border-zinc-700 group-hover:text-primary",+ )}size="sm">{isConnecting ? (@@ -140,10 +182,21 @@ export default function ConnectorCard({)}</div>) : (- <div className="text-sm text-muted-foreground">+ <div+ className={cn(+ "text-sm",+ isCloudBrand+ ? "text-layer-contextual-foreground"+ : "text-muted-foreground",+ )}+ ><p>For more details see our</p><Link- className="text-accent-pink-foreground"+ className={+ isCloudBrand+ ? "underline-offset-2"+ : "text-accent-pink-foreground"+ }href="https://docs.openr.ag/knowledge#oauth-ingestion"target="_blank"rel="noopener noreferrer"diff --git a/frontend/app/settings/_components/connectors-skeleton.tsx b/frontend/app/settings/_components/connectors-skeleton.tsxindex 2dd61f9d7..4159702be 100644--- a/frontend/app/settings/_components/connectors-skeleton.tsx+++ b/frontend/app/settings/_components/connectors-skeleton.tsx@@ -1,9 +1,17 @@import { Card, CardContent, CardHeader } from "@/components/ui/card";import { Skeleton } from "@/components/ui/skeleton";+import { useIsCloudBrand } from "@/contexts/brand-context";+import { cn } from "@/lib/utils";export default function ConnectorsSkeleton() {+ const isCloudBrand = useIsCloudBrand();return (- <Card className="relative flex flex-col overflow-hidden">+ <Card+ className={cn(+ "relative flex flex-col overflow-hidden",+ isCloudBrand && "rounded-none border-0 bg-layer-contextual shadow-none",+ )}+ ><CardHeader className="pb-3"><div className="flex flex-col items-start justify-between"><div className="flex flex-col gap-4 w-full">diff --git a/frontend/app/settings/_components/model-provider-card.tsx b/frontend/app/settings/_components/model-provider-card.tsxindex 8495fe9a9..80aa0201b 100644--- a/frontend/app/settings/_components/model-provider-card.tsx+++ b/frontend/app/settings/_components/model-provider-card.tsx@@ -2,6 +2,7 @@import { Button } from "@/components/ui/button";import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";+import { useIsCloudBrand } from "@/contexts/brand-context";import { cn } from "@/lib/utils";import type { ModelProvider } from "../_helpers/model-helpers";import CardIcon from "./card-icon";@@ -27,14 +28,21 @@ export default function ModelProviderCard({isUnhealthy,onConfigure,}: ModelProviderCardProps) {+ const isCloudBrand = useIsCloudBrand();const { providerKey, name, logo: Logo, logoColor, logoBgColor } = provider;+ const isEditSetup = isConfigured && !isUnhealthy;return (<CardclassName={cn(- "group relative flex flex-col hover:bg-secondary-hover hover:border-muted-foreground transition-colors",- !isConfigured && "text-muted-foreground",- isUnhealthy && "border-destructive",+ "group relative flex flex-col transition-colors",+ isCloudBrand+ ? "rounded-none border-0 bg-layer-contextual text-layer-contextual-foreground shadow-none"+ : "hover:bg-secondary-hover hover:border-muted-foreground",+ !isConfigured && !isCloudBrand && "text-muted-foreground",+ !isConfigured && isCloudBrand && "text-layer-contextual-foreground/70",+ isUnhealthy &&+ (isCloudBrand ? "ring-2 ring-destructive" : "border-destructive"),)}><CardHeader>@@ -47,7 +55,12 @@ export default function ModelProviderCard({/></CardIcon></div>- <CardTitle className="flex flex-row items-center gap-2">+ <CardTitle+ className={cn(+ "flex flex-row items-center gap-2",+ isCloudBrand && "text-layer-contextual-foreground",+ )}+ >{name}{isUnhealthy && (<span className="h-2 w-2 rounded-full bg-destructive" />@@ -59,10 +72,21 @@ export default function ModelProviderCard({<CardContent className="flex-1 flex flex-col justify-end space-y-4"><ButtonclassName={cn(- "group-hover:bg-background",- isConfigured && "border-primary",+ !isCloudBrand && "group-hover:bg-background",+ isConfigured && !isCloudBrand && "border-primary",+ isCloudBrand &&+ isEditSetup &&+ "rounded-none border border-button-tertiary bg-layer-contextual text-layer-contextual-foreground shadow-none hover:bg-layer-contextual hover:text-layer-contextual-foreground",+ isCloudBrand && !isEditSetup && !isUnhealthy && "rounded-none",+ isUnhealthy && isCloudBrand && "rounded-none",)}- variant={isUnhealthy ? "default" : "outline"}+ variant={+ isUnhealthy+ ? "default"+ : isCloudBrand && isEditSetup+ ? "ghost"+ : "outline"+ }onClick={() => onConfigure(providerKey)}>{isUnhealthydiff --git a/frontend/app/settings/page.tsx b/frontend/app/settings/page.tsxindex e942480ac..eebc69663 100644--- a/frontend/app/settings/page.tsx+++ b/frontend/app/settings/page.tsx@@ -9,6 +9,7 @@ import {Plus,Trash2,} from "lucide-react";+import { IBM_Plex_Sans } from "next/font/google";import Link from "next/link";import { useRouter, useSearchParams } from "next/navigation";import { Suspense, useEffect, useState } from "react";@@ -47,6 +48,7 @@ import { Label } from "@/components/ui/label";import { Switch } from "@/components/ui/switch";import { Textarea } from "@/components/ui/textarea";import { useAuth } from "@/contexts/auth-context";+import { useIsCloudBrand } from "@/contexts/brand-context";import { useTask } from "@/contexts/task-context";import {DEFAULT_AGENT_SETTINGS,@@ -63,7 +65,14 @@ import { getModelLogo, type ModelProvider } from "./_helpers/model-helpers";const { MAX_SYSTEM_PROMPT_CHARS } = UI_CONSTANTS;+const ibmSettingsFont = IBM_Plex_Sans({+ subsets: ["latin"],+ weight: ["400", "500", "600", "700"],+ display: "swap",+});+function KnowledgeSourcesPage() {+ const isCloudBrand = useIsCloudBrand();const { isAuthenticated, isNoAuthMode } = useAuth();const { addTask, tasks } = useTask();const searchParams = useSearchParams();@@ -527,11 +536,22 @@ function KnowledgeSourcesPage() {};return (- <div className="space-y-8 pb-6">+ <div+ className={cn(+ "space-y-8 pb-6",+ isCloudBrand && ibmSettingsFont.className,+ isCloudBrand && "ibm-settings-page",+ )}+ >{/* Connectors Section */}<div className="space-y-6"><div>- <h2 className="text-lg font-semibold tracking-tight mb-2">+ <h2+ className={cn(+ "mb-2 text-lg font-semibold tracking-tight",+ isCloudBrand && "ibm-settings-section-title",+ )}+ >Cloud Connectors</h2></div>@@ -541,7 +561,12 @@ function KnowledgeSourcesPage() {isNoAuthMode ? (<Card className="border-accent-amber-foreground"><CardHeader>- <CardTitle className="text-lg">+ <CardTitle+ className={cn(+ "text-lg",+ isCloudBrand && "ibm-settings-section-title",+ )}+ >Cloud connectors require authentication</CardTitle><CardDescription className="text-sm">@@ -646,7 +671,12 @@ function KnowledgeSourcesPage() {{/* Model Providers Section */}<div className="space-y-6"><div>- <h2 className="text-lg font-semibold tracking-tight mb-2">+ <h2+ className={cn(+ "mb-2 text-lg font-semibold tracking-tight",+ isCloudBrand && "ibm-settings-section-title",+ )}+ >Model Providers</h2></div>@@ -657,7 +687,14 @@ function KnowledgeSourcesPage() {<Card id="agent-card"><CardHeader><div className="flex items-center justify-between mb-3">- <CardTitle className="text-lg">Agent</CardTitle>+ <CardTitle+ className={cn(+ "text-lg",+ isCloudBrand && "ibm-settings-section-title",+ )}+ >+ Agent+ </CardTitle><div className="flex gap-2"><ConfirmationDialogtrigger={@@ -805,7 +842,14 @@ function KnowledgeSourcesPage() {<Card><CardHeader><div className="flex items-center justify-between mb-3">- <CardTitle className="text-lg">Knowledge Ingest</CardTitle>+ <CardTitle+ className={cn(+ "text-lg",+ isCloudBrand && "ibm-settings-section-title",+ )}+ >+ Knowledge Ingest+ </CardTitle><div className="flex gap-2"><ConfirmationDialogtrigger={@@ -1056,7 +1100,14 @@ function KnowledgeSourcesPage() {<Card><CardHeader><div className="flex items-center justify-between mb-3">- <CardTitle className="text-lg">API Keys</CardTitle>+ <CardTitle+ className={cn(+ "text-lg",+ isCloudBrand && "ibm-settings-section-title",+ )}+ >+ API Keys+ </CardTitle><Button onClick={() => setCreateKeyDialogOpen(true)} size="sm"><Plus className="h-4 w-4 mr-2" />Create Keydiff --git a/frontend/tailwind.config.ts b/frontend/tailwind.config.tsindex b0b98a4b6..25a87c41c 100644--- a/frontend/tailwind.config.ts+++ b/frontend/tailwind.config.ts@@ -156,6 +156,12 @@ const config = {DEFAULT: "hsl(var(--card))",foreground: "hsl(var(--card-foreground))",},+ "layer-contextual": "hsl(var(--layer-contextual))",+ "layer-contextual-foreground":+ "hsl(var(--layer-contextual-foreground))",+ "text-text-01": "hsl(var(--text-text-01))",+ "link-primary": "hsl(var(--link-primary))",+ "button-tertiary": "hsl(var(--button-tertiary))","component-icon": "var(--component-icon)","flow-icon": "var(--flow-icon)","placeholder-foreground": "hsl(var(--placeholder-foreground))",