From ec92af80b26770daeeac2e3735c97c9a784ad971 Mon Sep 17 00:00:00 2001 From: dextmorgn Date: Thu, 4 Sep 2025 15:32:57 +0200 Subject: [PATCH] feat: setting to hide/show flo --- .../src/components/dashboard/investigation-cards.tsx | 2 +- .../src/renderer/src/components/graphs/graph-main.tsx | 2 +- .../src/renderer/src/components/graphs/nodes-panel.tsx | 2 +- .../src/components/investigations/investigation-list.tsx | 2 +- ...auth.dashboard.investigations.$investigationId.index.tsx | 4 ++-- flowsint-app/src/renderer/src/routes/_auth.dashboard.tsx | 4 +++- .../src/renderer/src/stores/graph-settings-store.ts | 5 +++++ flowsint-app/src/renderer/src/styles.css | 6 +++--- 8 files changed, 17 insertions(+), 10 deletions(-) diff --git a/flowsint-app/src/renderer/src/components/dashboard/investigation-cards.tsx b/flowsint-app/src/renderer/src/components/dashboard/investigation-cards.tsx index 00e1c4fb..32daa3bc 100644 --- a/flowsint-app/src/renderer/src/components/dashboard/investigation-cards.tsx +++ b/flowsint-app/src/renderer/src/components/dashboard/investigation-cards.tsx @@ -25,7 +25,7 @@ function InvestigationCard({ investigation }: InvestigationCardProps) { params={{ investigationId: investigation.id }} className="block" > - + {/* Header with title and count */}
diff --git a/flowsint-app/src/renderer/src/components/graphs/graph-main.tsx b/flowsint-app/src/renderer/src/components/graphs/graph-main.tsx index c4e68f4c..73d9cccb 100644 --- a/flowsint-app/src/renderer/src/components/graphs/graph-main.tsx +++ b/flowsint-app/src/renderer/src/components/graphs/graph-main.tsx @@ -62,7 +62,7 @@ const GraphMain = () => { showIcons={true} onGraphRef={handleGraphRef} allowLasso - minimap={settings.general.showMinimap.value} + minimap={Boolean(settings?.general?.showMinimap?.value)} /> {menu && }
diff --git a/flowsint-app/src/renderer/src/components/graphs/nodes-panel.tsx b/flowsint-app/src/renderer/src/components/graphs/nodes-panel.tsx index 425638e9..fdfa2311 100644 --- a/flowsint-app/src/renderer/src/components/graphs/nodes-panel.tsx +++ b/flowsint-app/src/renderer/src/components/graphs/nodes-panel.tsx @@ -55,7 +55,7 @@ const NodeRenderer = memo( onClick={handleClick} >
{node?.data?.label}
- + ) diff --git a/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx b/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx index d5f76110..ebf69a78 100644 --- a/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx +++ b/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx @@ -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` }} diff --git a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsx b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsx index 0b3ba383..95eb6c6b 100644 --- a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsx +++ b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsx @@ -238,7 +238,7 @@ function InvestigationPage() { {investigation.sketches?.slice(0, 8).map((sketch: any) => ( navigate({ to: "/dashboard/investigations/$investigationId/$type/$id", params: { @@ -306,7 +306,7 @@ function InvestigationPage() { {investigation.analyses?.slice(0, 8).map((analysis: any) => ( navigate({ to: "/dashboard/investigations/$investigationId/$type/$id", params: { diff --git a/flowsint-app/src/renderer/src/routes/_auth.dashboard.tsx b/flowsint-app/src/renderer/src/routes/_auth.dashboard.tsx index bce29382..76994cf5 100644 --- a/flowsint-app/src/renderer/src/routes/_auth.dashboard.tsx +++ b/flowsint-app/src/renderer/src/routes/_auth.dashboard.tsx @@ -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 ( - + {Boolean(settings.general.showFlow.value) && } ) } diff --git a/flowsint-app/src/renderer/src/stores/graph-settings-store.ts b/flowsint-app/src/renderer/src/stores/graph-settings-store.ts index dceca739..304a855f 100644 --- a/flowsint-app/src/renderer/src/stores/graph-settings-store.ts +++ b/flowsint-app/src/renderer/src/stores/graph-settings-store.ts @@ -7,6 +7,11 @@ const DEFAULT_SETTINGS = { }, general: { + showFlow: { + type: "boolean", + value: true, + description: "Display Flo, your AI assistant." + }, showMinimap: { type: "boolean", value: true, diff --git a/flowsint-app/src/renderer/src/styles.css b/flowsint-app/src/renderer/src/styles.css index 26805320..b70e04e5 100644 --- a/flowsint-app/src/renderer/src/styles.css +++ b/flowsint-app/src/renderer/src/styles.css @@ -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);