diff --git a/README.md b/README.md index 4e8ca046..d0669c51 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,13 @@ [![Discord](https://img.shields.io/discord/1146782921294884966?style=flat-square)](https://discord.gg/6M4QwDXn2w) [![Workflow](https://github.com/FalkorDB/falkordb-browser/actions/workflows/nextjs.yml/badge.svg?branch=main)](https://github.com/FalkorDB/falkordb-browser/actions/workflows/nextjs.yml) +# FalkorDB-Browser + +[![Try Free](https://img.shields.io/badge/Try%20Free-FalkorDB%20Cloud-FF8101?labelColor=FDE900&style=for-the-badge&link=https://app.falkordb.cloud)](https://app.falkordb.cloud) + FalkorDB-Browser is a visualization UI for FalkorDB. -To see a running demo check: https://browser.falkordb.com/ +To see a running demo, check: https://browser.falkordb.com/ ![image](https://github.com/FalkorDB/falkordb-browser/assets/753206/51a81ef9-6bb2-40ce-ad9b-6381978c7562) diff --git a/app/api/graph/[graph]/route.ts b/app/api/graph/[graph]/route.ts index 8e95a132..48be8b2b 100644 --- a/app/api/graph/[graph]/route.ts +++ b/app/api/graph/[graph]/route.ts @@ -83,7 +83,6 @@ export async function PATCH(request: NextRequest, { params }: { params: { graph: if (!newName) throw (new Error("Missing parameter 'newName'")) const data = await client.connection.renameNX(graphId, newName); - console.log(data); if (!data) throw (new Error(`${newName} already exists`)) diff --git a/app/graph/DataPanel.tsx b/app/graph/DataPanel.tsx index 2b482fcb..3af69da7 100644 --- a/app/graph/DataPanel.tsx +++ b/app/graph/DataPanel.tsx @@ -1,4 +1,4 @@ -import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; +import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; interface Props { @@ -17,9 +17,10 @@ const excludedProperties = new Set([ // eslint-disable-next-line @typescript-eslint/no-explicit-any export default function DataPanel({ object }: Props) { const rowClass = "dark:hover:bg-slate-700 hover:bg-gray-400 border-y-[1px] border-y-gray-700" - + const type = object.source ? "edge" : "node" return ( + {type} properties Field @@ -38,10 +39,10 @@ export default function DataPanel({ object }: Props) { const text = cellIndex === 1 ? JSON.parse(strCell) : strCell return ( // eslint-disable-next-line react/no-array-index-key - + - + {text} diff --git a/app/graph/toolbar.tsx b/app/graph/toolbar.tsx index 07768fbf..def50ac7 100644 --- a/app/graph/toolbar.tsx +++ b/app/graph/toolbar.tsx @@ -1,4 +1,3 @@ -import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; import { CircleDot, ZoomIn, ZoomOut } from "lucide-react"; import { cn } from "@/lib/utils" @@ -22,39 +21,25 @@ export default function Toolbar({ chartRef, className = "" }: { } return ( - -
    -
  • - - handleZoomClick(1.1)}> - - - -

    Zoom In

    -
    -
    -
  • -
  • - - handleZoomClick(0.9)}> - - - -

    Zoom Out

    -
    -
    -
  • -
  • - - - - - -

    Center

    -
    -
    -
  • -
-
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
) } diff --git a/app/providers.tsx b/app/providers.tsx index 1d236b2f..cbc1e2ac 100644 --- a/app/providers.tsx +++ b/app/providers.tsx @@ -12,7 +12,7 @@ import useScreenSize from "./useScreenSize"; export default function NextAuthProvider({ children }: { children: React.ReactNode }) { const { screenSize } = useScreenSize(); - const isSmallScreen = screenSize === 'sm' || screenSize === 'xs' + const isSmallScreen = screenSize === 'sm' || screenSize === 'xs' || screenSize === 'md' const [isCollapsed, setCollapsed] = useState(isSmallScreen) const navPanel = useRef(null) @@ -35,8 +35,8 @@ export default function NextAuthProvider({ children }: { children: React.ReactNo } } } - const panelSize = 9 - const collapsedSize = 3 + const panelSize = isSmallScreen ? 7 : 9 + const collapsedSize = isSmallScreen ? 7 : 3 return ( @@ -51,7 +51,7 @@ export default function NextAuthProvider({ children }: { children: React.ReactNo minSize={panelSize} onCollapse={() => { setCollapsed(true) }} onExpand={() => { setCollapsed(false) }}> - diff --git a/components/custom/navbar.tsx b/components/custom/navbar.tsx index c1f98318..c16c6d1d 100644 --- a/components/custom/navbar.tsx +++ b/components/custom/navbar.tsx @@ -49,7 +49,7 @@ export default function Navbar({ collapsed }: { collapsed: boolean }) { const [mounted, setMounted] = useState(false) const pathName = usePathname() const darkmode = theme === "dark" || (theme === "system" && systemTheme === "dark") - + useEffect(() => { setMounted(true) }, []) @@ -62,6 +62,7 @@ export default function Navbar({ collapsed }: { collapsed: boolean }) { // eslint-disable-next-line react/no-array-index-key
  • @@ -81,7 +82,7 @@ export default function Navbar({ collapsed }: { collapsed: boolean }) {
  • { mounted && -