@@ -15,22 +15,31 @@ import {
15
15
Box ,
16
16
CloseButton ,
17
17
FocusTrap ,
18
+ Stack ,
19
+ Paper ,
18
20
} from "@mantine/core" ;
19
21
import 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" ;
21
30
import useConfig from "../../../store/useConfig" ;
22
31
23
32
export const UpgradeContent = ( props : FlexProps ) => {
24
33
const darkmodeEnabled = useConfig ( state => state . darkmodeEnabled ) ;
25
34
26
35
return (
27
36
< 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 ">
29
38
< List
30
39
center
31
40
c = "bright"
32
41
fz = "lg"
33
- spacing = "xs "
42
+ spacing = "4 "
34
43
icon = {
35
44
< ThemeIcon color = "green" variant = "transparent" >
36
45
< LuCheck size = "18" />
@@ -45,7 +54,7 @@ export const UpgradeContent = (props: FlexProps) => {
45
54
center
46
55
c = "bright"
47
56
fz = "lg"
48
- spacing = "xs "
57
+ spacing = "4 "
49
58
icon = {
50
59
< ThemeIcon color = "green" variant = "transparent" >
51
60
< LuCheck size = "18" />
@@ -71,7 +80,6 @@ export const UpgradeContent = (props: FlexProps) => {
71
80
< Image
72
81
src = { `/assets/diagram-${ darkmodeEnabled ? "dark" : "light" } .png` }
73
82
alt = "diagram"
74
- mah = "120"
75
83
fit = "cover"
76
84
mx = "auto"
77
85
width = "auto"
@@ -86,6 +94,26 @@ export const UpgradeContent = (props: FlexProps) => {
86
94
) ;
87
95
} ;
88
96
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
+
89
117
export const UpgradeModal = ( { opened, onClose } : ModalProps ) => {
90
118
const handleCloseModal = ( ) => {
91
119
Cookie . set ( "upgrade_shown" , "true" , { expires : 3 } ) ;
@@ -94,46 +122,74 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => {
94
122
95
123
return (
96
124
< Modal
97
- size = "lg "
125
+ size = "xl "
98
126
opened = { opened }
99
127
onClose = { handleCloseModal }
100
128
zIndex = { 1001 }
101
129
centered
102
130
radius = "md"
103
131
overlayProps = { { blur : 2 } }
104
132
withCloseButton = { false }
105
- closeOnClickOutside = { false }
106
133
>
107
134
< 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 >
121
192
</ 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 >
137
193
</ Modal >
138
194
) ;
139
195
} ;
0 commit comments