From f7c3ba1976bfe248a3c19b7b2c6146968e28142a Mon Sep 17 00:00:00 2001 From: AykutSarac Date: Fri, 26 Apr 2024 23:26:49 +0300 Subject: [PATCH] feat: ui updates --- src/containers/Modals/LoginModal/index.tsx | 3 +-- src/containers/Modals/NodeModal/index.tsx | 13 +++++++++++-- src/containers/Modals/PremiumModal/index.tsx | 6 +++--- src/containers/Toolbar/ToolsMenu.tsx | 11 ++++++++++- src/containers/Views/GraphView/index.tsx | 4 +++- src/pages/pricing.tsx | 6 +++--- 6 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/containers/Modals/LoginModal/index.tsx b/src/containers/Modals/LoginModal/index.tsx index edebe0a..7f1f3a8 100644 --- a/src/containers/Modals/LoginModal/index.tsx +++ b/src/containers/Modals/LoginModal/index.tsx @@ -1,11 +1,10 @@ import React from "react"; -import { Modal, Stack, Button, Text, Title, ModalProps } from "@mantine/core"; +import { Modal, Stack, Button, Text, ModalProps } from "@mantine/core"; export const LoginModal: React.FC = ({ opened, onClose }) => { return ( - Welcome Back! Login to unlock full potential of JSON Crack! - Node Path + JSON Path = ({ opened, onClose }) => { return ( - + Free plan @@ -62,10 +62,10 @@ export const PremiumModal: React.FC = ({ opened, onClose }) => { } > - 5X Faster visualizations, no freezing + 5X Faster visualizations, no lagging Accurate and compact graphs Edit data through visualizations - Bigger data support + Visualize data up to 5 MBs Compare data on graphs Save & share up to 200 files diff --git a/src/containers/Toolbar/ToolsMenu.tsx b/src/containers/Toolbar/ToolsMenu.tsx index 2bc0e40..bcd7cac 100644 --- a/src/containers/Toolbar/ToolsMenu.tsx +++ b/src/containers/Toolbar/ToolsMenu.tsx @@ -1,8 +1,9 @@ import React from "react"; import { Menu, Flex } from "@mantine/core"; import { CgChevronDown } from "react-icons/cg"; +import { MdCompare } from "react-icons/md"; import { SiJsonwebtokens } from "react-icons/si"; -import { VscSearchFuzzy, VscJson, VscGroupByRefType } from "react-icons/vsc"; +import { VscSearchFuzzy, VscJson, VscGroupByRefType, VscLock } from "react-icons/vsc"; import { gaEvent } from "src/lib/utils/gaEvent"; import useModal from "src/store/useModal"; import * as Styles from "./styles"; @@ -20,6 +21,14 @@ export const ToolsMenu = () => { + } + rightSection={} + onClick={() => setVisible("premium")(true)} + > + Compare Data + } onClick={() => setVisible("jq")(true)}> JSON Query (jq) diff --git a/src/containers/Views/GraphView/index.tsx b/src/containers/Views/GraphView/index.tsx index 976b820..4ba5471 100644 --- a/src/containers/Views/GraphView/index.tsx +++ b/src/containers/Views/GraphView/index.tsx @@ -138,10 +138,12 @@ const GraphCanvas = ({ isWidget }: GraphProps) => { ); }; +const SUPPORTED_LIMIT = 600; + export const Graph = ({ isWidget = false }: GraphProps) => { const setViewPort = useGraph(state => state.setViewPort); const viewPort = useGraph(state => state.viewPort); - const aboveSupportedLimit = useGraph(state => state.nodes.length > 800); + const aboveSupportedLimit = useGraph(state => state.nodes.length > SUPPORTED_LIMIT); const loading = useGraph(state => state.loading); const gesturesEnabled = useConfig(state => state.gesturesEnabled); const rulersEnabled = useConfig(state => state.rulersEnabled); diff --git a/src/pages/pricing.tsx b/src/pages/pricing.tsx index d12f68c..a7d147f 100644 --- a/src/pages/pricing.tsx +++ b/src/pages/pricing.tsx @@ -60,7 +60,7 @@ export const PricingCards = () => { size="md" data={["Monthly", "Yearly"]} w={200} - radius="lg" + radius="xl" /> @@ -140,8 +140,8 @@ export const PricingCards = () => { - - Premium + + Popular