payment-kit 1.18.6 → 1.18.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/api/src/libs/auth.ts +1 -1
  2. package/api/src/routes/connect/change-payment.ts +47 -22
  3. package/api/src/routes/connect/change-plan.ts +45 -20
  4. package/api/src/routes/connect/setup.ts +46 -21
  5. package/api/src/routes/connect/subscribe.ts +40 -21
  6. package/api/src/routes/payment-links.ts +1 -1
  7. package/blocklet.yml +1 -1
  8. package/package.json +19 -19
  9. package/src/components/filter-toolbar.tsx +10 -10
  10. package/src/components/layout/admin.tsx +1 -0
  11. package/src/components/payment-link/product-select.tsx +1 -1
  12. package/src/components/price/currency-select.tsx +3 -1
  13. package/src/components/price/form.tsx +1 -1
  14. package/src/components/section/header.tsx +1 -1
  15. package/src/components/subscription/list.tsx +1 -0
  16. package/src/components/uploader.tsx +1 -0
  17. package/src/global.css +4 -4
  18. package/src/libs/util.ts +13 -0
  19. package/src/pages/admin/developers/webhooks/detail.tsx +1 -1
  20. package/src/pages/admin/overview.tsx +3 -3
  21. package/src/pages/admin/payments/intents/detail.tsx +1 -1
  22. package/src/pages/admin/payments/payouts/detail.tsx +1 -1
  23. package/src/pages/admin/payments/refunds/detail.tsx +1 -1
  24. package/src/pages/admin/products/products/detail.tsx +1 -1
  25. package/src/pages/customer/payout/detail.tsx +1 -1
  26. package/src/pages/customer/recharge.tsx +35 -6
  27. package/src/pages/customer/subscription/change-payment.tsx +8 -2
  28. package/src/pages/customer/subscription/change-plan.tsx +1 -1
  29. package/src/pages/integrations/donations/index.tsx +1 -1
  30. package/src/pages/integrations/donations/preview.tsx +73 -52
  31. package/src/pages/integrations/overview.tsx +63 -40
@@ -1,25 +1,32 @@
1
1
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
2
- import { Box, Card, CardActionArea, CardContent, Grid, Typography, Divider } from '@mui/material';
2
+ import { Box, Grid, Typography, Divider } from '@mui/material';
3
3
  import { useNavigate } from 'react-router-dom';
4
- import { Favorite, Inventory, Link as LinkIcon, TableChart, Payment, Code } from '@mui/icons-material';
4
+ import {
5
+ Link as LinkIcon,
6
+ Payment,
7
+ Code,
8
+ Inventory2Outlined,
9
+ TableChartOutlined,
10
+ FavoriteBorderOutlined,
11
+ } from '@mui/icons-material';
5
12
 
6
13
  const basicFeatures = [
7
14
  {
8
15
  title: 'integrations.features.products.title',
9
16
  description: 'integrations.features.products.intro',
10
- icon: <Inventory color="primary" sx={{ fontSize: 40 }} />,
17
+ icon: <Inventory2Outlined sx={{ fontSize: 32, color: 'text.lighter' }} />,
11
18
  path: '/admin/products',
12
19
  },
13
20
  {
14
21
  title: 'integrations.features.paymentLinks.title',
15
22
  description: 'integrations.features.paymentLinks.intro',
16
- icon: <LinkIcon color="primary" sx={{ fontSize: 40 }} />,
23
+ icon: <LinkIcon sx={{ fontSize: 32, color: 'text.lighter' }} />,
17
24
  path: '/admin/products/links',
18
25
  },
19
26
  {
20
27
  title: 'integrations.features.pricingTables.title',
21
28
  description: 'integrations.features.pricingTables.intro',
22
- icon: <TableChart color="primary" sx={{ fontSize: 40 }} />,
29
+ icon: <TableChartOutlined sx={{ fontSize: 32, color: 'text.lighter' }} />,
23
30
  path: '/admin/products/pricing-tables',
24
31
  },
25
32
  ];
@@ -28,20 +35,20 @@ const advancedFeatures = [
28
35
  {
29
36
  title: 'integrations.features.donate.title',
30
37
  description: 'integrations.features.donate.intro',
31
- icon: <Favorite color="primary" sx={{ fontSize: 40 }} />,
38
+ icon: <FavoriteBorderOutlined sx={{ fontSize: 32, color: 'text.lighter' }} />,
32
39
  path: '/integrations/donations',
33
40
  },
34
41
  {
35
42
  title: 'integrations.features.paymentMethods.title',
36
43
  description: 'integrations.features.paymentMethods.intro',
37
- icon: <Payment color="primary" sx={{ fontSize: 40 }} />,
44
+ icon: <Payment sx={{ fontSize: 32, color: 'text.lighter' }} />,
38
45
  path: '/admin/settings/payment-methods',
39
46
  },
40
47
  {
41
48
  title: 'integrations.features.api.title',
42
49
  description: 'integrations.features.api.intro',
43
- icon: <Code color="primary" sx={{ fontSize: 40 }} />,
44
- path: 'https://www.npmjs.com/package/@blocklet/payment-js',
50
+ icon: <Code sx={{ fontSize: 32, color: 'text.lighter' }} />,
51
+ path: 'https://www.arcblock.io/docs/arcblock-payment-kit/en/start-payment-js',
45
52
  external: true,
46
53
  },
47
54
  ];
