payment-kit 1.18.56 → 1.19.0
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.
- package/.eslintrc.js +6 -0
- package/blocklet.yml +1 -1
- package/package.json +57 -58
- package/src/components/actions.tsx +22 -9
- package/src/components/balance-list.tsx +40 -12
- package/src/components/collapse.tsx +22 -14
- package/src/components/copyable.tsx +8 -7
- package/src/components/currency.tsx +15 -7
- package/src/components/customer/actions.tsx +1 -5
- package/src/components/customer/form.tsx +3 -1
- package/src/components/customer/link.tsx +4 -12
- package/src/components/customer/notification-preference.tsx +18 -9
- package/src/components/customer/overdraft-protection.tsx +112 -41
- package/src/components/drawer-form.tsx +42 -18
- package/src/components/error.tsx +1 -5
- package/src/components/event/list.tsx +9 -10
- package/src/components/filter-toolbar.tsx +20 -19
- package/src/components/info-card.tsx +32 -18
- package/src/components/info-metric.tsx +16 -6
- package/src/components/info-row-group.tsx +1 -7
- package/src/components/info-row.tsx +30 -24
- package/src/components/invoice/action.tsx +1 -7
- package/src/components/invoice/list.tsx +15 -25
- package/src/components/invoice/recharge.tsx +5 -7
- package/src/components/invoice/table.tsx +17 -12
- package/src/components/layout/user.tsx +1 -1
- package/src/components/metadata/form.tsx +13 -13
- package/src/components/metadata/list.tsx +11 -3
- package/src/components/passport/actions.tsx +9 -4
- package/src/components/payment-currency/add.tsx +16 -3
- package/src/components/payment-currency/form.tsx +12 -6
- package/src/components/payment-intent/actions.tsx +24 -16
- package/src/components/payment-intent/list.tsx +11 -8
- package/src/components/payment-link/actions.tsx +1 -5
- package/src/components/payment-link/after-pay.tsx +4 -2
- package/src/components/payment-link/before-pay.tsx +14 -4
- package/src/components/payment-link/item.tsx +27 -6
- package/src/components/payment-link/preview.tsx +9 -9
- package/src/components/payment-link/product-select.tsx +17 -3
- package/src/components/payment-method/arcblock.tsx +6 -1
- package/src/components/payment-method/base.tsx +6 -1
- package/src/components/payment-method/bitcoin.tsx +6 -1
- package/src/components/payment-method/ethereum.tsx +6 -1
- package/src/components/payment-method/evm-rpc-input.tsx +11 -7
- package/src/components/payment-method/form.tsx +2 -7
- package/src/components/payouts/actions.tsx +1 -5
- package/src/components/payouts/list.tsx +11 -9
- package/src/components/payouts/portal/list.tsx +11 -9
- package/src/components/price/currency-select.tsx +28 -17
- package/src/components/price/form.tsx +135 -84
- package/src/components/price/upsell-select.tsx +10 -2
- package/src/components/price/upsell.tsx +7 -2
- package/src/components/pricing-table/actions.tsx +1 -5
- package/src/components/pricing-table/customer-settings.tsx +5 -1
- package/src/components/pricing-table/payment-settings.tsx +14 -4
- package/src/components/pricing-table/preview.tsx +9 -9
- package/src/components/pricing-table/price-item.tsx +6 -1
- package/src/components/pricing-table/product-item.tsx +6 -1
- package/src/components/pricing-table/product-settings.tsx +17 -4
- package/src/components/product/actions.tsx +1 -5
- package/src/components/product/create.tsx +1 -5
- package/src/components/product/cross-sell-select.tsx +5 -1
- package/src/components/product/cross-sell.tsx +7 -2
- package/src/components/product/features.tsx +13 -3
- package/src/components/product/form.tsx +38 -10
- package/src/components/progress-bar.tsx +1 -1
- package/src/components/refund/actions.tsx +1 -7
- package/src/components/refund/list.tsx +12 -17
- package/src/components/section/header.tsx +23 -12
- package/src/components/subscription/actions/cancel.tsx +22 -5
- package/src/components/subscription/actions/index.tsx +9 -10
- package/src/components/subscription/actions/pause.tsx +32 -6
- package/src/components/subscription/actions/slash-stake.tsx +5 -3
- package/src/components/subscription/description.tsx +12 -8
- package/src/components/subscription/items/index.tsx +30 -15
- package/src/components/subscription/items/usage-records.tsx +19 -5
- package/src/components/subscription/list.tsx +5 -7
- package/src/components/subscription/metrics.tsx +27 -12
- package/src/components/subscription/portal/actions.tsx +76 -70
- package/src/components/subscription/portal/cancel.tsx +10 -3
- package/src/components/subscription/portal/list.tsx +48 -26
- package/src/components/uploader.tsx +5 -13
- package/src/components/webhook/attempts.tsx +51 -16
- package/src/components/webhook/request-info.tsx +8 -6
- package/src/contexts/products.tsx +1 -1
- package/src/pages/admin/billing/invoices/detail.tsx +48 -12
- package/src/pages/admin/billing/subscriptions/detail.tsx +43 -11
- package/src/pages/admin/customers/customers/detail.tsx +53 -12
- package/src/pages/admin/customers/customers/index.tsx +6 -1
- package/src/pages/admin/developers/events/detail.tsx +36 -10
- package/src/pages/admin/developers/webhooks/detail.tsx +41 -11
- package/src/pages/admin/index.tsx +15 -2
- package/src/pages/admin/overview.tsx +107 -19
- package/src/pages/admin/payments/intents/detail.tsx +57 -13
- package/src/pages/admin/payments/payouts/detail.tsx +62 -14
- package/src/pages/admin/payments/refunds/detail.tsx +57 -13
- package/src/pages/admin/products/index.tsx +8 -2
- package/src/pages/admin/products/links/create.tsx +22 -4
- package/src/pages/admin/products/links/detail.tsx +42 -13
- package/src/pages/admin/products/passports/index.tsx +23 -4
- package/src/pages/admin/products/prices/actions.tsx +1 -6
- package/src/pages/admin/products/prices/detail.tsx +43 -11
- package/src/pages/admin/products/prices/list.tsx +7 -2
- package/src/pages/admin/products/pricing-tables/create.tsx +45 -12
- package/src/pages/admin/products/pricing-tables/detail.tsx +44 -13
- package/src/pages/admin/products/products/create.tsx +4 -1
- package/src/pages/admin/products/products/detail.tsx +72 -17
- package/src/pages/admin/settings/index.tsx +8 -1
- package/src/pages/admin/settings/payment-methods/index.tsx +84 -19
- package/src/pages/admin/settings/vault-config/edit-form.tsx +42 -28
- package/src/pages/admin/settings/vault-config/index.tsx +57 -10
- package/src/pages/customer/index.tsx +41 -15
- package/src/pages/customer/invoice/detail.tsx +63 -14
- package/src/pages/customer/invoice/past-due.tsx +11 -3
- package/src/pages/customer/payout/detail.tsx +56 -13
- package/src/pages/customer/recharge/account.tsx +80 -20
- package/src/pages/customer/recharge/subscription.tsx +86 -25
- package/src/pages/customer/refund/list.tsx +60 -24
- package/src/pages/customer/subscription/change-payment.tsx +13 -4
- package/src/pages/customer/subscription/change-plan.tsx +34 -7
- package/src/pages/customer/subscription/detail.tsx +86 -20
- package/src/pages/customer/subscription/embed.tsx +24 -4
- package/src/pages/home.tsx +26 -4
- package/src/pages/integrations/donations/edit-form.tsx +25 -9
- package/src/pages/integrations/donations/index.tsx +26 -9
- package/src/pages/integrations/donations/preview.tsx +59 -15
- package/src/pages/integrations/index.tsx +10 -1
- package/src/pages/integrations/overview.tsx +78 -17
- package/vite.config.ts +60 -30
|
@@ -105,7 +105,14 @@ const CurrencyCard = memo(
|
|
|
105
105
|
const CardSkeleton = memo(({ height = 100 }: { height: number }) => {
|
|
106
106
|
return (
|
|
107
107
|
<Box className="base-card section">
|
|
108
|
-
<Box
|
|
108
|
+
<Box
|
|
109
|
+
className="section-header"
|
|
110
|
+
sx={{
|
|
111
|
+
display: 'flex',
|
|
112
|
+
justifyContent: 'space-between',
|
|
113
|
+
alignItems: 'center',
|
|
114
|
+
mb: 2,
|
|
115
|
+
}}>
|
|
109
116
|
<Skeleton variant="text" width={150} height={32} />
|
|
110
117
|
</Box>
|
|
111
118
|
<Skeleton variant="rectangular" height={height} />
|
|
@@ -279,7 +286,12 @@ export default function CustomerHome() {
|
|
|
279
286
|
<Box className="base-card section section-subscription">
|
|
280
287
|
<Box className="section-header">
|
|
281
288
|
<Typography variant="h3">{t('customer.subscription.title')}</Typography>
|
|
282
|
-
<Stack
|
|
289
|
+
<Stack
|
|
290
|
+
direction="row"
|
|
291
|
+
spacing={1}
|
|
292
|
+
sx={{
|
|
293
|
+
alignItems: 'center',
|
|
294
|
+
}}>
|
|
283
295
|
<NotificationPreference />
|
|
284
296
|
{subscriptionStatus && (
|
|
285
297
|
<FormControl
|
|
@@ -340,14 +352,16 @@ export default function CustomerHome() {
|
|
|
340
352
|
<Typography variant="h3">{t('admin.customer.summary.stats')}</Typography>
|
|
341
353
|
</Box>
|
|
342
354
|
<Stack
|
|
343
|
-
gap={2}
|
|
344
|
-
mt={2}
|
|
345
355
|
sx={{
|
|
356
|
+
gap: 2,
|
|
357
|
+
mt: 2,
|
|
346
358
|
display: 'grid',
|
|
359
|
+
|
|
347
360
|
gridTemplateColumns: {
|
|
348
361
|
xs: 'repeat(1, 1fr)',
|
|
349
362
|
md: 'repeat(2, 1fr)',
|
|
350
363
|
},
|
|
364
|
+
|
|
351
365
|
'@container (max-width: 600px)': {
|
|
352
366
|
gridTemplateColumns: 'repeat(1, 1fr)',
|
|
353
367
|
},
|
|
@@ -368,8 +382,17 @@ export default function CustomerHome() {
|
|
|
368
382
|
borderColor: 'grey.100',
|
|
369
383
|
boxShadow: 1,
|
|
370
384
|
}}>
|
|
371
|
-
<Stack
|
|
372
|
-
|
|
385
|
+
<Stack
|
|
386
|
+
sx={{
|
|
387
|
+
flexDirection: 'row',
|
|
388
|
+
justifyContent: 'space-between',
|
|
389
|
+
}}>
|
|
390
|
+
<Box
|
|
391
|
+
sx={{
|
|
392
|
+
alignItems: 'center',
|
|
393
|
+
display: 'flex',
|
|
394
|
+
gap: 1,
|
|
395
|
+
}}>
|
|
373
396
|
<Avatar src={c?.logo} alt={c?.symbol} sx={{ width: 18, height: 18 }} />
|
|
374
397
|
<Typography
|
|
375
398
|
variant="h5"
|
|
@@ -377,7 +400,11 @@ export default function CustomerHome() {
|
|
|
377
400
|
sx={{ fontSize: '16px', color: 'text.primary', fontWeight: '500' }}>
|
|
378
401
|
{c?.symbol}
|
|
379
402
|
</Typography>
|
|
380
|
-
<Typography
|
|
403
|
+
<Typography
|
|
404
|
+
sx={{
|
|
405
|
+
color: 'text.lighter',
|
|
406
|
+
fontSize: 12,
|
|
407
|
+
}}>
|
|
381
408
|
{c?.methodName}
|
|
382
409
|
</Typography>
|
|
383
410
|
</Box>
|
|
@@ -461,15 +488,14 @@ export default function CustomerHome() {
|
|
|
461
488
|
</Box>
|
|
462
489
|
);
|
|
463
490
|
|
|
464
|
-
const RevenueCard =
|
|
465
|
-
|
|
466
|
-
<Box className="
|
|
467
|
-
<
|
|
468
|
-
<Typography variant="h3">{t('customer.payout.title')}</Typography>
|
|
469
|
-
</Box>
|
|
470
|
-
<CustomerRevenueList setHasRevenues={setHasRevenues} />
|
|
491
|
+
const RevenueCard = loadingCard ? null : (
|
|
492
|
+
<Box className="base-card section section-revenue" sx={{ visibility: hasRevenues ? 'visible' : 'hidden' }}>
|
|
493
|
+
<Box className="section-header">
|
|
494
|
+
<Typography variant="h3">{t('customer.payout.title')}</Typography>
|
|
471
495
|
</Box>
|
|
472
|
-
|
|
496
|
+
<CustomerRevenueList setHasRevenues={setHasRevenues} />
|
|
497
|
+
</Box>
|
|
498
|
+
);
|
|
473
499
|
|
|
474
500
|
return (
|
|
475
501
|
<Content>
|
|
@@ -128,18 +128,32 @@ export default function CustomerInvoiceDetail() {
|
|
|
128
128
|
const paymentDetails = data.paymentIntent?.payment_details || data.metadata?.payment_details;
|
|
129
129
|
return (
|
|
130
130
|
<InvoiceDetailRoot direction="column" spacing={3}>
|
|
131
|
-
<Stack
|
|
131
|
+
<Stack
|
|
132
|
+
direction="row"
|
|
133
|
+
sx={{
|
|
134
|
+
justifyContent: 'space-between',
|
|
135
|
+
}}>
|
|
132
136
|
<Stack
|
|
133
137
|
direction="row"
|
|
134
138
|
onClick={() => goBackOrFallback('/customer')}
|
|
135
|
-
|
|
136
|
-
|
|
139
|
+
sx={{
|
|
140
|
+
alignItems: 'center',
|
|
141
|
+
fontWeight: 'normal',
|
|
142
|
+
padding: '10px 0',
|
|
143
|
+
cursor: 'pointer',
|
|
144
|
+
}}>
|
|
137
145
|
<ArrowBackOutlined fontSize="small" sx={{ mr: 0.5, color: 'text.secondary' }} />
|
|
138
146
|
<Typography variant="h6" sx={{ color: 'text.secondary', fontWeight: 'normal' }}>
|
|
139
147
|
{t('common.previous')}
|
|
140
148
|
</Typography>
|
|
141
149
|
</Stack>
|
|
142
|
-
<Stack
|
|
150
|
+
<Stack
|
|
151
|
+
direction="row"
|
|
152
|
+
spacing={1}
|
|
153
|
+
sx={{
|
|
154
|
+
justifyContent: 'flex-end',
|
|
155
|
+
alignItems: 'center',
|
|
156
|
+
}}>
|
|
143
157
|
{['open', 'paid', 'uncollectible'].includes(data.status) && !isDonation && <Download data={data} />}
|
|
144
158
|
{data?.paymentLink?.donation_settings?.reference && (
|
|
145
159
|
<Button
|
|
@@ -164,49 +178,68 @@ export default function CustomerInvoiceDetail() {
|
|
|
164
178
|
</Stack>
|
|
165
179
|
</Stack>
|
|
166
180
|
<Box
|
|
167
|
-
mt={4}
|
|
168
181
|
sx={{
|
|
182
|
+
mt: 4,
|
|
169
183
|
display: 'flex',
|
|
184
|
+
|
|
170
185
|
gap: {
|
|
171
186
|
xs: 2,
|
|
172
187
|
sm: 2,
|
|
173
188
|
md: 5,
|
|
174
189
|
},
|
|
190
|
+
|
|
175
191
|
flexWrap: 'wrap',
|
|
192
|
+
|
|
176
193
|
flexDirection: {
|
|
177
194
|
xs: 'column',
|
|
178
195
|
sm: 'column',
|
|
179
196
|
md: 'row',
|
|
180
197
|
},
|
|
198
|
+
|
|
181
199
|
alignItems: {
|
|
182
200
|
xs: 'flex-start',
|
|
183
201
|
sm: 'flex-start',
|
|
184
202
|
md: 'center',
|
|
185
203
|
},
|
|
186
204
|
}}>
|
|
187
|
-
<Stack
|
|
188
|
-
|
|
205
|
+
<Stack
|
|
206
|
+
direction="row"
|
|
207
|
+
sx={{
|
|
208
|
+
justifyContent: 'space-between',
|
|
209
|
+
alignItems: 'center',
|
|
210
|
+
}}>
|
|
211
|
+
<Stack
|
|
212
|
+
direction="row"
|
|
213
|
+
sx={{
|
|
214
|
+
alignItems: 'center',
|
|
215
|
+
flexWrap: 'wrap',
|
|
216
|
+
gap: 1,
|
|
217
|
+
}}>
|
|
189
218
|
<Typography variant="h1">{data.number}</Typography>
|
|
190
219
|
</Stack>
|
|
191
220
|
</Stack>
|
|
192
221
|
<Stack
|
|
193
222
|
className="section-body"
|
|
194
|
-
justifyContent="flex-start"
|
|
195
|
-
flexWrap="wrap"
|
|
196
223
|
sx={{
|
|
224
|
+
justifyContent: 'flex-start',
|
|
225
|
+
flexWrap: 'wrap',
|
|
226
|
+
|
|
197
227
|
'hr.MuiDivider-root:last-child': {
|
|
198
228
|
display: 'none',
|
|
199
229
|
},
|
|
230
|
+
|
|
200
231
|
flexDirection: {
|
|
201
232
|
xs: 'column',
|
|
202
233
|
sm: 'column',
|
|
203
234
|
md: 'row',
|
|
204
235
|
},
|
|
236
|
+
|
|
205
237
|
alignItems: {
|
|
206
238
|
xs: 'flex-start',
|
|
207
239
|
sm: 'flex-start',
|
|
208
240
|
md: 'center',
|
|
209
241
|
},
|
|
242
|
+
|
|
210
243
|
gap: {
|
|
211
244
|
xs: 1,
|
|
212
245
|
sm: 1,
|
|
@@ -232,7 +265,11 @@ export default function CustomerInvoiceDetail() {
|
|
|
232
265
|
label={t('admin.subscription.name')}
|
|
233
266
|
value={
|
|
234
267
|
<Link to={`/customer/subscription/${data.subscription.id}`}>
|
|
235
|
-
<Typography
|
|
268
|
+
<Typography
|
|
269
|
+
variant="body1"
|
|
270
|
+
sx={{
|
|
271
|
+
color: 'text.link',
|
|
272
|
+
}}>
|
|
236
273
|
{data.subscription.description || data.subscription.id}
|
|
237
274
|
</Typography>
|
|
238
275
|
</Link>
|
|
@@ -252,7 +289,12 @@ export default function CustomerInvoiceDetail() {
|
|
|
252
289
|
</Box>
|
|
253
290
|
<Divider />
|
|
254
291
|
<Box className="section" sx={{ containerType: 'inline-size' }}>
|
|
255
|
-
<Typography
|
|
292
|
+
<Typography
|
|
293
|
+
variant="h3"
|
|
294
|
+
className="section-header"
|
|
295
|
+
sx={{
|
|
296
|
+
mb: 3,
|
|
297
|
+
}}>
|
|
256
298
|
{t('payment.customer.invoice.details')}
|
|
257
299
|
</Typography>
|
|
258
300
|
<InfoRowGroup
|
|
@@ -331,11 +373,13 @@ export default function CustomerInvoiceDetail() {
|
|
|
331
373
|
value={
|
|
332
374
|
<Typography
|
|
333
375
|
variant="body1"
|
|
334
|
-
color="text.link"
|
|
335
|
-
sx={{ cursor: 'pointer' }}
|
|
336
376
|
component="a"
|
|
337
377
|
onClick={() => {
|
|
338
378
|
window.open(joinURL(getPrefix(), `/customer/invoice/${data.relatedInvoice?.id}`), '_self');
|
|
379
|
+
}}
|
|
380
|
+
sx={{
|
|
381
|
+
color: 'text.link',
|
|
382
|
+
cursor: 'pointer',
|
|
339
383
|
}}>
|
|
340
384
|
{data.relatedInvoice?.number}
|
|
341
385
|
</Typography>
|
|
@@ -367,7 +411,12 @@ export default function CustomerInvoiceDetail() {
|
|
|
367
411
|
<>
|
|
368
412
|
<Divider />
|
|
369
413
|
<Box className="section">
|
|
370
|
-
<Typography
|
|
414
|
+
<Typography
|
|
415
|
+
variant="h3"
|
|
416
|
+
className="section-header"
|
|
417
|
+
sx={{
|
|
418
|
+
mb: 1.5,
|
|
419
|
+
}}>
|
|
371
420
|
{t('payment.customer.products')}
|
|
372
421
|
</Typography>
|
|
373
422
|
<InvoiceTable invoice={data} simple />
|
|
@@ -109,12 +109,20 @@ export default function CustomerInvoicePastDue() {
|
|
|
109
109
|
|
|
110
110
|
return (
|
|
111
111
|
<Stack direction="column" spacing={3} sx={{ my: 2 }}>
|
|
112
|
-
<Stack
|
|
112
|
+
<Stack
|
|
113
|
+
direction="row"
|
|
114
|
+
sx={{
|
|
115
|
+
alignItems: 'center',
|
|
116
|
+
justifyContent: 'space-between',
|
|
117
|
+
}}>
|
|
113
118
|
<Stack
|
|
114
119
|
direction="row"
|
|
115
120
|
onClick={() => goBackOrFallback('/customer')}
|
|
116
|
-
|
|
117
|
-
|
|
121
|
+
sx={{
|
|
122
|
+
alignItems: 'center',
|
|
123
|
+
fontWeight: 'normal',
|
|
124
|
+
cursor: 'pointer',
|
|
125
|
+
}}>
|
|
118
126
|
<ArrowBackOutlined fontSize="small" sx={{ mr: 0.5, color: 'text.secondary' }} />
|
|
119
127
|
<Typography variant="h6" sx={{ color: 'text.secondary', fontWeight: 'normal' }}>
|
|
120
128
|
{t('common.previous')}
|
|
@@ -60,12 +60,21 @@ export default function PayoutDetail() {
|
|
|
60
60
|
return (
|
|
61
61
|
<Root direction="column" spacing={2.5} mb={4}>
|
|
62
62
|
<Box>
|
|
63
|
-
<Stack
|
|
63
|
+
<Stack
|
|
64
|
+
className="page-header"
|
|
65
|
+
direction="row"
|
|
66
|
+
sx={{
|
|
67
|
+
justifyContent: 'space-between',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
}}>
|
|
64
70
|
<Stack
|
|
65
71
|
direction="row"
|
|
66
|
-
|
|
67
|
-
sx={{
|
|
68
|
-
|
|
72
|
+
onClick={() => goBackOrFallback('/customer/payouts')}
|
|
73
|
+
sx={{
|
|
74
|
+
alignItems: 'center',
|
|
75
|
+
fontWeight: 'normal',
|
|
76
|
+
cursor: 'pointer',
|
|
77
|
+
}}>
|
|
69
78
|
<ArrowBackOutlined fontSize="small" sx={{ mr: 0.5, color: 'text.secondary' }} />
|
|
70
79
|
<Typography variant="h6" sx={{ color: 'text.secondary', fontWeight: 'normal' }}>
|
|
71
80
|
{t('common.previous')}
|
|
@@ -82,37 +91,60 @@ export default function PayoutDetail() {
|
|
|
82
91
|
)}
|
|
83
92
|
</Stack>
|
|
84
93
|
<Box
|
|
85
|
-
mt={4}
|
|
86
|
-
mb={3}
|
|
87
94
|
sx={{
|
|
95
|
+
mt: 4,
|
|
96
|
+
mb: 3,
|
|
88
97
|
display: 'flex',
|
|
98
|
+
|
|
89
99
|
gap: {
|
|
90
100
|
xs: 2,
|
|
91
101
|
sm: 2,
|
|
92
102
|
md: 5,
|
|
93
103
|
},
|
|
104
|
+
|
|
94
105
|
flexWrap: 'wrap',
|
|
106
|
+
|
|
95
107
|
flexDirection: {
|
|
96
108
|
xs: 'column',
|
|
97
109
|
sm: 'column',
|
|
98
110
|
md: 'row',
|
|
99
111
|
},
|
|
112
|
+
|
|
100
113
|
alignItems: {
|
|
101
114
|
xs: 'flex-start',
|
|
102
115
|
sm: 'flex-start',
|
|
103
116
|
md: 'center',
|
|
104
117
|
},
|
|
105
118
|
}}>
|
|
106
|
-
<Stack
|
|
107
|
-
|
|
108
|
-
|
|
119
|
+
<Stack
|
|
120
|
+
direction="row"
|
|
121
|
+
sx={{
|
|
122
|
+
justifyContent: 'space-between',
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
}}>
|
|
125
|
+
<Stack
|
|
126
|
+
direction="row"
|
|
127
|
+
sx={{
|
|
128
|
+
alignItems: 'center',
|
|
129
|
+
}}>
|
|
130
|
+
<Stack
|
|
131
|
+
direction="row"
|
|
132
|
+
spacing={1}
|
|
133
|
+
sx={{
|
|
134
|
+
alignItems: 'center',
|
|
135
|
+
}}>
|
|
109
136
|
<Avatar
|
|
110
137
|
src={data.paymentCurrency.logo}
|
|
111
138
|
alt={data.paymentCurrency.symbol}
|
|
112
139
|
variant="square"
|
|
113
140
|
sx={{ width: '52px', height: '52px', borderRadius: 0.5 }}
|
|
114
141
|
/>
|
|
115
|
-
<Stack
|
|
142
|
+
<Stack
|
|
143
|
+
direction="column"
|
|
144
|
+
sx={{
|
|
145
|
+
alignItems: 'flex-start',
|
|
146
|
+
justifyContent: 'space-around',
|
|
147
|
+
}}>
|
|
116
148
|
<Amount amount={total} sx={{ my: 0, fontSize: '1.75rem', lineHeight: '32px' }} />
|
|
117
149
|
</Stack>
|
|
118
150
|
</Stack>
|
|
@@ -120,18 +152,22 @@ export default function PayoutDetail() {
|
|
|
120
152
|
</Stack>
|
|
121
153
|
<Stack
|
|
122
154
|
className="section-body"
|
|
123
|
-
justifyContent="flex-start"
|
|
124
|
-
flexWrap="wrap"
|
|
125
155
|
sx={{
|
|
156
|
+
justifyContent: 'flex-start',
|
|
157
|
+
flexWrap: 'wrap',
|
|
158
|
+
|
|
126
159
|
'hr.MuiDivider-root:last-child': {
|
|
127
160
|
display: 'none',
|
|
128
161
|
},
|
|
162
|
+
|
|
129
163
|
flexDirection: {
|
|
130
164
|
xs: 'column',
|
|
131
165
|
sm: 'column',
|
|
132
166
|
md: 'row',
|
|
133
167
|
},
|
|
168
|
+
|
|
134
169
|
alignItems: 'flex-start',
|
|
170
|
+
|
|
135
171
|
gap: {
|
|
136
172
|
xs: 1,
|
|
137
173
|
sm: 1,
|
|
@@ -218,7 +254,14 @@ export default function PayoutDetail() {
|
|
|
218
254
|
},
|
|
219
255
|
},
|
|
220
256
|
}}>
|
|
221
|
-
<Box
|
|
257
|
+
<Box
|
|
258
|
+
className="payment-link-column-1"
|
|
259
|
+
sx={{
|
|
260
|
+
flex: 1,
|
|
261
|
+
gap: 2.5,
|
|
262
|
+
display: 'flex',
|
|
263
|
+
flexDirection: 'column',
|
|
264
|
+
}}>
|
|
222
265
|
<Box className="section">
|
|
223
266
|
<SectionHeader title={t('common.detail')} />
|
|
224
267
|
<InfoRowGroup
|
|
@@ -322,7 +322,13 @@ export default function BalanceRechargePage() {
|
|
|
322
322
|
|
|
323
323
|
return (
|
|
324
324
|
<Root>
|
|
325
|
-
<Stack
|
|
325
|
+
<Stack
|
|
326
|
+
direction="row"
|
|
327
|
+
sx={{
|
|
328
|
+
justifyContent: 'space-between',
|
|
329
|
+
alignItems: 'center',
|
|
330
|
+
position: 'relative',
|
|
331
|
+
}}>
|
|
326
332
|
<Button
|
|
327
333
|
startIcon={<ArrowBackOutlined />}
|
|
328
334
|
variant="text"
|
|
@@ -332,19 +338,27 @@ export default function BalanceRechargePage() {
|
|
|
332
338
|
{t('common.previous')}
|
|
333
339
|
</Button>
|
|
334
340
|
</Stack>
|
|
335
|
-
|
|
336
341
|
<Typography variant="h2" gutterBottom>
|
|
337
342
|
{currency?.symbol} {t('customer.recharge.title')}
|
|
338
343
|
</Typography>
|
|
339
|
-
|
|
340
344
|
{currency && (
|
|
341
345
|
<Box ref={rechargeRef}>
|
|
342
346
|
<Stack sx={{ maxWidth: '760px' }}>
|
|
343
347
|
<Box sx={{ mb: 4 }}>
|
|
344
348
|
<BalanceCard elevation={0}>
|
|
345
|
-
<Stack
|
|
349
|
+
<Stack
|
|
350
|
+
direction="row"
|
|
351
|
+
spacing={2}
|
|
352
|
+
sx={{
|
|
353
|
+
justifyContent: 'space-between',
|
|
354
|
+
alignItems: 'center',
|
|
355
|
+
}}>
|
|
346
356
|
<Stack spacing={0.5}>
|
|
347
|
-
<Typography
|
|
357
|
+
<Typography
|
|
358
|
+
variant="body2"
|
|
359
|
+
sx={{
|
|
360
|
+
color: 'text.secondary',
|
|
361
|
+
}}>
|
|
348
362
|
{t('customer.recharge.receiveAddress')}
|
|
349
363
|
</Typography>
|
|
350
364
|
<Typography variant="body1" sx={{ wordBreak: 'break-all', fontFamily: 'monospace' }}>
|
|
@@ -388,7 +402,12 @@ export default function BalanceRechargePage() {
|
|
|
388
402
|
}
|
|
389
403
|
: undefined,
|
|
390
404
|
}}>
|
|
391
|
-
<Stack
|
|
405
|
+
<Stack
|
|
406
|
+
direction="row"
|
|
407
|
+
sx={{
|
|
408
|
+
alignItems: 'center',
|
|
409
|
+
justifyContent: 'space-between',
|
|
410
|
+
}}>
|
|
392
411
|
<Stack>
|
|
393
412
|
<Typography
|
|
394
413
|
variant="body1"
|
|
@@ -420,7 +439,12 @@ export default function BalanceRechargePage() {
|
|
|
420
439
|
<Stack sx={{ mb: 3, backgroundColor: 'background.default', borderRadius: '16px' }}>
|
|
421
440
|
<Grid container spacing={2}>
|
|
422
441
|
{presetAmounts.map(({ amount: presetAmount, label, multiplier }) => (
|
|
423
|
-
<Grid
|
|
442
|
+
<Grid
|
|
443
|
+
key={presetAmount}
|
|
444
|
+
size={{
|
|
445
|
+
xs: 6,
|
|
446
|
+
sm: 3,
|
|
447
|
+
}}>
|
|
424
448
|
<Card
|
|
425
449
|
variant="outlined"
|
|
426
450
|
sx={{
|
|
@@ -456,7 +480,12 @@ export default function BalanceRechargePage() {
|
|
|
456
480
|
{formatNumber(presetAmount)} {currency.symbol}
|
|
457
481
|
</Typography>
|
|
458
482
|
{multiplier > 0 && label && (
|
|
459
|
-
<Typography
|
|
483
|
+
<Typography
|
|
484
|
+
variant="caption"
|
|
485
|
+
align="center"
|
|
486
|
+
sx={{
|
|
487
|
+
color: 'text.secondary',
|
|
488
|
+
}}>
|
|
460
489
|
{label}
|
|
461
490
|
</Typography>
|
|
462
491
|
)}
|
|
@@ -464,7 +493,11 @@ export default function BalanceRechargePage() {
|
|
|
464
493
|
</Card>
|
|
465
494
|
</Grid>
|
|
466
495
|
))}
|
|
467
|
-
<Grid
|
|
496
|
+
<Grid
|
|
497
|
+
size={{
|
|
498
|
+
xs: 6,
|
|
499
|
+
sm: 3,
|
|
500
|
+
}}>
|
|
468
501
|
<Card
|
|
469
502
|
variant="outlined"
|
|
470
503
|
sx={{
|
|
@@ -488,7 +521,13 @@ export default function BalanceRechargePage() {
|
|
|
488
521
|
: {}),
|
|
489
522
|
}}>
|
|
490
523
|
<CardActionArea onClick={handleCustomSelect} sx={{ height: '100%', p: 1 }}>
|
|
491
|
-
<Stack
|
|
524
|
+
<Stack
|
|
525
|
+
direction="row"
|
|
526
|
+
spacing={1}
|
|
527
|
+
sx={{
|
|
528
|
+
justifyContent: 'center',
|
|
529
|
+
alignItems: 'center',
|
|
530
|
+
}}>
|
|
492
531
|
<Typography
|
|
493
532
|
variant="h6"
|
|
494
533
|
align="center"
|
|
@@ -513,18 +552,26 @@ export default function BalanceRechargePage() {
|
|
|
513
552
|
error={!!amountError}
|
|
514
553
|
helperText={amountError}
|
|
515
554
|
onChange={handleAmountChange}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
555
|
+
inputRef={customInputRef}
|
|
556
|
+
slotProps={{
|
|
557
|
+
input: {
|
|
558
|
+
endAdornment: <Typography>{currency.symbol}</Typography>,
|
|
559
|
+
autoComplete: 'off',
|
|
560
|
+
inputProps: {
|
|
561
|
+
min: 0,
|
|
562
|
+
max: MAX_SAFE_AMOUNT,
|
|
563
|
+
},
|
|
522
564
|
},
|
|
523
565
|
}}
|
|
524
|
-
inputRef={customInputRef}
|
|
525
566
|
/>
|
|
526
567
|
{amount && Number(amount) > 0 && Number(unitCycle.amount) > 0 && !amountError && (
|
|
527
|
-
<Typography
|
|
568
|
+
<Typography
|
|
569
|
+
variant="body2"
|
|
570
|
+
sx={{
|
|
571
|
+
fontSize: 12,
|
|
572
|
+
color: 'text.lighter',
|
|
573
|
+
mt: 1,
|
|
574
|
+
}}>
|
|
528
575
|
{t('common.estimatedDuration', {
|
|
529
576
|
duration: formatSmartDuration(
|
|
530
577
|
Math.floor(Number(amount) / Number(unitCycle.amount)) < 1
|
|
@@ -568,12 +615,25 @@ export default function BalanceRechargePage() {
|
|
|
568
615
|
|
|
569
616
|
<Grid container spacing={2}>
|
|
570
617
|
{relatedSubscriptions.map((subscription) => (
|
|
571
|
-
<Grid
|
|
618
|
+
<Grid
|
|
619
|
+
key={subscription.id}
|
|
620
|
+
size={{
|
|
621
|
+
xs: 12,
|
|
622
|
+
sm: 6,
|
|
623
|
+
md: 4,
|
|
624
|
+
lg: 3,
|
|
625
|
+
}}>
|
|
572
626
|
<Stack
|
|
573
627
|
onClick={() => handleSubscriptionClick(subscription.id)}
|
|
574
628
|
className="base-card"
|
|
575
629
|
sx={{ height: '100%' }}>
|
|
576
|
-
<Stack
|
|
630
|
+
<Stack
|
|
631
|
+
direction="row"
|
|
632
|
+
spacing={1.5}
|
|
633
|
+
sx={{
|
|
634
|
+
alignItems: 'center',
|
|
635
|
+
mb: 1,
|
|
636
|
+
}}>
|
|
577
637
|
<Typography
|
|
578
638
|
variant="subtitle1"
|
|
579
639
|
sx={{
|