@@ -15,22 +15,31 @@ import {
1515 Box ,
1616 CloseButton ,
1717 FocusTrap ,
18+ Stack ,
19+ Paper ,
1820} from "@mantine/core" ;
1921import Cookie from "js-cookie" ;
20- import { LuCheck , LuZap } from "react-icons/lu" ;
22+ import { GoDependabot } from "react-icons/go" ;
23+ import {
24+ LuCheck ,
25+ LuChevronRight ,
26+ LuGitCompareArrows ,
27+ LuInfinity ,
28+ LuPencilRuler ,
29+ } from "react-icons/lu" ;
2130import useConfig from "../../../store/useConfig" ;
2231
2332export const UpgradeContent = ( props : FlexProps ) => {
2433 const darkmodeEnabled = useConfig ( state => state . darkmodeEnabled ) ;
2534
2635 return (
2736 < Flex direction = "column" gap = "0" { ...props } >
28- < Flex justify = "center " gap = "60 " px = "sm" >
37+ < Flex justify = "space-between " gap = "4 " px = "sm" wrap = "wrap ">
2938 < List
3039 center
3140 c = "bright"
3241 fz = "lg"
33- spacing = "xs "
42+ spacing = "4 "
3443 icon = {
3544 < ThemeIcon color = "green" variant = "transparent" >
3645 < LuCheck size = "18" />
@@ -45,7 +54,7 @@ export const UpgradeContent = (props: FlexProps) => {
4554 center
4655 c = "bright"
4756 fz = "lg"
48- spacing = "xs "
57+ spacing = "4 "
4958 icon = {
5059 < ThemeIcon color = "green" variant = "transparent" >
5160 < LuCheck size = "18" />
@@ -71,7 +80,6 @@ export const UpgradeContent = (props: FlexProps) => {
7180 < Image
7281 src = { `/assets/diagram-${ darkmodeEnabled ? "dark" : "light" } .png` }
7382 alt = "diagram"
74- mah = "120"
7583 fit = "cover"
7684 mx = "auto"
7785 width = "auto"
@@ -86,6 +94,26 @@ export const UpgradeContent = (props: FlexProps) => {
8694 ) ;
8795} ;
8896
97+ const FeatureCard = ( props : { title : string ; description : string ; icon : React . ReactNode } ) => {
98+ return (
99+ < Paper withBorder p = "xs" radius = "md" >
100+ < Flex gap = "md" align = "flex-start" >
101+ < ThemeIcon variant = "light" color = "teal" radius = "xl" size = "36" >
102+ { props . icon }
103+ </ ThemeIcon >
104+ < Stack gap = "4" >
105+ < Text fz = "md" fw = "600" c = "bright" >
106+ { props . title }
107+ </ Text >
108+ < Text fz = "sm" c = "gray" opacity = { 0.8 } >
109+ { props . description }
110+ </ Text >
111+ </ Stack >
112+ </ Flex >
113+ </ Paper >
114+ ) ;
115+ } ;
116+
89117export const UpgradeModal = ( { opened, onClose } : ModalProps ) => {
90118 const handleCloseModal = ( ) => {
91119 Cookie . set ( "upgrade_shown" , "true" , { expires : 3 } ) ;
@@ -94,46 +122,74 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => {
94122
95123 return (
96124 < Modal
97- size = "lg "
125+ size = "xl "
98126 opened = { opened }
99127 onClose = { handleCloseModal }
100128 zIndex = { 1001 }
101129 centered
102130 radius = "md"
103131 overlayProps = { { blur : 2 } }
104132 withCloseButton = { false }
105- closeOnClickOutside = { false }
106133 >
107134 < FocusTrap . InitialFocus />
108- < Flex justify = "center" align = "center" gap = "xs" >
109- < Image
110- ml = "auto"
111- pl = "28"
112- src = "https://todiagram.com/logo-64x64.png"
113- alt = "todiagram"
114- width = { 30 }
115- height = { 30 }
116- />
117- < Text fz = "24" fw = "600" c = "bright" >
118- Try JSON Crack 2.0
119- </ Text >
120- < CloseButton ml = "auto" onClick = { handleCloseModal } />
135+ < Flex >
136+ < Stack >
137+ < FeatureCard
138+ title = "No File Size Limits"
139+ description = "Load and edit even the largest data files without restrictions."
140+ icon = { < LuInfinity size = { 20 } /> }
141+ />
142+ < FeatureCard
143+ title = "Visual Data Editing"
144+ description = "Edit JSON, YAML, CSV, and XML directly on the diagram."
145+ icon = { < LuPencilRuler size = { 20 } /> }
146+ />
147+ < FeatureCard
148+ title = "Live JSON Schema Validation"
149+ description = "Instantly see invalid fields highlighted in red on the diagram."
150+ icon = { < LuGitCompareArrows size = { 20 } /> }
151+ />
152+ < FeatureCard
153+ title = "AI Assistant"
154+ description = "Use AI to filter and transform data based on your needs."
155+ icon = { < GoDependabot size = { 20 } /> }
156+ />
157+ </ Stack >
158+ < Divider orientation = "vertical" mx = "md" />
159+ < Box >
160+ < Flex justify = "center" align = "center" gap = "xs" >
161+ < Image
162+ ml = "auto"
163+ pl = "28"
164+ src = "https://todiagram.com/logo-64x64.png"
165+ alt = "todiagram"
166+ width = { 30 }
167+ height = { 30 }
168+ />
169+ < Text fz = "24" fw = "600" c = "bright" >
170+ JSON Crack 2.0
171+ </ Text >
172+ < CloseButton ml = "auto" onClick = { handleCloseModal } />
173+ </ Flex >
174+ < UpgradeContent direction = "column-reverse" maw = "400" />
175+ < Group justify = "center" gap = "xs" mt = "md" >
176+ < Button
177+ component = { Link }
178+ href = "https://todiagram.com/editor?utm_source=jsoncrack& utm_medium = upgrade_modal "
179+ rel = "noopener"
180+ target = "_blank"
181+ fz = "lg"
182+ fw = "600"
183+ size = "md"
184+ rightSection = { < LuChevronRight /> }
185+ color = "green"
186+ fullWidth
187+ >
188+ Try now
189+ </ Button >
190+ </ Group >
191+ </ Box >
121192 </ Flex >
122- < UpgradeContent direction = "column-reverse" />
123- < Group justify = "center" gap = "lg" mt = "xl" >
124- < Button size = "md" onClick = { handleCloseModal } color = "gray" variant = "light" >
125- Maybe later
126- </ Button >
127- < Link
128- href = "https://todiagram.com/editor?utm_source=jsoncrack& utm_medium = upgrade_modal "
129- rel = "noopener"
130- target = "_blank"
131- >
132- < Button size = "md" onClick = { handleCloseModal } leftSection = { < LuZap /> } color = "teal" >
133- Try for free →
134- </ Button >
135- </ Link >
136- </ Group >
137193 </ Modal >
138194 ) ;
139195} ;
0 commit comments