feat: new primary color

This commit is contained in:
dextmorgn
2025-02-22 17:06:43 +01:00
parent b46657e1cc
commit 8b86239764
8 changed files with 36 additions and 34 deletions

View File

@@ -1,12 +1,12 @@
import { Button } from "@/components/ui/button"
import { GemIcon } from "lucide-react"
import { GemIcon, ScanIcon } from "lucide-react"
import { useChatContext } from "./contexts/chatbot-context"
const Assistant = () => {
const { handleOpenChat } = useChatContext()
return (
<Button onClick={() => handleOpenChat(null)} variant="ghost" size={"icon"} className="h-full w-12 rounded-none"><GemIcon className="h-6 w-6 text-primary" /></Button>
<Button onClick={() => handleOpenChat(null)} variant="ghost" size={"icon"} className="h-full w-12 rounded-none"><ScanIcon strokeWidth={3} className="h-12 w-12 text-primary font-bold" /></Button>
)
}
export default Assistant

View File

@@ -27,7 +27,7 @@ interface ChatProviderProps {
export const ChatProvider: React.FC<ChatProviderProps> = ({ children }) => {
const [open, setOpen] = useState(false)
const [context, setContext] = useState<any>(null)
const { messages, input, handleInputChange, setInput, handleSubmit, error, isLoading } = useChat()
const { messages, input, handleInputChange, setInput, handleSubmit, error } = useChat()
const handleOpenChat = (content: any) => {
setContext(content)

View File

@@ -18,6 +18,7 @@ import { InfoIcon } from "lucide-react"
import { investigateValue } from "@/lib/actions/search"
import { useParams } from "next/navigation"
import Breaches from "../breach"
import { cn } from "@/lib/utils"
interface SearchContextType {
openSearchModal: boolean
@@ -69,7 +70,7 @@ export const SearchProvider: React.FC<SearchProviderProps> = ({ children }) => {
<SearchContext.Provider value={{ openSearchModal, handleOpenSearchModal }}>
{children}
<Sheet open={openSearchModal} onOpenChange={handleCloseModal}>
<SheetContent className={results ? "sm:max-w-[950px]" : "sm:max-w-[450px]"}>
<SheetContent className={cn(results ? "sm:max-w-[950px]" : "sm:max-w-[450px]", "h-screen overflow-auto")}>
<SheetHeader>
<SheetTitle>New search</SheetTitle>
<SheetDescription>Make a new keyword associated research.</SheetDescription>

View File

@@ -17,7 +17,8 @@ import { Card, CardContent } from "@/components/ui/card"
import { Pencil, X, Plus, Trash2 } from "lucide-react"
import Breaches from "../breach"
import { useQueryState } from "nuqs"
import { Building2, Mail, MapPin, Phone, User } from "lucide-react"
import Image from "next/image"
const IndividualModal = () => {
const [individualId, setIndividualId] = useQueryState("individual_id")
const { individual, isLoading } = useIndividual(individualId)
@@ -84,12 +85,11 @@ const IndividualModal = () => {
</Dialog>
)
}
return (
<Dialog open={Boolean(individualId)} onOpenChange={handleCloseModal}>
<DialogContent className="sm:max-w-[70vw] h-[90vh] overflow-auto p-12">
<form className="flex flex-col gap-3 justify-between h-full" onSubmit={handleSave}>
<div className="flex flex-col gap-4 flex-grow-0">
<form className="flex flex-col gap-3 justify-between h-full w-full" onSubmit={handleSave}>
<div className="flex flex-col gap-4 flex-grow-0 w-full">
<div className="flex justify-between items-center">
<DialogTitle>User Profile</DialogTitle>
<Button
@@ -104,14 +104,14 @@ const IndividualModal = () => {
</div>
<div className="flex gap-6">
<div className="flex flex-col">
<Avatar className="h-20 w-20">
<Avatar className="h-32 w-32">
<AvatarImage src={image || undefined} alt={individual?.full_name} />
<AvatarFallback>{individual?.full_name?.[0] || "?"}</AvatarFallback>
</Avatar>
</div>
<div className="flex-grow w-full">
<Tabs defaultValue="overview" className="w-full">
<TabsList className="overflow-x-auto">
<TabsList className="overflow-x-auto w-full justify-start">
<TabsTrigger value="overview">Overview</TabsTrigger>
<TabsTrigger value="social_account">
Social accounts

View File

@@ -13,7 +13,6 @@ import { ScrollArea } from '../ui/scroll-area';
import Assistant from '../assistant';
import { AppSidebar } from '../app-sidebar';
import { SidebarProvider } from '../ui/sidebar';
import { cn } from '@/lib/utils';
const InvestigationLayout = ({
children,

View File

@@ -53,30 +53,32 @@ function Custom(props: any) {
const { data } = props
return (
<>
{settings.showNodeToolbar && (
<NodeToolbar isVisible={data.forceToolbarVisible || undefined} position={Position.Top}>
<Card className="p-1 rounded-full shadow-none backdrop-blur bg-background/40">
<div className="flex gap-1">
<Button variant="outline" className="rounded-full" size="sm" onClick={() => setIndividualId(data.id)}>
<Edit className="h-4 w-4 mr-2" />
Edit
</Button>
<Button variant="outline" className="rounded-full" size="sm" onClick={() => handleOpenChat(data)}>
<Zap className="h-4 w-4 mr-2 text-orange-500" />
Ask AI
</Button>
</div>
</Card>
</NodeToolbar>
)}
<div style={{ ...props.style, borderRadius: "100000px!important" }} >
{
settings.showNodeToolbar && (
<NodeToolbar isVisible={data.forceToolbarVisible || undefined} position={Position.Top}>
<Card className="p-1 rounded-full shadow-none backdrop-blur bg-background/40">
<div className="flex gap-1">
<Button variant="outline" className="rounded-full" size="sm" onClick={() => setIndividualId(data.id)}>
<Edit className="h-4 w-4 mr-2" />
Edit
</Button>
<Button variant="outline" className="rounded-full" size="sm" onClick={() => handleOpenChat(data)}>
<Zap className="h-4 w-4 mr-2 text-orange-500" />
Ask AI
</Button>
</div>
</Card>
</NodeToolbar>
)
}
<ContextMenu>
<ContextMenuTrigger
onContextMenu={(e) => {
e.stopPropagation()
}}
>
<div className={cn(loading ? "opacity-40" : "opacity-100", "overflow-hidden group")}>
<div className={cn(loading ? "opacity-40" : "opacity-100", "overflow-hidden group rounded-full")}>
{settings.showNodeLabel && showContent ? (
<Card
onDoubleClick={() => setIndividualId(data.id)}
@@ -210,8 +212,8 @@ function Custom(props: any) {
<span className="ml-auto text-xs text-muted-foreground"> </span>
</ContextMenuItem>
</ContextMenuContent>
</ContextMenu>
</>
</ ContextMenu>
</div>
)
}

View File

@@ -40,7 +40,7 @@ export function TeamSwitcher({
size="lg"
className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
>
<div className="bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg">
<div className="bg-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg">
<activeTeam.logo className="size-4" />
</div>
<div className="grid flex-1 text-left text-sm leading-tight">

View File

@@ -15,7 +15,7 @@
--card-foreground: hsl(0 0% 3.9%);
--popover: hsl(0 0% 100%);
--popover-foreground: hsl(0 0% 3.9%);
--primary: hsl(262.1 83.3% 57.8%);
--primary: hsl(355, 83%, 58%);
--primary-foreground: hsl(0 0% 98%);
--secondary: hsl(0 0% 96.1%);
--secondary-foreground: hsl(0 0% 9%);
@@ -53,7 +53,7 @@
--card-foreground: hsl(0 0% 98%);
--popover: hsl(240 0% 9.9%);
--popover-foreground: hsl(0 0% 98%);
--primary: hsl(262.1 83.3% 57.8%);
--primary: hsl(355, 83%, 58%);
--primary-foreground: hsl(0, 0%, 100%);
--secondary: hsl(0 0% 14.9%);
--secondary-foreground: hsl(0 0% 98%);