feat: setting to hide/show flo

This commit is contained in:
dextmorgn
2025-09-04 15:32:57 +02:00
parent cce0e51faf
commit ec92af80b2
8 changed files with 17 additions and 10 deletions
@@ -25,7 +25,7 @@ function InvestigationCard({ investigation }: InvestigationCardProps) {
params={{ investigationId: investigation.id }}
className="block"
>
<Card className="hover:shadow-lg py-4 transition-all duration-200 cursor-pointer group border-2 hover:border-primary/20">
<Card className="hover:shadow-lg py-4 transition-all duration-200 cursor-pointer group border hover:border-primary/20">
<CardContent className="h-full flex flex-col">
{/* Header with title and count */}
<div className="flex items-start justify-between mb-3">
@@ -62,7 +62,7 @@ const GraphMain = () => {
showIcons={true}
onGraphRef={handleGraphRef}
allowLasso
minimap={settings.general.showMinimap.value}
minimap={Boolean(settings?.general?.showMinimap?.value)}
/>
{menu && <ContextMenu onClick={handleBackgroundClick} {...menu} />}
</div>
@@ -55,7 +55,7 @@ const NodeRenderer = memo(
onClick={handleClick}
>
<div className="grow truncate text-ellipsis">{node?.data?.label}</div>
<TypeBadge type={node?.data?.type} />
<TypeBadge className="ml-1" type={node?.data?.type} />
</button>
</div>
)
@@ -64,7 +64,7 @@ const TreeNode = ({
className={cn(
"flex items-center group gap-2 px-3 py-2 hover:bg-muted/50 transition-colors",
isActive && "bg-muted",
level > 0 && "ml-4",
level > 0 && "pl-4",
!isClickable && "cursor-default"
)}
style={{ paddingLeft: `${12 + (level * 16)}px` }}
@@ -238,7 +238,7 @@ function InvestigationPage() {
{investigation.sketches?.slice(0, 8).map((sketch: any) => (
<Card
key={sketch.id}
className="group py-2 relative overflow-hidden cursor-pointer border-2 border-border hover:border-primary bg-primary/10"
className="group py-2 relative overflow-hidden cursor-pointer border border-border hover:border-primary"
onClick={() => navigate({
to: "/dashboard/investigations/$investigationId/$type/$id",
params: {
@@ -306,7 +306,7 @@ function InvestigationPage() {
{investigation.analyses?.slice(0, 8).map((analysis: any) => (
<Card
key={analysis.id}
className="group py-2 relative overflow-hidden cursor-pointer hover:shadow-xl border-2 border-border hover:border-secondary bg-secondary/10"
className="group py-2 relative overflow-hidden cursor-pointer hover:shadow-xl border border-border hover:border-secondary"
onClick={() => navigate({
to: "/dashboard/investigations/$investigationId/$type/$id",
params: {
@@ -1,5 +1,6 @@
import FloatingChat from '@/components/chat/floating-chat'
import RootLayout from '@/components/layout/root.layout'
import { useGraphSettingsStore } from '@/stores/graph-settings-store'
import { createFileRoute, Outlet } from '@tanstack/react-router'
export const Route = createFileRoute('/_auth/dashboard')({
@@ -7,10 +8,11 @@ export const Route = createFileRoute('/_auth/dashboard')({
})
function DashboardPage() {
const settings = useGraphSettingsStore(s => s.settings)
return (
<RootLayout>
<Outlet />
<FloatingChat />
{Boolean(settings.general.showFlow.value) && <FloatingChat />}
</RootLayout>
)
}
@@ -7,6 +7,11 @@ const DEFAULT_SETTINGS = {
},
general: {
showFlow: {
type: "boolean",
value: true,
description: "Display Flo, your AI assistant."
},
showMinimap: {
type: "boolean",
value: true,
+3 -3
View File
@@ -414,7 +414,7 @@ html {
--font-sans: Inter, sans-serif;
--font-serif: Source Serif 4, serif;
--font-mono: JetBrains Mono, monospace;
--radius: 0.375rem;
--radius: 0.280rem;
--shadow-2xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05);
--shadow-xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05);
--shadow-sm: 0px 4px 8px -1px hsl(0 0% 0% / 0.10), 0px 1px 2px -2px hsl(0 0% 0% / 0.10);
@@ -996,7 +996,7 @@ pre {
--font-sans: Geist Mono, ui-monospace, monospace;
--font-serif: serif;
--font-mono: JetBrains Mono, monospace;
--radius: 0.75rem;
--radius: 0.280rem;
--shadow-2xs: 0px 1px 4px 0px hsl(0 0% 0% / 0.03);
--shadow-xs: 0px 1px 4px 0px hsl(0 0% 0% / 0.03);
--shadow-sm: 0px 1px 4px 0px hsl(0 0% 0% / 0.05), 0px 1px 2px -1px hsl(0 0% 0% / 0.05);
@@ -1045,7 +1045,7 @@ pre {
--font-sans: Geist Mono, ui-monospace, monospace;
--font-serif: serif;
--font-mono: JetBrains Mono, monospace;
--radius: 0.75rem;
--radius: 0.280rem;
--shadow-2xs: 0px 1px 4px 0px hsl(0 0% 0% / 0.03);
--shadow-xs: 0px 1px 4px 0px hsl(0 0% 0% / 0.03);
--shadow-sm: 0px 1px 4px 0px hsl(0 0% 0% / 0.05), 0px 1px 2px -1px hsl(0 0% 0% / 0.05);