@abtnode/ux 1.16.19-beta-beb58af7 → 1.16.19-beta-0c8ccc95
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/es/blocklet/component/index.js +35 -11
- package/es/locales/en.js +16 -6
- package/es/locales/zh.js +16 -6
- package/es/subscription.js +33 -22
- package/lib/blocklet/component/index.js +25 -12
- package/lib/locales/en.js +16 -6
- package/lib/locales/zh.js +16 -6
- package/lib/subscription.js +37 -26
- package/package.json +17 -17
|
@@ -276,26 +276,39 @@ function ComponentItem({
|
|
|
276
276
|
ancestors: ancestors
|
|
277
277
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
278
278
|
ml: "16px",
|
|
279
|
-
children: [/*#__PURE__*/
|
|
280
|
-
className: "component-
|
|
279
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
280
|
+
className: "component-header",
|
|
281
281
|
onClick: () => setComponentInfo(blocklet),
|
|
282
|
-
children:
|
|
282
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
283
|
+
className: "component-name",
|
|
284
|
+
children: getDisplayName(blocklet, true)
|
|
285
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
286
|
+
className: "component-version",
|
|
287
|
+
children: blocklet?.meta?.version
|
|
288
|
+
})]
|
|
283
289
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
284
290
|
display: "flex",
|
|
285
291
|
alignItems: "center",
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
292
|
+
sx: {
|
|
293
|
+
mt: '2px',
|
|
294
|
+
ml: -0.5
|
|
295
|
+
},
|
|
296
|
+
children: [status !== 'unknown' && /*#__PURE__*/_jsx(BlockletStatus, {
|
|
289
297
|
style: {
|
|
290
298
|
marginLeft: 4
|
|
291
299
|
},
|
|
292
|
-
|
|
293
|
-
|
|
300
|
+
status: status,
|
|
301
|
+
source: blocklet.source
|
|
302
|
+
}), !hasStartEngine(blocklet.meta) && /*#__PURE__*/_jsx(ResourceType, {
|
|
294
303
|
style: {
|
|
295
304
|
marginLeft: 4
|
|
296
305
|
},
|
|
297
|
-
|
|
298
|
-
|
|
306
|
+
blocklet: blocklet
|
|
307
|
+
}), /*#__PURE__*/_jsx(BlockletMode, {
|
|
308
|
+
style: {
|
|
309
|
+
marginLeft: 4
|
|
310
|
+
},
|
|
311
|
+
mode: blocklet.mode || ''
|
|
299
312
|
}), !!blocklet.dependents?.length && /*#__PURE__*/_jsx(Tooltip, {
|
|
300
313
|
title: [`${t('common.dependents')}: `, blocklet.dependents.map(x => /*#__PURE__*/_jsx(Box, {
|
|
301
314
|
pl: 1,
|
|
@@ -497,10 +510,21 @@ const StyledBadge = styled(Badge)`
|
|
|
497
510
|
}
|
|
498
511
|
`;
|
|
499
512
|
const StyledComponentRow = styled(Box)`
|
|
513
|
+
.component-header {
|
|
514
|
+
display: flex;
|
|
515
|
+
align-items: center;
|
|
516
|
+
align-items: flex-end;
|
|
517
|
+
cursor: pointer;
|
|
518
|
+
}
|
|
500
519
|
.component-name {
|
|
501
520
|
color: #222;
|
|
502
521
|
font-size: 16px;
|
|
503
|
-
|
|
522
|
+
}
|
|
523
|
+
.component-version {
|
|
524
|
+
color: #999;
|
|
525
|
+
font-size: 12px;
|
|
526
|
+
margin-left: 4px;
|
|
527
|
+
transform: translateY(-1px);
|
|
504
528
|
}
|
|
505
529
|
`;
|
|
506
530
|
export default function BlockletComponent({
|
package/es/locales/en.js
CHANGED
|
@@ -1594,13 +1594,23 @@ module.exports = {
|
|
|
1594
1594
|
federated: 'Federated Login'
|
|
1595
1595
|
},
|
|
1596
1596
|
expiration: {
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1597
|
+
mobile: {
|
|
1598
|
+
tips: {
|
|
1599
|
+
success: '{validity}',
|
|
1600
|
+
warning: '{validity}',
|
|
1601
|
+
error: 'Expired'
|
|
1602
|
+
},
|
|
1603
|
+
loadFailed: 'Retry!'
|
|
1601
1604
|
},
|
|
1602
|
-
|
|
1603
|
-
|
|
1605
|
+
desktop: {
|
|
1606
|
+
tips: {
|
|
1607
|
+
success: 'Subscription will expire after {validity}',
|
|
1608
|
+
warning: 'Subscription will expire after {validity}',
|
|
1609
|
+
error: 'Subscription Expired'
|
|
1610
|
+
},
|
|
1611
|
+
loading: 'Load subscription...',
|
|
1612
|
+
loadFailed: 'Failed to load subscription info, please retry!'
|
|
1613
|
+
}
|
|
1604
1614
|
},
|
|
1605
1615
|
analytics: {
|
|
1606
1616
|
trend: 'Trends',
|
package/es/locales/zh.js
CHANGED
|
@@ -1598,13 +1598,23 @@ module.exports = {
|
|
|
1598
1598
|
federated: '统一登录'
|
|
1599
1599
|
},
|
|
1600
1600
|
expiration: {
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1601
|
+
mobile: {
|
|
1602
|
+
tips: {
|
|
1603
|
+
success: '{validity}',
|
|
1604
|
+
warning: '{validity}',
|
|
1605
|
+
error: '订阅已过期'
|
|
1606
|
+
},
|
|
1607
|
+
loadFailed: '请重试!'
|
|
1605
1608
|
},
|
|
1606
|
-
|
|
1607
|
-
|
|
1609
|
+
desktop: {
|
|
1610
|
+
tips: {
|
|
1611
|
+
success: '订阅将在{validity}后到期',
|
|
1612
|
+
warning: '订阅将在{validity}后到期',
|
|
1613
|
+
error: '订阅已过期'
|
|
1614
|
+
},
|
|
1615
|
+
loadFailed: '加载订阅信息失败,请重试!',
|
|
1616
|
+
loading: '加载订阅信息...'
|
|
1617
|
+
}
|
|
1608
1618
|
},
|
|
1609
1619
|
analytics: {
|
|
1610
1620
|
trend: '趋势',
|
package/es/subscription.js
CHANGED
|
@@ -10,6 +10,7 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import { useRef } from 'react';
|
|
11
11
|
import useAsyncRetry from 'react-use/lib/useAsyncRetry';
|
|
12
12
|
import useSetState from 'react-use/lib/useSetState';
|
|
13
|
+
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
13
14
|
import { formatPrettyMsLocale, getAsset, getAssetExpiration, getSubscriptionURL } from './util';
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -17,6 +18,21 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
17
18
|
const ALERT_THRESHOLD_MS = 30 * 24 * 60 * 60 * 1000;
|
|
18
19
|
const DEFAULT_LAUNCHER_URL = 'https://launcher.arcblock.io/'; // 兼容: 旧版本的 blocklet.controller 没有 launcherUrl 字段
|
|
19
20
|
|
|
21
|
+
// eslint-disable-next-line react/prop-types
|
|
22
|
+
function ChipLabel({
|
|
23
|
+
children
|
|
24
|
+
}) {
|
|
25
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
26
|
+
sx: {
|
|
27
|
+
display: 'flex',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
gap: 1
|
|
30
|
+
},
|
|
31
|
+
children: [/*#__PURE__*/_jsx(AccessTimeIcon, {
|
|
32
|
+
fontSize: "small"
|
|
33
|
+
}), children]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
20
36
|
function Subscription({
|
|
21
37
|
launcherUrl,
|
|
22
38
|
chainHost,
|
|
@@ -33,10 +49,12 @@ function Subscription({
|
|
|
33
49
|
popoverAnchorEl: null
|
|
34
50
|
});
|
|
35
51
|
const iframeRef = useRef(null);
|
|
52
|
+
const isMobile = useMediaQuery(x => x.breakpoints.down('md'));
|
|
36
53
|
const {
|
|
37
54
|
sx = {},
|
|
38
55
|
...rest
|
|
39
56
|
} = props;
|
|
57
|
+
const typoKey = isMobile ? 'mobile' : 'desktop';
|
|
40
58
|
const asyncState = useAsyncRetry(async () => {
|
|
41
59
|
const [asset, subscriptionURL] = await Promise.all([getAsset(chainHost, nftId), getSubscriptionURL({
|
|
42
60
|
launcherUrl: launcherUrl || DEFAULT_LAUNCHER_URL,
|
|
@@ -49,24 +67,26 @@ function Subscription({
|
|
|
49
67
|
};
|
|
50
68
|
}, [locale]);
|
|
51
69
|
if (asyncState.loading) {
|
|
52
|
-
return /*#__PURE__*/
|
|
70
|
+
return /*#__PURE__*/_jsx(Chip, {
|
|
71
|
+
label: /*#__PURE__*/_jsxs(ChipLabel, {
|
|
72
|
+
children: [!isMobile && t('expiration.desktop.loading'), /*#__PURE__*/_jsx(CircularProgress, {
|
|
73
|
+
size: 16
|
|
74
|
+
})]
|
|
75
|
+
}),
|
|
76
|
+
variant: "success",
|
|
53
77
|
sx: {
|
|
54
|
-
|
|
55
|
-
alignItems: 'center',
|
|
56
|
-
color: 'grey',
|
|
57
|
-
gap: 1,
|
|
78
|
+
cursor: 'pointer',
|
|
58
79
|
...sx
|
|
59
80
|
},
|
|
60
|
-
...rest
|
|
61
|
-
children: [/*#__PURE__*/_jsx(CircularProgress, {
|
|
62
|
-
size: 16
|
|
63
|
-
}), t('expiration.loading')]
|
|
81
|
+
...rest
|
|
64
82
|
});
|
|
65
83
|
}
|
|
66
84
|
if (asyncState.error) {
|
|
67
85
|
console.error(asyncState.error);
|
|
68
86
|
return /*#__PURE__*/_jsx(Chip, {
|
|
69
|
-
label:
|
|
87
|
+
label: /*#__PURE__*/_jsx(ChipLabel, {
|
|
88
|
+
children: t(`expiration.${typoKey}.loadFailed`)
|
|
89
|
+
}),
|
|
70
90
|
color: "error",
|
|
71
91
|
variant: "success",
|
|
72
92
|
sx: {
|
|
@@ -99,23 +119,14 @@ function Subscription({
|
|
|
99
119
|
};
|
|
100
120
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
101
121
|
children: [/*#__PURE__*/_jsx(Chip, {
|
|
102
|
-
label: /*#__PURE__*/
|
|
103
|
-
|
|
104
|
-
display: 'flex',
|
|
105
|
-
alignItems: 'center'
|
|
106
|
-
},
|
|
107
|
-
children: [/*#__PURE__*/_jsx(AccessTimeIcon, {
|
|
108
|
-
sx: {
|
|
109
|
-
mr: '4px'
|
|
110
|
-
},
|
|
111
|
-
fontSize: "small"
|
|
112
|
-
}), t(`expiration.tips.${status}`, {
|
|
122
|
+
label: /*#__PURE__*/_jsx(ChipLabel, {
|
|
123
|
+
children: t(`expiration.${typoKey}.tips.${status}`, {
|
|
113
124
|
validity: prettyMs(validityMs, {
|
|
114
125
|
locale: formatPrettyMsLocale(locale),
|
|
115
126
|
compact: true,
|
|
116
127
|
verbose: true
|
|
117
128
|
})
|
|
118
|
-
})
|
|
129
|
+
})
|
|
119
130
|
}),
|
|
120
131
|
color: status,
|
|
121
132
|
variant: status !== 'success' ? 'contained' : 'outlined',
|
|
@@ -139,7 +139,7 @@ const getComponentName = (componentId, app) => {
|
|
|
139
139
|
return names.join(' / ');
|
|
140
140
|
};
|
|
141
141
|
function ComponentItem(_ref) {
|
|
142
|
-
var _blocklet$dependents, _blocklet$meta$resour, _blocklet$dependents2, _blocklet$dependents3;
|
|
142
|
+
var _blocklet$dependents, _blocklet$meta$resour, _blocklet$dependents2, _blocklet$meta, _blocklet$dependents3;
|
|
143
143
|
let {
|
|
144
144
|
blocklet,
|
|
145
145
|
ancestors,
|
|
@@ -299,26 +299,39 @@ function ComponentItem(_ref) {
|
|
|
299
299
|
ancestors: ancestors
|
|
300
300
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
301
301
|
ml: "16px",
|
|
302
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
303
|
-
className: "component-
|
|
302
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
303
|
+
className: "component-header",
|
|
304
304
|
onClick: () => setComponentInfo(blocklet),
|
|
305
|
-
children: (0,
|
|
305
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
306
|
+
className: "component-name",
|
|
307
|
+
children: (0, _util.getDisplayName)(blocklet, true)
|
|
308
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
309
|
+
className: "component-version",
|
|
310
|
+
children: blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta = blocklet.meta) === null || _blocklet$meta === void 0 ? void 0 : _blocklet$meta.version
|
|
311
|
+
})]
|
|
306
312
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
307
313
|
display: "flex",
|
|
308
314
|
alignItems: "center",
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
315
|
+
sx: {
|
|
316
|
+
mt: '2px',
|
|
317
|
+
ml: -0.5
|
|
318
|
+
},
|
|
319
|
+
children: [status !== 'unknown' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_status.default, {
|
|
312
320
|
style: {
|
|
313
321
|
marginLeft: 4
|
|
314
322
|
},
|
|
315
|
-
|
|
316
|
-
|
|
323
|
+
status: status,
|
|
324
|
+
source: blocklet.source
|
|
325
|
+
}), !(0, _util.hasStartEngine)(blocklet.meta) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_resourceType.default, {
|
|
317
326
|
style: {
|
|
318
327
|
marginLeft: 4
|
|
319
328
|
},
|
|
320
|
-
|
|
321
|
-
|
|
329
|
+
blocklet: blocklet
|
|
330
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_mode.default, {
|
|
331
|
+
style: {
|
|
332
|
+
marginLeft: 4
|
|
333
|
+
},
|
|
334
|
+
mode: blocklet.mode || ''
|
|
322
335
|
}), !!((_blocklet$dependents3 = blocklet.dependents) !== null && _blocklet$dependents3 !== void 0 && _blocklet$dependents3.length) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
323
336
|
title: ["".concat(t('common.dependents'), ": "), blocklet.dependents.map(x => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
324
337
|
pl: 1,
|
|
@@ -517,7 +530,7 @@ ComponentItem.defaultProps = {
|
|
|
517
530
|
app: null
|
|
518
531
|
};
|
|
519
532
|
const StyledBadge = (0, _styled.default)(_Badge.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .BaseBadge-badge {\n top: ", "px;\n right: ", "px;\n }\n"])), props => props.top * 8 || 6, props => props.right * 8 || 6);
|
|
520
|
-
const StyledComponentRow = (0, _styled.default)(_Box.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .component-name {\n color: #222;\n font-size: 16px;\n
|
|
533
|
+
const StyledComponentRow = (0, _styled.default)(_Box.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .component-header {\n display: flex;\n align-items: center;\n align-items: flex-end;\n cursor: pointer;\n }\n .component-name {\n color: #222;\n font-size: 16px;\n }\n .component-version {\n color: #999;\n font-size: 12px;\n margin-left: 4px;\n transform: translateY(-1px);\n }\n"])));
|
|
521
534
|
function BlockletComponent(_ref4) {
|
|
522
535
|
let {
|
|
523
536
|
blocklet,
|
package/lib/locales/en.js
CHANGED
|
@@ -1596,13 +1596,23 @@ module.exports = {
|
|
|
1596
1596
|
federated: 'Federated Login'
|
|
1597
1597
|
},
|
|
1598
1598
|
expiration: {
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1599
|
+
mobile: {
|
|
1600
|
+
tips: {
|
|
1601
|
+
success: '{validity}',
|
|
1602
|
+
warning: '{validity}',
|
|
1603
|
+
error: 'Expired'
|
|
1604
|
+
},
|
|
1605
|
+
loadFailed: 'Retry!'
|
|
1603
1606
|
},
|
|
1604
|
-
|
|
1605
|
-
|
|
1607
|
+
desktop: {
|
|
1608
|
+
tips: {
|
|
1609
|
+
success: 'Subscription will expire after {validity}',
|
|
1610
|
+
warning: 'Subscription will expire after {validity}',
|
|
1611
|
+
error: 'Subscription Expired'
|
|
1612
|
+
},
|
|
1613
|
+
loading: 'Load subscription...',
|
|
1614
|
+
loadFailed: 'Failed to load subscription info, please retry!'
|
|
1615
|
+
}
|
|
1606
1616
|
},
|
|
1607
1617
|
analytics: {
|
|
1608
1618
|
trend: 'Trends',
|
package/lib/locales/zh.js
CHANGED
|
@@ -1600,13 +1600,23 @@ module.exports = {
|
|
|
1600
1600
|
federated: '统一登录'
|
|
1601
1601
|
},
|
|
1602
1602
|
expiration: {
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1603
|
+
mobile: {
|
|
1604
|
+
tips: {
|
|
1605
|
+
success: '{validity}',
|
|
1606
|
+
warning: '{validity}',
|
|
1607
|
+
error: '订阅已过期'
|
|
1608
|
+
},
|
|
1609
|
+
loadFailed: '请重试!'
|
|
1607
1610
|
},
|
|
1608
|
-
|
|
1609
|
-
|
|
1611
|
+
desktop: {
|
|
1612
|
+
tips: {
|
|
1613
|
+
success: '订阅将在{validity}后到期',
|
|
1614
|
+
warning: '订阅将在{validity}后到期',
|
|
1615
|
+
error: '订阅已过期'
|
|
1616
|
+
},
|
|
1617
|
+
loadFailed: '加载订阅信息失败,请重试!',
|
|
1618
|
+
loading: '加载订阅信息...'
|
|
1619
|
+
}
|
|
1610
1620
|
},
|
|
1611
1621
|
analytics: {
|
|
1612
1622
|
trend: '趋势',
|
package/lib/subscription.js
CHANGED
|
@@ -16,6 +16,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
16
16
|
var _react = require("react");
|
|
17
17
|
var _useAsyncRetry = _interopRequireDefault(require("react-use/lib/useAsyncRetry"));
|
|
18
18
|
var _useSetState = _interopRequireDefault(require("react-use/lib/useSetState"));
|
|
19
|
+
var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
|
|
19
20
|
var _util = require("./util");
|
|
20
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
22
|
const _excluded = ["launcherUrl", "chainHost", "nftId", "retention"],
|
|
@@ -31,15 +32,31 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
31
32
|
const ALERT_THRESHOLD_MS = 30 * 24 * 60 * 60 * 1000;
|
|
32
33
|
const DEFAULT_LAUNCHER_URL = 'https://launcher.arcblock.io/'; // 兼容: 旧版本的 blocklet.controller 没有 launcherUrl 字段
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
// eslint-disable-next-line react/prop-types
|
|
36
|
+
function ChipLabel(_ref) {
|
|
37
|
+
let {
|
|
38
|
+
children
|
|
39
|
+
} = _ref;
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
41
|
+
sx: {
|
|
42
|
+
display: 'flex',
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
gap: 1
|
|
45
|
+
},
|
|
46
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AccessTime.default, {
|
|
47
|
+
fontSize: "small"
|
|
48
|
+
}), children]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function Subscription(_ref2) {
|
|
35
52
|
var _asyncState$value, _asyncState$value2;
|
|
36
53
|
let {
|
|
37
54
|
launcherUrl,
|
|
38
55
|
chainHost,
|
|
39
56
|
nftId,
|
|
40
57
|
retention
|
|
41
|
-
} =
|
|
42
|
-
props = _objectWithoutProperties(
|
|
58
|
+
} = _ref2,
|
|
59
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
43
60
|
const {
|
|
44
61
|
t,
|
|
45
62
|
locale
|
|
@@ -49,10 +66,12 @@ function Subscription(_ref) {
|
|
|
49
66
|
popoverAnchorEl: null
|
|
50
67
|
});
|
|
51
68
|
const iframeRef = (0, _react.useRef)(null);
|
|
69
|
+
const isMobile = (0, _useMediaQuery.default)(x => x.breakpoints.down('md'));
|
|
52
70
|
const {
|
|
53
71
|
sx = {}
|
|
54
72
|
} = props,
|
|
55
73
|
rest = _objectWithoutProperties(props, _excluded2);
|
|
74
|
+
const typoKey = isMobile ? 'mobile' : 'desktop';
|
|
56
75
|
const asyncState = (0, _useAsyncRetry.default)(async () => {
|
|
57
76
|
const [asset, subscriptionURL] = await Promise.all([(0, _util.getAsset)(chainHost, nftId), (0, _util.getSubscriptionURL)({
|
|
58
77
|
launcherUrl: launcherUrl || DEFAULT_LAUNCHER_URL,
|
|
@@ -65,23 +84,24 @@ function Subscription(_ref) {
|
|
|
65
84
|
};
|
|
66
85
|
}, [locale]);
|
|
67
86
|
if (asyncState.loading) {
|
|
68
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
87
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, _objectSpread({
|
|
88
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(ChipLabel, {
|
|
89
|
+
children: [!isMobile && t('expiration.desktop.loading'), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
|
|
90
|
+
size: 16
|
|
91
|
+
})]
|
|
92
|
+
}),
|
|
93
|
+
variant: "success",
|
|
69
94
|
sx: _objectSpread({
|
|
70
|
-
|
|
71
|
-
alignItems: 'center',
|
|
72
|
-
color: 'grey',
|
|
73
|
-
gap: 1
|
|
95
|
+
cursor: 'pointer'
|
|
74
96
|
}, sx)
|
|
75
|
-
}, rest)
|
|
76
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
|
|
77
|
-
size: 16
|
|
78
|
-
}), t('expiration.loading')]
|
|
79
|
-
}));
|
|
97
|
+
}, rest));
|
|
80
98
|
}
|
|
81
99
|
if (asyncState.error) {
|
|
82
100
|
console.error(asyncState.error);
|
|
83
101
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, _objectSpread(_objectSpread({
|
|
84
|
-
label:
|
|
102
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChipLabel, {
|
|
103
|
+
children: t("expiration.".concat(typoKey, ".loadFailed"))
|
|
104
|
+
}),
|
|
85
105
|
color: "error",
|
|
86
106
|
variant: "success",
|
|
87
107
|
sx: _objectSpread({
|
|
@@ -113,23 +133,14 @@ function Subscription(_ref) {
|
|
|
113
133
|
};
|
|
114
134
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
115
135
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, _objectSpread(_objectSpread({
|
|
116
|
-
label: /*#__PURE__*/(0, _jsxRuntime.
|
|
117
|
-
|
|
118
|
-
display: 'flex',
|
|
119
|
-
alignItems: 'center'
|
|
120
|
-
},
|
|
121
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AccessTime.default, {
|
|
122
|
-
sx: {
|
|
123
|
-
mr: '4px'
|
|
124
|
-
},
|
|
125
|
-
fontSize: "small"
|
|
126
|
-
}), t("expiration.tips.".concat(status), {
|
|
136
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChipLabel, {
|
|
137
|
+
children: t("expiration.".concat(typoKey, ".tips.").concat(status), {
|
|
127
138
|
validity: (0, _prettyMsI18n.default)(validityMs, {
|
|
128
139
|
locale: (0, _util.formatPrettyMsLocale)(locale),
|
|
129
140
|
compact: true,
|
|
130
141
|
verbose: true
|
|
131
142
|
})
|
|
132
|
-
})
|
|
143
|
+
})
|
|
133
144
|
}),
|
|
134
145
|
color: status,
|
|
135
146
|
variant: status !== 'success' ? 'contained' : 'outlined',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.19-beta-
|
|
3
|
+
"version": "1.16.19-beta-0c8ccc95",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -27,24 +27,24 @@
|
|
|
27
27
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@abtnode/auth": "1.16.19-beta-
|
|
31
|
-
"@abtnode/constant": "1.16.19-beta-
|
|
32
|
-
"@abtnode/util": "1.16.19-beta-
|
|
30
|
+
"@abtnode/auth": "1.16.19-beta-0c8ccc95",
|
|
31
|
+
"@abtnode/constant": "1.16.19-beta-0c8ccc95",
|
|
32
|
+
"@abtnode/util": "1.16.19-beta-0c8ccc95",
|
|
33
33
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
34
34
|
"@arcblock/did": "^1.18.101",
|
|
35
|
-
"@arcblock/did-connect": "^2.8.
|
|
35
|
+
"@arcblock/did-connect": "^2.8.18",
|
|
36
36
|
"@arcblock/did-motif": "^1.1.13",
|
|
37
|
-
"@arcblock/icons": "^2.8.
|
|
38
|
-
"@arcblock/nft-display": "2.8.
|
|
39
|
-
"@arcblock/react-hooks": "^2.8.
|
|
40
|
-
"@arcblock/terminal": "^2.8.
|
|
41
|
-
"@arcblock/ux": "^2.8.
|
|
42
|
-
"@blocklet/constant": "1.16.19-beta-
|
|
43
|
-
"@blocklet/launcher-layout": "2.2.
|
|
44
|
-
"@blocklet/list": "^0.12.
|
|
45
|
-
"@blocklet/meta": "1.16.19-beta-
|
|
46
|
-
"@blocklet/ui-react": "^2.8.
|
|
47
|
-
"@blocklet/uploader": "^0.0.
|
|
37
|
+
"@arcblock/icons": "^2.8.18",
|
|
38
|
+
"@arcblock/nft-display": "2.8.18",
|
|
39
|
+
"@arcblock/react-hooks": "^2.8.18",
|
|
40
|
+
"@arcblock/terminal": "^2.8.18",
|
|
41
|
+
"@arcblock/ux": "^2.8.18",
|
|
42
|
+
"@blocklet/constant": "1.16.19-beta-0c8ccc95",
|
|
43
|
+
"@blocklet/launcher-layout": "2.2.44",
|
|
44
|
+
"@blocklet/list": "^0.12.54",
|
|
45
|
+
"@blocklet/meta": "1.16.19-beta-0c8ccc95",
|
|
46
|
+
"@blocklet/ui-react": "^2.8.18",
|
|
47
|
+
"@blocklet/uploader": "^0.0.47",
|
|
48
48
|
"@emotion/react": "^11.10.4",
|
|
49
49
|
"@emotion/styled": "^11.10.4",
|
|
50
50
|
"@iconify/react": "^4.0.0",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"babel-plugin-inline-react-svg": "^1.1.2",
|
|
101
101
|
"glob": "^10.3.3"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "ac7746e282b6690a4ff8487c8e43a7055e383b15",
|
|
104
104
|
"exports": {
|
|
105
105
|
".": {
|
|
106
106
|
"import": "./es/index.js",
|