refactor(ui): update alert variants and button styles in connector and document upload popups

This commit is contained in:
Anish Sarkar 2026-05-21 19:16:17 +05:30
parent 2fd05d720e
commit 15458157b9
3 changed files with 7 additions and 9 deletions

View file

@ -1,7 +1,7 @@
"use client"; "use client";
import { useAtomValue } from "jotai"; import { useAtomValue } from "jotai";
import { AlertTriangle, Settings } from "lucide-react"; import { AlertTriangle } from "lucide-react";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { forwardRef, useEffect, useImperativeHandle, useMemo, useState } from "react"; import { forwardRef, useEffect, useImperativeHandle, useMemo, useState } from "react";
import { createPortal } from "react-dom"; import { createPortal } from "react-dom";
@ -381,7 +381,7 @@ export const ConnectorIndicator = forwardRef<ConnectorIndicatorHandle, Connector
{/* LLM Configuration Warning */} {/* LLM Configuration Warning */}
{!llmConfigLoading && !hasDocumentSummaryLLM && ( {!llmConfigLoading && !hasDocumentSummaryLLM && (
<div className="mb-6"> <div className="mb-6">
<Alert variant="destructive"> <Alert variant="warning">
<AlertTriangle /> <AlertTriangle />
<AlertTitle>LLM Configuration Required</AlertTitle> <AlertTitle>LLM Configuration Required</AlertTitle>
<AlertDescription> <AlertDescription>
@ -392,7 +392,7 @@ export const ConnectorIndicator = forwardRef<ConnectorIndicatorHandle, Connector
</p> </p>
<Button <Button
size="sm" size="sm"
variant="outline" variant="secondary"
onClick={() => { onClick={() => {
handleOpenChange(false); handleOpenChange(false);
router.push( router.push(
@ -400,7 +400,6 @@ export const ConnectorIndicator = forwardRef<ConnectorIndicatorHandle, Connector
); );
}} }}
> >
<Settings className="mr-2 h-4 w-4" />
Go to Settings Go to Settings
</Button> </Button>
</AlertDescription> </AlertDescription>

View file

@ -1,7 +1,7 @@
"use client"; "use client";
import { useAtomValue } from "jotai"; import { useAtomValue } from "jotai";
import { AlertTriangle, Settings } from "lucide-react"; import { AlertTriangle } from "lucide-react";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { import {
createContext, createContext,
@ -148,7 +148,7 @@ const DocumentUploadPopupContent: FC<{
<div className="px-4 sm:px-6 pb-4 sm:pb-6"> <div className="px-4 sm:px-6 pb-4 sm:pb-6">
{!isLoading && !hasDocumentSummaryLLM ? ( {!isLoading && !hasDocumentSummaryLLM ? (
<div className="mb-4"> <div className="mb-4">
<Alert variant="destructive"> <Alert variant="warning">
<AlertTriangle /> <AlertTriangle />
<AlertTitle>LLM Configuration Required</AlertTitle> <AlertTitle>LLM Configuration Required</AlertTitle>
<AlertDescription> <AlertDescription>
@ -159,13 +159,12 @@ const DocumentUploadPopupContent: FC<{
</p> </p>
<Button <Button
size="sm" size="sm"
variant="outline" variant="secondary"
onClick={() => { onClick={() => {
onOpenChange(false); onOpenChange(false);
router.push(`/dashboard/${searchSpaceId}/search-space-settings/models`); router.push(`/dashboard/${searchSpaceId}/search-space-settings/models`);
}} }}
> >
<Settings className="mr-2 h-4 w-4" />
Go to Settings Go to Settings
</Button> </Button>
</AlertDescription> </AlertDescription>

View file

@ -14,7 +14,7 @@ const buttonVariants = cva(
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40", "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
outline: outline:
"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground", "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80", secondary: "bg-accent text-accent-foreground shadow-xs hover:bg-accent/80",
ghost: ghost:
"hover:bg-accent hover:text-accent-foreground focus-visible:ring-0 focus-visible:ring-offset-0", "hover:bg-accent hover:text-accent-foreground focus-visible:ring-0 focus-visible:ring-offset-0",
link: "text-primary underline-offset-4 hover:underline", link: "text-primary underline-offset-4 hover:underline",