style: update alert components and empty state UI

This commit is contained in:
Anish Sarkar 2026-04-02 09:16:07 +05:30
parent 1f8f71b542
commit 2df9708df9
5 changed files with 18 additions and 47 deletions

View file

@ -376,14 +376,14 @@ export const ConnectorIndicator = forwardRef<ConnectorIndicatorHandle, Connector
<div className="px-4 sm:px-12 py-4 sm:py-8 pb-12 sm:pb-16"> <div className="px-4 sm:px-12 py-4 sm:py-8 pb-12 sm:pb-16">
{/* LLM Configuration Warning */} {/* LLM Configuration Warning */}
{!llmConfigLoading && !hasDocumentSummaryLLM && ( {!llmConfigLoading && !hasDocumentSummaryLLM && (
<Alert variant="destructive" className="mb-6"> <Alert variant="destructive" className="mb-6 bg-muted/50 rounded-xl border-destructive/30">
<AlertTriangle className="h-4 w-4" /> <AlertTriangle className="h-4 w-4" />
<AlertTitle>LLM Configuration Required</AlertTitle> <AlertTitle>LLM Configuration Required</AlertTitle>
<AlertDescription className="mt-2"> <AlertDescription className="mt-2">
<p className="mb-3"> <p className="mb-3">
{isAutoMode && !hasGlobalConfigs {isAutoMode && !hasGlobalConfigs
? "Auto mode is selected but no global LLM configurations are available. Please configure a custom LLM in Settings to process and summarize documents from your connected sources." ? "Auto mode requires a global LLM configuration. Please add one in Settings"
: "You need to configure a Document Summary LLM before adding connectors. This LLM is used to process and summarize documents from your connected sources."} : "A Document Summary LLM is required to process uploads, configure one in Settings"}
</p> </p>
<Button <Button
size="sm" size="sm"

View file

@ -149,14 +149,14 @@ const DocumentUploadPopupContent: FC<{
{/* Content */} {/* Content */}
<div className="px-4 sm:px-12 pb-4 sm:pb-16"> <div className="px-4 sm:px-12 pb-4 sm:pb-16">
{!isLoading && !hasDocumentSummaryLLM ? ( {!isLoading && !hasDocumentSummaryLLM ? (
<Alert variant="destructive" className="mb-4"> <Alert variant="destructive" className="mb-4 bg-muted/50 rounded-xl border-destructive/30">
<AlertTriangle className="h-4 w-4" /> <AlertTriangle className="h-4 w-4" />
<AlertTitle>LLM Configuration Required</AlertTitle> <AlertTitle>LLM Configuration Required</AlertTitle>
<AlertDescription className="mt-2"> <AlertDescription className="mt-2">
<p className="mb-3"> <p className="mb-3">
{isAutoMode && !hasGlobalConfigs {isAutoMode && !hasGlobalConfigs
? "Auto mode is selected but no global LLM configurations are available. Please configure a custom LLM in Settings to process and summarize your uploaded documents." ? "Auto mode requires a global LLM configuration. Please add one in Settings"
: "You need to configure a Document Summary LLM before uploading files. This LLM is used to process and summarize your uploaded documents."} : "A Document Summary LLM is required to process uploads, configure one in Settings"}
</p> </p>
<Button <Button
size="sm" size="sm"

View file

@ -11,11 +11,8 @@ export function PublicChatSnapshotsEmptyState({
}: PublicChatSnapshotsEmptyStateProps) { }: PublicChatSnapshotsEmptyStateProps) {
return ( return (
<div className="flex flex-col items-center justify-center py-12 text-center"> <div className="flex flex-col items-center justify-center py-12 text-center">
<div className="rounded-full bg-muted p-3 mb-4"> <h3 className="text-sm md:text-base font-semibold mb-2">{title}</h3>
<Link2Off className="h-6 w-6 text-muted-foreground" /> <p className="text-[11px] md:text-xs text-muted-foreground max-w-sm">{description}</p>
</div>
<h3 className="text-sm font-medium text-foreground mb-1">{title}</h3>
<p className="text-xs text-muted-foreground max-w-sm">{description}</p>
</div> </div>
); );
} }

View file

@ -240,26 +240,14 @@ export function ImageModelManager({ searchSpaceId }: ImageModelManagerProps) {
{!isLoading && ( {!isLoading && (
<div className="space-y-4 md:space-y-6"> <div className="space-y-4 md:space-y-6">
{(userConfigs?.length ?? 0) === 0 ? ( {(userConfigs?.length ?? 0) === 0 ? (
<Card className="border-dashed border-2 border-muted-foreground/25"> <Card className="border-0 bg-transparent shadow-none">
<CardContent className="flex flex-col items-center justify-center py-10 md:py-16 text-center"> <CardContent className="flex flex-col items-center justify-center py-10 md:py-16 text-center">
<div className="rounded-full bg-gradient-to-br from-teal-500/10 to-cyan-500/10 p-4 md:p-6 mb-4"> <h3 className="text-sm md:text-base font-semibold mb-2">No Image Models Yet</h3>
<Wand2 className="h-8 w-8 md:h-12 md:w-12 text-teal-600 dark:text-teal-400" /> <p className="text-[11px] md:text-xs text-muted-foreground max-w-sm mb-4">
</div>
<h3 className="text-lg font-semibold mb-2">No Image Models Yet</h3>
<p className="text-xs md:text-sm text-muted-foreground max-w-sm mb-4">
{canCreate {canCreate
? "Add your own image generation model (DALL-E 3, GPT Image 1, etc.)" ? "Add your own image generation model (DALL-E 3, GPT Image 1, etc.)"
: "No image models have been added to this space yet. Contact a space owner to add one."} : "No image models have been added to this space yet. Contact a space owner to add one."}
</p> </p>
{canCreate && (
<Button
onClick={openNewDialog}
size="lg"
className="gap-2 text-xs md:text-sm h-9 md:h-10"
>
Add First Image Model
</Button>
)}
</CardContent> </CardContent>
</Card> </Card>
) : ( ) : (

View file

@ -250,28 +250,14 @@ export function ModelConfigManager({ searchSpaceId }: ModelConfigManagerProps) {
<div className="space-y-4"> <div className="space-y-4">
{configs?.length === 0 ? ( {configs?.length === 0 ? (
<div> <div>
<Card className="border-dashed border-2 border-muted-foreground/25"> <Card className="border-0 bg-transparent shadow-none">
<CardContent className="flex flex-col items-center justify-center py-10 md:py-16 text-center"> <CardContent className="flex flex-col items-center justify-center py-10 md:py-16 text-center">
<div className="rounded-full bg-gradient-to-br from-violet-500/10 to-purple-500/10 p-4 md:p-6 mb-4 md:mb-6"> <h3 className="text-sm md:text-base font-semibold mb-2">No LLM Models Yet</h3>
<Wand2 className="h-8 w-8 md:h-12 md:w-12 text-violet-600 dark:text-violet-400" /> <p className="text-[11px] md:text-xs text-muted-foreground max-w-sm mb-4">
</div> {canCreate
<div className="space-y-2 mb-4 md:mb-6"> ? "Add your first LLM model to power document summarization, chat, and other agent capabilities"
<h3 className="text-lg md:text-xl font-semibold">No Configurations Yet</h3> : "No LLM models have been added to this space yet. Contact a space owner to add one"}
<p className="text-xs md:text-sm text-muted-foreground max-w-sm"> </p>
{canCreate
? "Create your first AI configuration to customize how your agent responds"
: "No AI configurations have been added to this space yet. Contact a space owner to add one."}
</p>
</div>
{canCreate && (
<Button
onClick={openNewDialog}
size="lg"
className="gap-2 text-xs md:text-sm h-9 md:h-10"
>
Create First Configuration
</Button>
)}
</CardContent> </CardContent>
</Card> </Card>
</div> </div>