mirror of
https://github.com/reconurge/flowsint.git
synced 2026-03-11 17:34:31 -05:00
feat(app): renaming
This commit is contained in:
@@ -9,6 +9,7 @@ import { Pencil, PlusIcon } from 'lucide-react'
|
||||
import { Button } from '../ui/button'
|
||||
import NewFlow from './new-flow'
|
||||
import ErrorState from '../shared/error-state'
|
||||
import { Flow } from '@/types'
|
||||
|
||||
const FlowsList = () => {
|
||||
const {
|
||||
@@ -27,7 +28,7 @@ const FlowsList = () => {
|
||||
if (!searchQuery.trim()) return flows
|
||||
|
||||
const query = searchQuery.toLowerCase().trim()
|
||||
return flows.filter((flow) => {
|
||||
return flows.filter((flow: Flow) => {
|
||||
const matchesName = flow.name?.toLowerCase().includes(query)
|
||||
const matchesCategory = flow.category
|
||||
? Array.isArray(flow.category)
|
||||
|
||||
@@ -6,13 +6,13 @@ import { useLayoutStore } from '@/stores/layout-store'
|
||||
import { useParams } from '@tanstack/react-router'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
const TransformNavigation = () => {
|
||||
const FlowNavigation = () => {
|
||||
const { flowId } = useParams({ strict: false })
|
||||
const activeTransformTab = useLayoutStore((s) => s.activeTransformTab)
|
||||
const setActiveTransformTab = useLayoutStore((s) => s.setActiveTransformTab)
|
||||
|
||||
useEffect(() => {
|
||||
setActiveTransformTab(flowId ? 'items' : 'transforms')
|
||||
setActiveTransformTab(flowId ? 'items' : 'flows')
|
||||
}, [setActiveTransformTab, flowId])
|
||||
|
||||
return (
|
||||
@@ -20,12 +20,12 @@ const TransformNavigation = () => {
|
||||
<Tabs
|
||||
value={activeTransformTab}
|
||||
onValueChange={setActiveTransformTab}
|
||||
defaultValue="transforms"
|
||||
defaultValue="flows"
|
||||
className="w-full h-full flex flex-col gap-0 min-h-0"
|
||||
>
|
||||
<TabsList className="w-full p-0 rounded-none my-0 border-b flex-shrink-0">
|
||||
<TabsTrigger value="transforms">
|
||||
<Users className="h-3 w-3 opacity-60" /> Transforms
|
||||
<TabsTrigger value="flows">
|
||||
<Users className="h-3 w-3 opacity-60" /> Flows
|
||||
</TabsTrigger>
|
||||
{flowId && (
|
||||
<TabsTrigger value="items">
|
||||
@@ -34,7 +34,7 @@ const TransformNavigation = () => {
|
||||
)}
|
||||
</TabsList>
|
||||
<TabsContent
|
||||
value="transforms"
|
||||
value="flows"
|
||||
className="my-0 w-full flex-1 flex flex-col min-h-0 overflow-hidden"
|
||||
>
|
||||
<TransformsList />
|
||||
@@ -52,4 +52,4 @@ const TransformNavigation = () => {
|
||||
)
|
||||
}
|
||||
|
||||
export default TransformNavigation
|
||||
export default FlowNavigation
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useLocation, useParams } from '@tanstack/react-router'
|
||||
import InvestigationList from '../investigations/investigation-list'
|
||||
import GraphNavigation from '../graphs/graph-navigation'
|
||||
import TransformNavigation from '../flows/flow-navigation'
|
||||
import FlowNavigation from '../flows/flow-navigation'
|
||||
import SketchList from '../investigations/sketch-list'
|
||||
import AnalysesList from '../analyses/analyses-list'
|
||||
import { memo } from 'react'
|
||||
@@ -43,7 +43,7 @@ const SecondaryNavigation = memo(() => {
|
||||
if (pathname.startsWith('/dashboard/flows')) {
|
||||
return (
|
||||
<div className="grow w-full h-full overflow-x-hidden">
|
||||
<TransformNavigation />
|
||||
<FlowNavigation />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ interface LayoutStore {
|
||||
activeTab: string
|
||||
activeTransformTab: string
|
||||
setActiveTab: (tab: 'entities' | 'items' | string) => void
|
||||
setActiveTransformTab: (tab: 'transforms' | 'items' | string) => void
|
||||
setActiveTransformTab: (tab: 'flows' | 'items' | string) => void
|
||||
}
|
||||
|
||||
export const useLayoutStore = create<LayoutStore>()(
|
||||
@@ -39,7 +39,7 @@ export const useLayoutStore = create<LayoutStore>()(
|
||||
chatWidth: 500,
|
||||
chatHeight: 600,
|
||||
activeTab: 'entities',
|
||||
activeTransformTab: 'transforms',
|
||||
activeTransformTab: 'flows',
|
||||
openConsole: () => set(() => ({ isOpenConsole: true })),
|
||||
toggleConsole: () => set((state) => ({ isOpenConsole: !state.isOpenConsole })),
|
||||
togglePanel: () => set((state) => ({ isOpenPanel: !state.isOpenPanel })),
|
||||
|
||||
Reference in New Issue
Block a user