@@ -61,7 +68,7 @@ export default function Overview() {
61
68
  return (
62
69
  <Box>
63
70
  <Box mb={4}>
64
- <Typography variant="h2" gutterBottom fontWeight="bold" mb={2}>
71
+ <Typography variant="h2" gutterBottom fontWeight="bold" mb={1}>
65
72
  {t('common.welcome')}
66
73
  </Typography>
67
74
  <Typography variant="body1" color="text.secondary" mb={2}>
@@ -69,50 +76,66 @@ export default function Overview() {
69
76
  </Typography>
70
77
  </Box>
71
78
 
72
- <Typography variant="h5" gutterBottom>
79
+ <Typography variant="h3" gutterBottom mb={2}>
73
80
  {t('integrations.basicFeatures')} 🚀
74
81
  </Typography>
75
- <Grid container spacing={3} mb={4}>
82
+ <Grid container spacing={2} mb={4} sx={{ maxWidth: 1200 }}>
76
83
  {basicFeatures.map((item) => (
77
84
  <Grid item xs={12} sm={6} md={4} key={item.path}>
78
- <Card sx={{ height: '100%' }}>
79
- <CardActionArea onClick={() => handleClick(item)} sx={{ height: '100%' }}>
80
- <CardContent>
81
- <Box display="flex" alignItems="center" gap={2} mb={2}>
82
- {item.icon}
83
- <Typography variant="h6">{t(item.title)}</Typography>
84
- </Box>
85
- <Typography variant="body2" color="text.secondary">
86
- {t(item.description)}
87
- </Typography>
88
- </CardContent>
89
- </CardActionArea>
90
- </Card>
85
+ <Box
86
+ className="base-card"
87
+ onClick={() => handleClick(item)}
88
+ sx={{
89
+ height: '100%',
90
+ cursor: 'pointer',
91
+ '&:hover': {
92
+ boxShadow:
93
+ '0px 0px 0px 1px var(--shadows-card-hover-1, rgba(2, 7, 19, 0.08)), 0px 1px 2px -1px var(--shadows-card-hover-2, rgba(2, 7, 19, 0.08)), 0px 2px 8px 0px var(--shadows-card-hover-3, rgba(2, 7, 19, 0.10))',
94
+ },
95
+ }}>
96
+ <Box mb={1}>
97
+ {item.icon}
98
+ <Typography variant="h4" mt={1.5}>
99
+ {t(item.title)}
100
+ </Typography>
101
+ </Box>
102
+ <Typography variant="body2" color="text.secondary">
103
+ {t(item.description)}
104
+ </Typography>
105
+ </Box>
91
106
  </Grid>
92
107
  ))}
93
108
  </Grid>
94
109
 
95
110
  <Divider sx={{ my: 4 }} />
96
111
 
97
- <Typography variant="h5" gutterBottom>
112
+ <Typography variant="h3" gutterBottom mb={2}>
98
113
  {t('integrations.advancedFeatures')} 🔥
99
114
  </Typography>
100
- <Grid container spacing={3}>
115
+ <Grid container spacing={2} sx={{ maxWidth: 1200 }}>
101
116
  {advancedFeatures.map((item) => (
102
117
  <Grid item xs={12} sm={6} md={4} key={item.path}>
103
- <Card sx={{ height: '100%' }}>
104
- <CardActionArea onClick={() => handleClick(item)} sx={{ height: '100%' }}>
105
- <CardContent>
106
- <Box display="flex" alignItems="center" gap={2} mb={2}>
107
- {item.icon}
108
- <Typography variant="h6">{t(item.title)}</Typography>
109
- </Box>
110
- <Typography variant="body2" color="text.secondary">
111
- {t(item.description)}
112
- </Typography>
113
- </CardContent>
114
- </CardActionArea>
115
- </Card>
118
+ <Box
119
+ className="base-card"
120
+ onClick={() => handleClick(item)}
121
+ sx={{
122
+ height: '100%',
123
+ cursor: 'pointer',
124
+ '&:hover': {
125
+ boxShadow:
126
+ '0px 0px 0px 1px var(--shadows-card-hover-1, rgba(2, 7, 19, 0.08)), 0px 1px 2px -1px var(--shadows-card-hover-2, rgba(2, 7, 19, 0.08)), 0px 2px 8px 0px var(--shadows-card-hover-3, rgba(2, 7, 19, 0.10))',
127
+ },
128
+ }}>
129
+ <Box mb={1}>
130
+ {item.icon}
131
+ <Typography variant="h6" mt={1.5}>
132
+ {t(item.title)}
133
+ </Typography>
134
+ </Box>
135
+ <Typography variant="body2" color="text.secondary">
136
+ {t(item.description)}
137
+ </Typography>
138
+ </Box>
116
139
  </Grid>
117
140
  ))}
118
141
  </Grid>