Skip to content

Commit 6163301

Browse files
committed
feat: default json
1 parent 8e670cb commit 6163301

File tree

3 files changed

+41
-45
lines changed

3 files changed

+41
-45
lines changed

src/features/editor/Toolbar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ export const Toolbar = ({ isWidget = false }: ToolbarProps) => {
8484
{!isWidget && (
8585
<Button
8686
variant="gradient"
87-
gradient={{ from: "teal", to: "blue", deg: 45 }}
87+
gradient={{ from: "purple", to: "violet", deg: 45 }}
8888
autoContrast
8989
size="compact-sm"
9090
fz="12"
9191
fw="600"
9292
onClick={() => setVisible("UpgradeModal", true)}
9393
>
94-
JSON Crack v2.0 🔥
94+
🔥 JSON Crack v2.0
9595
</Button>
9696
)}
9797
{!isWidget && (

src/features/modals/UpgradeModal/index.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,36 @@ export const UpgradeContent = (props: FlexProps) => {
2424

2525
return (
2626
<Flex direction="column" gap="0" {...props}>
27-
<Flex gap="xl">
27+
<Flex gap="sm">
2828
<List
29+
center
2930
icon={
3031
<ThemeIcon color="green" variant="transparent">
3132
<LuCheck />
3233
</ThemeIcon>
3334
}
3435
>
3536
<List.Item>Load larger datasets (100x more)</List.Item>
36-
<List.Item>See parent-child relationships</List.Item>
3737
<List.Item>Modify data from diagrams</List.Item>
38+
<List.Item>Clean and fast layout</List.Item>
3839
</List>
3940
<List
41+
center
4042
icon={
4143
<ThemeIcon color="green" variant="transparent">
4244
<LuCheck />
4345
</ThemeIcon>
4446
}
4547
>
46-
<List.Item>Customization options</List.Item>
47-
<List.Item>Improved UI & Tools</List.Item>
48+
<List.Item>Customize colors</List.Item>
49+
<List.Item>Improved UI & More tools</List.Item>
4850
<List.Item>
4951
<Anchor
5052
href="https://chromewebstore.google.com/detail/todiagram/gpcnkpjdmgihedngamkhendifclghjhn"
5153
rel="noopener"
5254
target="_blank"
5355
inherit
56+
c="teal"
5457
>
5558
Chrome Extension
5659
</Anchor>
@@ -97,7 +100,7 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => {
97100
<Flex align="center" gap="4">
98101
<Logo />
99102
<Text fz="lg" fw="600">
100-
Upgrade to New Editor
103+
JSON Crack 2.0 - Professional Edition
101104
</Text>
102105
</Flex>
103106
}
@@ -112,8 +115,8 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => {
112115
rel="noopener"
113116
target="_blank"
114117
>
115-
<Button onClick={handleCloseModal} color="gray" variant="outline">
116-
Open Editor &rarr;
118+
<Button onClick={handleCloseModal} color="teal">
119+
Try Now &rarr;
117120
</Button>
118121
</Link>
119122
</Group>

src/store/useFile.ts

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,46 +9,39 @@ import { contentToJson, jsonToContent } from "../lib/utils/jsonAdapter";
99
import useConfig from "./useConfig";
1010
import useJson from "./useJson";
1111

12-
const defaultJson = JSON.stringify(
13-
{
14-
orderId: "A12345",
15-
customer: {
16-
name: "Jane Doe",
17-
18-
address: {
19-
street: "123 Main St",
20-
city: "New York",
21-
state: "NY",
22-
zipCode: "10001",
12+
const defaultJson = JSON.stringify({
13+
fruits: [
14+
{
15+
name: "Apple",
16+
color: "Red",
17+
nutrients: {
18+
calories: 52,
19+
fiber: "2.4g",
20+
vitaminC: "4.6mg",
2321
},
24-
isMember: true,
2522
},
26-
products: [
27-
{
28-
productId: "P001",
29-
name: "Wireless Mouse",
30-
quantity: 2,
31-
price: 25.5,
32-
image: "https://example.com/wireless-mouse.jpg",
33-
color: "#3498db",
23+
{
24+
name: "Banana",
25+
color: "Yellow",
26+
nutrients: {
27+
calories: 89,
28+
fiber: "2.6g",
29+
potassium: "358mg",
3430
},
35-
{
36-
productId: "P002",
37-
name: "Keyboard",
38-
quantity: 1,
39-
price: 45,
40-
image: "https://example.com/keyboard.jpg",
41-
color: "#2ecc71",
31+
},
32+
{
33+
name: "Orange",
34+
color: "Orange",
35+
nutrients: {
36+
calories: 47,
37+
fiber: "2.4g",
38+
vitaminC: "53.2mg",
4239
},
43-
],
44-
orderDate: "2025-01-02T10:15:30Z",
45-
status: "Processing",
46-
isPaid: false,
47-
totalAmount: 96,
48-
},
49-
null,
50-
2
51-
);
40+
},
41+
null,
42+
2,
43+
],
44+
});
5245

5346
type SetContents = {
5447
contents?: string;

0 commit comments

Comments
 (0)