payment-kit 1.18.37 → 1.18.38
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/blocklet.yml +1 -1
- package/package.json +17 -17
- package/src/app.tsx +124 -125
- package/src/components/chart.tsx +19 -5
- package/src/components/customer/notification-preference.tsx +6 -5
- package/src/components/date-range-picker.tsx +1 -16
- package/src/components/drawer-form.tsx +4 -3
- package/src/components/filter-toolbar.tsx +49 -34
- package/src/components/info-card.tsx +9 -7
- package/src/components/invoice-pdf/pdf.tsx +1 -1
- package/src/components/layout/admin.tsx +2 -2
- package/src/components/metadata/form.tsx +3 -2
- package/src/components/metadata/list.tsx +1 -1
- package/src/components/payment-link/chrome.tsx +0 -1
- package/src/components/payment-link/item.tsx +1 -1
- package/src/components/payment-link/preview.tsx +3 -1
- package/src/components/price/currency-select.tsx +1 -1
- package/src/components/pricing-table/payment-settings.tsx +1 -1
- package/src/components/pricing-table/preview.tsx +3 -1
- package/src/components/pricing-table/product-item.tsx +1 -1
- package/src/components/subscription/portal/list.tsx +2 -2
- package/src/components/uploader.tsx +2 -1
- package/src/components/webhook/attempts.tsx +1 -1
- package/src/global.css +0 -7
- package/src/pages/admin/developers/webhooks/detail.tsx +2 -2
- package/src/pages/admin/index.tsx +2 -2
- package/src/pages/admin/overview.tsx +1 -1
- package/src/pages/admin/payments/intents/detail.tsx +1 -1
- package/src/pages/admin/payments/payouts/detail.tsx +1 -1
- package/src/pages/admin/payments/refunds/detail.tsx +1 -1
- package/src/pages/admin/products/prices/list.tsx +7 -2
- package/src/pages/admin/products/pricing-tables/create.tsx +2 -2
- package/src/pages/admin/settings/payment-methods/index.tsx +7 -4
- package/src/pages/admin/settings/vault-config/index.tsx +3 -2
- package/src/pages/checkout/pricing-table.tsx +1 -1
- package/src/pages/customer/index.tsx +4 -3
- package/src/pages/customer/invoice/detail.tsx +1 -1
- package/src/pages/customer/payout/detail.tsx +1 -1
- package/src/pages/customer/recharge/account.tsx +3 -4
- package/src/pages/customer/recharge/subscription.tsx +3 -4
- package/src/pages/customer/subscription/embed.tsx +2 -2
- package/src/pages/integrations/donations/preview.tsx +12 -10
- package/src/pages/integrations/index.tsx +1 -1
- package/src/pages/integrations/overview.tsx +2 -4
|
@@ -61,21 +61,23 @@ export default function InfoCard(props: Props) {
|
|
|
61
61
|
componentsProps={{
|
|
62
62
|
tooltip: {
|
|
63
63
|
sx: {
|
|
64
|
-
bgcolor:
|
|
65
|
-
color:
|
|
66
|
-
boxShadow:
|
|
64
|
+
bgcolor: 'background.paper',
|
|
65
|
+
color: 'text.primary',
|
|
66
|
+
boxShadow: 2,
|
|
67
67
|
borderRadius: 2,
|
|
68
68
|
padding: '10px 16px',
|
|
69
69
|
fontSize: 14,
|
|
70
70
|
maxWidth: 400,
|
|
71
71
|
minWidth: 240,
|
|
72
72
|
wordBreak: 'break-word',
|
|
73
|
-
border:
|
|
73
|
+
border: '1px solid',
|
|
74
|
+
borderColor: 'divider',
|
|
74
75
|
'& .MuiTooltip-arrow': {
|
|
75
|
-
color:
|
|
76
|
+
color: 'background.paper',
|
|
76
77
|
'&::before': {
|
|
77
|
-
border:
|
|
78
|
-
|
|
78
|
+
border: '1px solid',
|
|
79
|
+
borderColor: 'grey.200',
|
|
80
|
+
backgroundColor: 'background.paper',
|
|
79
81
|
},
|
|
80
82
|
},
|
|
81
83
|
},
|
|
@@ -100,7 +100,7 @@ export function Download({ data }: { data: TInvoiceExpanded }) {
|
|
|
100
100
|
size="small"
|
|
101
101
|
onClick={generatePDF}
|
|
102
102
|
disabled={!isReady || isGenerating}
|
|
103
|
-
sx={{ borderColor: '
|
|
103
|
+
sx={{ borderColor: 'grey.100' }}>
|
|
104
104
|
{isGenerating ? (
|
|
105
105
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
|
106
106
|
<CircularProgress size={16} sx={{ color: 'inherit' }} />
|
|
@@ -10,7 +10,7 @@ import { useSessionContext } from '../../contexts/session';
|
|
|
10
10
|
|
|
11
11
|
const Root = styled(Dashboard)<{ padding: string }>`
|
|
12
12
|
width: 100%;
|
|
13
|
-
background-color:
|
|
13
|
+
background-color: ${({ theme }) => theme.palette.background.default};
|
|
14
14
|
|
|
15
15
|
> .dashboard-body > .dashboard-main {
|
|
16
16
|
> .dashboard-content {
|
|
@@ -35,7 +35,7 @@ const Root = styled(Dashboard)<{ padding: string }>`
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.MuiTabs-scroller {
|
|
38
|
-
border-bottom: 1px solid
|
|
38
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.divider};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.page-content {
|
|
@@ -110,8 +110,9 @@ export default function MetadataForm({
|
|
|
110
110
|
<IconButton
|
|
111
111
|
onClick={() => metadata.remove(index)}
|
|
112
112
|
sx={{
|
|
113
|
-
border: '1px solid
|
|
114
|
-
|
|
113
|
+
border: '1px solid',
|
|
114
|
+
borderColor: 'grey.100',
|
|
115
|
+
borderRadius: 1,
|
|
115
116
|
padding: '8px',
|
|
116
117
|
}}>
|
|
117
118
|
<DeleteOutlineOutlined color="error" sx={{ opacity: 0.75 }} />
|
|
@@ -18,7 +18,7 @@ export default function MetadataList({
|
|
|
18
18
|
if (isEmpty(data)) {
|
|
19
19
|
return (
|
|
20
20
|
<Box sx={{ textAlign: 'center' }}>
|
|
21
|
-
<Typography color="primary" fontWeight={500}>
|
|
21
|
+
<Typography color="text.primary" fontWeight={500}>
|
|
22
22
|
{t('common.metadata.empty')}
|
|
23
23
|
</Typography>
|
|
24
24
|
<Typography color="text.lighter">{t('common.metadata.emptyTip')}</Typography>
|
|
@@ -54,7 +54,7 @@ export default function LineItem({ prefix, product, valid, onUpdate, onRemove }:
|
|
|
54
54
|
p: 2,
|
|
55
55
|
borderWidth: valid ? 1 : 2,
|
|
56
56
|
borderStyle: 'solid',
|
|
57
|
-
borderColor: valid ? '
|
|
57
|
+
borderColor: valid ? 'grey.100' : 'error.main',
|
|
58
58
|
borderRadius: 2,
|
|
59
59
|
position: 'relative',
|
|
60
60
|
}}>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { forwardRef, useImperativeHandle, useRef } from 'react';
|
|
2
2
|
import { useFullscreen, useSize } from 'ahooks';
|
|
3
3
|
import IframeResizer from 'iframe-resizer-react';
|
|
4
|
+
import { useTheme } from '@mui/material';
|
|
4
5
|
import Chrome from './chrome';
|
|
5
6
|
|
|
6
7
|
const PaymentLinkPreview = forwardRef(({ id, version = 1 }: { id: string; version?: number }, ref) => {
|
|
8
|
+
const theme = useTheme();
|
|
7
9
|
const innerRef = useRef(null);
|
|
8
10
|
const size = useSize(innerRef);
|
|
9
11
|
const scale = (size?.width || 0) / 1280;
|
|
@@ -18,7 +20,7 @@ const PaymentLinkPreview = forwardRef(({ id, version = 1 }: { id: string; versio
|
|
|
18
20
|
return (
|
|
19
21
|
<div ref={innerRef}>
|
|
20
22
|
{fullscreen ? (
|
|
21
|
-
<div style={{ width: '100%', height: '100%', background: '#fff' }}>
|
|
23
|
+
<div style={{ width: '100%', height: '100%', background: theme.palette.background.paper || '#fff' }}>
|
|
22
24
|
<IframeResizer
|
|
23
25
|
style={{ width: '100%', height: '100vh', overflow: 'hidden', border: 'none' }}
|
|
24
26
|
src={`${window.blocklet.prefix}checkout/pay/${id}?preview=1&version=${version}`}
|
|
@@ -67,7 +67,7 @@ export default function CurrencySelect({
|
|
|
67
67
|
}}
|
|
68
68
|
sx={{ cursor: canSelect ? 'pointer' : 'default', display: 'inline-flex' }}>
|
|
69
69
|
{selectedCurrency?.symbol} ({selectedPaymentMethod?.name})
|
|
70
|
-
{canSelect && <ArrowDropDown sx={{ color: '
|
|
70
|
+
{canSelect && <ArrowDropDown sx={{ color: 'text.secondary', fontSize: 21 }} />}
|
|
71
71
|
</Typography>
|
|
72
72
|
);
|
|
73
73
|
}
|
|
@@ -227,7 +227,7 @@ export function ProductPaymentSettings({ product, prices }: { product: TProduct;
|
|
|
227
227
|
});
|
|
228
228
|
|
|
229
229
|
return (
|
|
230
|
-
<Box sx={{ px: 2, py: 0, border: '1px solid
|
|
230
|
+
<Box sx={{ px: 2, py: 0, border: '1px solid', borderColor: 'divider', borderRadius: 1 }}>
|
|
231
231
|
<IconCollapse
|
|
232
232
|
key={product.id}
|
|
233
233
|
expanded
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { forwardRef, useImperativeHandle, useRef } from 'react';
|
|
2
2
|
import { useFullscreen, useSize } from 'ahooks';
|
|
3
3
|
import IframeResizer from 'iframe-resizer-react';
|
|
4
|
+
import { useTheme } from '@mui/material';
|
|
4
5
|
import Chrome from '../payment-link/chrome';
|
|
5
6
|
|
|
6
7
|
const PricingTablePreview = forwardRef(({ id, version = 1 }: { id: string; version?: number }, ref) => {
|
|
7
8
|
const innerRef = useRef(null);
|
|
8
9
|
const size = useSize(innerRef);
|
|
10
|
+
const theme = useTheme();
|
|
9
11
|
const scale = (size?.width || 0) / 1280;
|
|
10
12
|
const [fullscreen, { toggleFullscreen }] = useFullscreen(innerRef);
|
|
11
13
|
|
|
@@ -18,7 +20,7 @@ const PricingTablePreview = forwardRef(({ id, version = 1 }: { id: string; versi
|
|
|
18
20
|
return (
|
|
19
21
|
<div ref={innerRef}>
|
|
20
22
|
{fullscreen ? (
|
|
21
|
-
<div style={{ width: '100%', height: '100%', background: '#fff' }}>
|
|
23
|
+
<div style={{ width: '100%', height: '100%', background: theme.palette.background.paper || '#fff' }}>
|
|
22
24
|
<IframeResizer
|
|
23
25
|
style={{ width: '100%', height: '100vh', overflow: 'hidden', border: 'none' }}
|
|
24
26
|
src={`${window.blocklet.prefix}checkout/pricing-table/${id}?preview=1&version=${version}`}
|
|
@@ -46,7 +46,7 @@ export default function ProductItem({ product, prices, valid, onUpdate, onRemove
|
|
|
46
46
|
p: 2,
|
|
47
47
|
borderWidth: valid ? 1 : 2,
|
|
48
48
|
borderStyle: 'solid',
|
|
49
|
-
borderColor: valid ? '
|
|
49
|
+
borderColor: valid ? 'grey.100' : 'error.main',
|
|
50
50
|
borderRadius: 2,
|
|
51
51
|
position: 'relative',
|
|
52
52
|
}}>
|
|
@@ -120,9 +120,9 @@ export default function CurrentSubscriptions({
|
|
|
120
120
|
}}
|
|
121
121
|
sx={{
|
|
122
122
|
padding: 1.5,
|
|
123
|
-
background: '
|
|
123
|
+
background: 'grey.50',
|
|
124
124
|
'&:hover': {
|
|
125
|
-
backgroundColor: '
|
|
125
|
+
backgroundColor: 'grey.100',
|
|
126
126
|
transition: 'background-color 200ms linear',
|
|
127
127
|
cursor: 'pointer',
|
|
128
128
|
},
|
|
@@ -157,7 +157,8 @@ Uploader.defaultProps = {
|
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
const Div = styled(Box)`
|
|
160
|
-
border: 1px solid
|
|
160
|
+
border: 1px solid;
|
|
161
|
+
border-color: ${({ theme }) => theme.palette.grey[100]};
|
|
161
162
|
border-radius: 4px;
|
|
162
163
|
cursor: pointer;
|
|
163
164
|
width: 120px;
|
|
@@ -135,7 +135,7 @@ export default function WebhookAttempts({ event_id, webhook_endpoint_id, event }
|
|
|
135
135
|
</Grid>
|
|
136
136
|
<Grid item xs={12} md={8}>
|
|
137
137
|
{selected && (
|
|
138
|
-
<Stack direction="column" spacing={2} sx={{ pt: 3, pl: 3, borderLeft: '1px solid
|
|
138
|
+
<Stack direction="column" spacing={2} sx={{ pt: 3, pl: 3, borderLeft: '1px solid', borderColor: 'grey.100' }}>
|
|
139
139
|
<Typography variant="h6">{event_id ? selected.endpoint.url : selected.event.type}</Typography>
|
|
140
140
|
<Box>
|
|
141
141
|
<Typography variant="h6">Response ({selected.response_status})</Typography>
|
package/src/global.css
CHANGED
|
@@ -12,7 +12,6 @@ a:has(> div) {
|
|
|
12
12
|
font-weight: 500;
|
|
13
13
|
font-size: 0.875rem;
|
|
14
14
|
line-height: 1.3125rem;
|
|
15
|
-
border-color: #ccc;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
.MuiTab-root {
|
|
@@ -28,17 +27,12 @@ a:has(> div) {
|
|
|
28
27
|
margin-bottom: 8px;
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
.MuiTabs-scroller {
|
|
32
|
-
border-bottom: 1px solid #eee;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
30
|
.MuiCheckbox-root {
|
|
36
31
|
padding: 0;
|
|
37
32
|
padding-right: 4px;
|
|
38
33
|
}
|
|
39
34
|
|
|
40
35
|
.MuiFormLabel-root {
|
|
41
|
-
color: var(--foregrounds-fg-base, #010714);
|
|
42
36
|
display: block;
|
|
43
37
|
margin-bottom: 4px;
|
|
44
38
|
font-weight: 500;
|
|
@@ -71,7 +65,6 @@ th.MuiTableCell-head {
|
|
|
71
65
|
padding-top: 16px;
|
|
72
66
|
}
|
|
73
67
|
|
|
74
|
-
|
|
75
68
|
.MuiFormHelperText-root {
|
|
76
69
|
margin-left: 0;
|
|
77
70
|
}
|
|
@@ -63,7 +63,7 @@ export default function WebhookDetail(props: { id: string }) {
|
|
|
63
63
|
spacing={3}
|
|
64
64
|
justifyContent="flex-start"
|
|
65
65
|
flexWrap="wrap"
|
|
66
|
-
sx={{ pt: 2, mt: 2, borderTop: '1px solid
|
|
66
|
+
sx={{ pt: 2, mt: 2, borderTop: '1px solid', borderColor: 'grey.100' }}>
|
|
67
67
|
<InfoMetric
|
|
68
68
|
label={t('common.status')}
|
|
69
69
|
value={<Status label={data.status} color={getWebhookStatusColor(data.status)} />}
|
|
@@ -83,7 +83,7 @@ export default function WebhookDetail(props: { id: string }) {
|
|
|
83
83
|
))}
|
|
84
84
|
</ul>
|
|
85
85
|
}>
|
|
86
|
-
<Typography sx={{ backgroundColor: '
|
|
86
|
+
<Typography sx={{ backgroundColor: 'grey.100', paddingX: 0.5, borderRadius: 0.5 }}>
|
|
87
87
|
{data.enabled_events.length} events
|
|
88
88
|
</Typography>
|
|
89
89
|
</Tooltip>
|
|
@@ -34,7 +34,7 @@ const renderNav = (group: string, onChange: Function, groups: { label: string; v
|
|
|
34
34
|
fontWeight: 600,
|
|
35
35
|
border: 'none',
|
|
36
36
|
cursor: 'pointer',
|
|
37
|
-
'&:hover': group === x.value ? {} : { backgroundColor: '
|
|
37
|
+
'&:hover': group === x.value ? {} : { backgroundColor: 'grey.100' },
|
|
38
38
|
}}
|
|
39
39
|
/>
|
|
40
40
|
));
|
|
@@ -93,7 +93,7 @@ function Admin() {
|
|
|
93
93
|
fontWeight: '500',
|
|
94
94
|
color: 'text.lighter',
|
|
95
95
|
'&.Mui-selected': {
|
|
96
|
-
color: '
|
|
96
|
+
color: 'primary.main',
|
|
97
97
|
},
|
|
98
98
|
},
|
|
99
99
|
'.MuiTouchRipple-root': {
|
|
@@ -137,7 +137,7 @@ export default function PaymentIntentDetail(props: { id: string }) {
|
|
|
137
137
|
src={data.paymentCurrency.logo}
|
|
138
138
|
alt={data.paymentCurrency.symbol}
|
|
139
139
|
variant="square"
|
|
140
|
-
sx={{ width: '52px', height: '52px', borderRadius:
|
|
140
|
+
sx={{ width: '52px', height: '52px', borderRadius: 0.5 }}
|
|
141
141
|
/>
|
|
142
142
|
<Stack direction="column" alignItems="flex-start" justifyContent="space-around">
|
|
143
143
|
<Amount amount={received} sx={{ my: 0, fontSize: '1.75rem', lineHeight: '32px' }} />
|
|
@@ -160,7 +160,7 @@ export default function PayoutDetail(props: { id: string }) {
|
|
|
160
160
|
src={data.paymentCurrency.logo}
|
|
161
161
|
alt={data.paymentCurrency.symbol}
|
|
162
162
|
variant="square"
|
|
163
|
-
sx={{ width: '52px', height: '52px', borderRadius:
|
|
163
|
+
sx={{ width: '52px', height: '52px', borderRadius: 0.5 }}
|
|
164
164
|
/>
|
|
165
165
|
<Stack direction="column" alignItems="flex-start" justifyContent="space-around">
|
|
166
166
|
<Amount amount={total} sx={{ my: 0, fontSize: '1.75rem', lineHeight: '32px' }} />
|
|
@@ -135,7 +135,7 @@ export default function RefundDetail(props: { id: string }) {
|
|
|
135
135
|
src={data.paymentCurrency.logo}
|
|
136
136
|
alt={data.paymentCurrency.symbol}
|
|
137
137
|
variant="square"
|
|
138
|
-
sx={{ width: '52px', height: '52px', borderRadius:
|
|
138
|
+
sx={{ width: '52px', height: '52px', borderRadius: 0.5 }}
|
|
139
139
|
/>
|
|
140
140
|
<Stack direction="column" alignItems="flex-start" justifyContent="space-around">
|
|
141
141
|
<Amount amount={amount} sx={{ my: 0, fontSize: '1.75rem', lineHeight: '32px' }} />
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
findCurrency,
|
|
11
11
|
} from '@blocklet/payment-react';
|
|
12
12
|
import { LockOutlined } from '@mui/icons-material';
|
|
13
|
-
import { Stack, Tooltip, Typography } from '@mui/material';
|
|
13
|
+
import { Stack, Tooltip, Typography, useTheme } from '@mui/material';
|
|
14
14
|
import { Link } from 'react-router-dom';
|
|
15
15
|
|
|
16
16
|
import Copyable from '../../../../components/copyable';
|
|
@@ -20,6 +20,7 @@ import PriceActions from './actions';
|
|
|
20
20
|
export default function PricesList({ product, onChange }: { product: Product; onChange: Function }) {
|
|
21
21
|
const { t, locale } = useLocaleContext();
|
|
22
22
|
const { settings } = usePaymentContext();
|
|
23
|
+
const theme = useTheme();
|
|
23
24
|
const query = getQueryParams(window.location.href);
|
|
24
25
|
|
|
25
26
|
const columns = [
|
|
@@ -35,6 +36,7 @@ export default function PricesList({ product, onChange }: { product: Product; on
|
|
|
35
36
|
const priceCurrency = showHighlight
|
|
36
37
|
? findCurrency(settings.paymentMethods, query.currency_id || '')
|
|
37
38
|
: price.currency;
|
|
39
|
+
const highlightColor = theme.mode === 'dark' ? '#2e3035' : '#FFF9C4';
|
|
38
40
|
return (
|
|
39
41
|
<Link to={`/admin/products/${price.id}`} color="text.primary">
|
|
40
42
|
<Stack direction="row" alignItems="center" spacing={1}>
|
|
@@ -45,7 +47,10 @@ export default function PricesList({ product, onChange }: { product: Product; on
|
|
|
45
47
|
)}
|
|
46
48
|
<Typography
|
|
47
49
|
component="span"
|
|
48
|
-
sx={{
|
|
50
|
+
sx={{
|
|
51
|
+
backgroundColor: showHighlight ? highlightColor : 'transparent',
|
|
52
|
+
whiteSpace: 'nowrap',
|
|
53
|
+
}}>
|
|
49
54
|
{formatPrice(price, priceCurrency || price.currency, '', 1, true, locale)}
|
|
50
55
|
</Typography>
|
|
51
56
|
<Typography component="span">
|
|
@@ -122,7 +122,7 @@ export default function CreatePricingTable() {
|
|
|
122
122
|
<FormProvider {...methods}>
|
|
123
123
|
<ProductsProvider>
|
|
124
124
|
<Stack height="92vh" spacing={2} direction="row">
|
|
125
|
-
<Box flex={2} sx={{ borderRight: '1px solid
|
|
125
|
+
<Box flex={2} sx={{ borderRight: '1px solid', borderColor: 'grey.100' }} position="relative">
|
|
126
126
|
<Stack height="100%" spacing={2}>
|
|
127
127
|
<Box overflow="auto" sx={{ pr: 2, pb: 8 }}>
|
|
128
128
|
{step === 0 && <PricingTableProductSettings triggerError={triggerError} />}
|
|
@@ -137,7 +137,7 @@ export default function CreatePricingTable() {
|
|
|
137
137
|
alignItems="center"
|
|
138
138
|
justifyContent="flex-end"
|
|
139
139
|
position="absolute"
|
|
140
|
-
sx={{ borderTop: '1px solid
|
|
140
|
+
sx={{ borderTop: '1px solid', borderColor: 'grey.100', left: 0, bottom: 0 }}>
|
|
141
141
|
<Button variant="text" color="inherit" disabled={step === 0} onClick={onPrevious}>
|
|
142
142
|
{t('common.previous')}
|
|
143
143
|
</Button>
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
TextField,
|
|
31
31
|
Tooltip,
|
|
32
32
|
Typography,
|
|
33
|
+
useTheme,
|
|
33
34
|
} from '@mui/material';
|
|
34
35
|
import { useRequest, useSessionStorageState, useSetState } from 'ahooks';
|
|
35
36
|
import useBus from 'use-bus';
|
|
@@ -308,8 +309,9 @@ function PaymentMethodSkeleton() {
|
|
|
308
309
|
<Box
|
|
309
310
|
sx={{
|
|
310
311
|
py: 1,
|
|
311
|
-
borderTop: '1px solid
|
|
312
|
-
borderBottom: '1px solid
|
|
312
|
+
borderTop: '1px solid',
|
|
313
|
+
borderBottom: '1px solid',
|
|
314
|
+
borderColor: 'divider',
|
|
313
315
|
mb: 1,
|
|
314
316
|
}}>
|
|
315
317
|
<Stack direction="row" justifyContent="space-between" alignItems="center">
|
|
@@ -330,6 +332,7 @@ function PaymentMethodSkeleton() {
|
|
|
330
332
|
|
|
331
333
|
export default function PaymentMethods() {
|
|
332
334
|
const { t } = useLocaleContext();
|
|
335
|
+
const { palette } = useTheme();
|
|
333
336
|
const [expandedId, setExpandedId] = useSessionStorageState('payment-method-expanded-id', {
|
|
334
337
|
defaultValue: '',
|
|
335
338
|
});
|
|
@@ -442,8 +445,8 @@ export default function PaymentMethods() {
|
|
|
442
445
|
}
|
|
443
446
|
style={{
|
|
444
447
|
py: 1,
|
|
445
|
-
borderTop:
|
|
446
|
-
borderBottom:
|
|
448
|
+
borderTop: `1px solid ${palette.divider}`,
|
|
449
|
+
borderBottom: `1px solid ${palette.divider}`,
|
|
447
450
|
'& :hover': { color: 'text.primary' },
|
|
448
451
|
}}
|
|
449
452
|
value={method.id}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/no-unstable-nested-components */
|
|
2
2
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
3
3
|
import { api, ConfirmDialog, formatBNStr, Link, parseMarkedText, Table, useMobile } from '@blocklet/payment-react';
|
|
4
|
-
import { Alert, Avatar, Box, Button, CircularProgress, Stack, Tooltip, Typography } from '@mui/material';
|
|
4
|
+
import { Alert, Avatar, Box, Button, CircularProgress, Stack, Tooltip, Typography, useTheme } from '@mui/material';
|
|
5
5
|
import { useRequest, useSetState } from 'ahooks';
|
|
6
6
|
import Empty from '@arcblock/ux/lib/Empty';
|
|
7
7
|
import { HelpOutline } from '@mui/icons-material';
|
|
@@ -31,6 +31,7 @@ export default function VaultConfig() {
|
|
|
31
31
|
const { t } = useLocaleContext();
|
|
32
32
|
const { session } = useSessionContext();
|
|
33
33
|
const { isMobile } = useMobile();
|
|
34
|
+
const theme = useTheme();
|
|
34
35
|
const isOwner = session?.user?.role === 'owner';
|
|
35
36
|
|
|
36
37
|
const [state, setState] = useSetState({
|
|
@@ -324,7 +325,7 @@ export default function VaultConfig() {
|
|
|
324
325
|
<Link
|
|
325
326
|
key={part.content}
|
|
326
327
|
to={`${window.location.origin}/.well-known/service/admin/operations/advanced`}
|
|
327
|
-
style={{ color:
|
|
328
|
+
style={{ color: theme.palette.text.link }}>
|
|
328
329
|
{part.content}
|
|
329
330
|
</Link>
|
|
330
331
|
)
|
|
@@ -26,7 +26,7 @@ export default function PricingTablePage({ id }: Props) {
|
|
|
26
26
|
theme={undefined}
|
|
27
27
|
hideNavMenu={undefined}
|
|
28
28
|
maxWidth={false}
|
|
29
|
-
sx={{ borderBottom: '1px solid
|
|
29
|
+
sx={{ borderBottom: '1px solid', borderColor: 'grey.100' }}
|
|
30
30
|
/>
|
|
31
31
|
|
|
32
32
|
<Stack
|
|
@@ -233,7 +233,7 @@ const getCardIcon = (type: CardType) => {
|
|
|
233
233
|
balance: <AccountBalanceWalletOutlined color="success" fontSize="small" />,
|
|
234
234
|
spent: <CreditCardOutlined color="warning" fontSize="small" />,
|
|
235
235
|
stake: <AccountBalanceOutlined fontSize="small" color="info" />,
|
|
236
|
-
refund: <AssignmentReturnOutlined fontSize="small" sx={{ color: '
|
|
236
|
+
refund: <AssignmentReturnOutlined fontSize="small" sx={{ color: 'chip.secondary.text' }} />,
|
|
237
237
|
due: <InfoOutlined fontSize="small" color="error" />,
|
|
238
238
|
};
|
|
239
239
|
return iconMap[type];
|
|
@@ -419,7 +419,8 @@ export default function CustomerHome() {
|
|
|
419
419
|
key={c.id}
|
|
420
420
|
sx={{
|
|
421
421
|
pb: 2,
|
|
422
|
-
borderBottom: '1px solid
|
|
422
|
+
borderBottom: '1px solid',
|
|
423
|
+
borderColor: 'grey.100',
|
|
423
424
|
'&:last-child': { borderBottom: 'none', pb: 0 },
|
|
424
425
|
}}>
|
|
425
426
|
<Box alignItems="center" display="flex" gap={1}>
|
|
@@ -478,7 +479,7 @@ export default function CustomerHome() {
|
|
|
478
479
|
top: 0,
|
|
479
480
|
bottom: 0,
|
|
480
481
|
width: '1px',
|
|
481
|
-
backgroundColor: '
|
|
482
|
+
backgroundColor: 'grey.100',
|
|
482
483
|
zIndex: 1,
|
|
483
484
|
},
|
|
484
485
|
'&:has(+ .placeholder)::after': {
|
|
@@ -155,7 +155,7 @@ export default function CustomerInvoiceDetail() {
|
|
|
155
155
|
variant="outlined"
|
|
156
156
|
color="primary"
|
|
157
157
|
size="small"
|
|
158
|
-
sx={{ borderColor: '
|
|
158
|
+
sx={{ borderColor: 'grey.100' }}
|
|
159
159
|
disabled={state.paying}
|
|
160
160
|
onClick={onPay}>
|
|
161
161
|
{t('payment.customer.invoice.pay')}
|
|
@@ -113,7 +113,7 @@ export default function PayoutDetail() {
|
|
|
113
113
|
src={data.paymentCurrency.logo}
|
|
114
114
|
alt={data.paymentCurrency.symbol}
|
|
115
115
|
variant="square"
|
|
116
|
-
sx={{ width: '52px', height: '52px', borderRadius:
|
|
116
|
+
sx={{ width: '52px', height: '52px', borderRadius: 0.5 }}
|
|
117
117
|
/>
|
|
118
118
|
<Stack direction="column" alignItems="flex-start" justifyContent="space-around">
|
|
119
119
|
<Amount amount={total} sx={{ my: 0, fontSize: '1.75rem', lineHeight: '32px' }} />
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
Card,
|
|
14
14
|
CardActionArea,
|
|
15
15
|
Grid,
|
|
16
|
-
Paper,
|
|
17
16
|
Avatar,
|
|
18
17
|
} from '@mui/material';
|
|
19
18
|
import { styled } from '@mui/system';
|
|
@@ -373,7 +372,7 @@ export default function BalanceRechargePage() {
|
|
|
373
372
|
onClick={() => balanceLink && window.open(balanceLink, '_blank')}
|
|
374
373
|
sx={{
|
|
375
374
|
color: 'text.primary',
|
|
376
|
-
borderRadius:
|
|
375
|
+
borderRadius: 1,
|
|
377
376
|
transition: 'all 0.2s ease-in-out',
|
|
378
377
|
cursor: balanceLink ? 'pointer' : 'default',
|
|
379
378
|
position: 'relative',
|
|
@@ -415,7 +414,7 @@ export default function BalanceRechargePage() {
|
|
|
415
414
|
</BalanceCard>
|
|
416
415
|
</Box>
|
|
417
416
|
|
|
418
|
-
<
|
|
417
|
+
<Stack sx={{ mb: 3, backgroundColor: 'background.default', borderRadius: '16px' }}>
|
|
419
418
|
<Grid container spacing={2}>
|
|
420
419
|
{presetAmounts.map(({ amount: presetAmount, label, multiplier }) => (
|
|
421
420
|
<Grid item xs={6} sm={3} key={presetAmount}>
|
|
@@ -498,7 +497,7 @@ export default function BalanceRechargePage() {
|
|
|
498
497
|
</Card>
|
|
499
498
|
</Grid>
|
|
500
499
|
</Grid>
|
|
501
|
-
</
|
|
500
|
+
</Stack>
|
|
502
501
|
|
|
503
502
|
{customAmount && (
|
|
504
503
|
<Box sx={{ mb: 3 }}>
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
Card,
|
|
14
14
|
CardActionArea,
|
|
15
15
|
Grid,
|
|
16
|
-
Paper,
|
|
17
16
|
} from '@mui/material';
|
|
18
17
|
import { styled } from '@mui/system';
|
|
19
18
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
@@ -358,7 +357,7 @@ export default function RechargePage() {
|
|
|
358
357
|
onClick={() => balanceLink && window.open(balanceLink, '_blank')}
|
|
359
358
|
sx={{
|
|
360
359
|
color: 'text.primary',
|
|
361
|
-
borderRadius:
|
|
360
|
+
borderRadius: 1,
|
|
362
361
|
transition: 'all 0.2s ease-in-out',
|
|
363
362
|
cursor: balanceLink ? 'pointer' : 'default',
|
|
364
363
|
position: 'relative',
|
|
@@ -397,7 +396,7 @@ export default function RechargePage() {
|
|
|
397
396
|
</Stack>
|
|
398
397
|
</BalanceCard>
|
|
399
398
|
|
|
400
|
-
<
|
|
399
|
+
<Stack sx={{ mb: 2, mt: 2, backgroundColor: 'background.default' }}>
|
|
401
400
|
<Grid container spacing={2}>
|
|
402
401
|
{presetAmounts.map(({ amount: presetAmount, cycles }) => (
|
|
403
402
|
<Grid item xs={6} sm={4} key={presetAmount}>
|
|
@@ -464,7 +463,7 @@ export default function RechargePage() {
|
|
|
464
463
|
</Card>
|
|
465
464
|
</Grid>
|
|
466
465
|
</Grid>
|
|
467
|
-
</
|
|
466
|
+
</Stack>
|
|
468
467
|
|
|
469
468
|
{customAmount && (
|
|
470
469
|
<Box>
|
|
@@ -329,7 +329,7 @@ export default function SubscriptionEmbed() {
|
|
|
329
329
|
))}
|
|
330
330
|
<Button
|
|
331
331
|
variant="contained"
|
|
332
|
-
sx={{
|
|
332
|
+
sx={{ width: subscription.service_actions?.length ? 'auto' : '100%' }}
|
|
333
333
|
target="_blank"
|
|
334
334
|
href={subscriptionPageUrl}>
|
|
335
335
|
{t('payment.customer.subscriptions.view')}
|
|
@@ -374,7 +374,7 @@ function Position({ children }: any) {
|
|
|
374
374
|
padding: '8px',
|
|
375
375
|
width: '100%',
|
|
376
376
|
maxWidth: '500px',
|
|
377
|
-
|
|
377
|
+
backgroundColor: 'background.paper',
|
|
378
378
|
margin: '0 auto',
|
|
379
379
|
height: '100vh',
|
|
380
380
|
}}>
|