@abtnode/ux 1.16.17-beta-952ef53d → 1.16.17-beta-d81014f4
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/actions.js +1 -2
- package/es/blocklet/component/add.js +1 -1
- package/es/blocklet/component/domain-list.js +280 -158
- package/es/blocklet/component/index.js +0 -1
- package/es/blocklet/config-navigation.js +34 -10
- package/es/blocklet/router/domain-status.js +0 -1
- package/es/certificate.js +0 -1
- package/es/dot.js +2 -2
- package/es/locales/en.js +7 -1
- package/es/locales/zh.js +8 -2
- package/es/lost-passport.js +39 -37
- package/es/team/passports/index.js +8 -2
- package/lib/blocklet/actions.js +1 -2
- package/lib/blocklet/component/add.js +1 -1
- package/lib/blocklet/component/domain-list.js +292 -169
- package/lib/blocklet/component/index.js +1 -1
- package/lib/blocklet/config-navigation.js +34 -10
- package/lib/blocklet/router/domain-status.js +0 -1
- package/lib/certificate.js +0 -1
- package/lib/dot.js +1 -1
- package/lib/locales/en.js +7 -1
- package/lib/locales/zh.js +8 -2
- package/lib/lost-passport.js +39 -36
- package/lib/team/passports/index.js +8 -2
- package/package.json +17 -17
|
@@ -11,6 +11,7 @@ var _ButtonGroup = _interopRequireDefault(require("@mui/material/ButtonGroup"));
|
|
|
11
11
|
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
12
12
|
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
|
|
13
13
|
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
14
|
+
var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
|
|
14
15
|
var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
|
|
15
16
|
var _Select = _interopRequireDefault(require("@mui/material/Select"));
|
|
16
17
|
var _Toolbar = _interopRequireDefault(require("@mui/material/Toolbar"));
|
|
@@ -78,6 +79,7 @@ function ConfigNavigation() {
|
|
|
78
79
|
const {
|
|
79
80
|
roles
|
|
80
81
|
} = (0, _team.useTeamContext)();
|
|
82
|
+
const isMobile = (0, _useMediaQuery.default)(theme => theme.breakpoints.down('md'));
|
|
81
83
|
const pageState = (0, _ahooks.useReactive)({
|
|
82
84
|
saveLoading: false,
|
|
83
85
|
resetLoading: false,
|
|
@@ -148,7 +150,7 @@ function ConfigNavigation() {
|
|
|
148
150
|
try {
|
|
149
151
|
pageState.resetLoading = true;
|
|
150
152
|
await resetNavigation();
|
|
151
|
-
_Toast.default.success('
|
|
153
|
+
_Toast.default.success(t('navigation.action.resetSuccessful'), {
|
|
152
154
|
variant: 'success'
|
|
153
155
|
});
|
|
154
156
|
} catch (e) {
|
|
@@ -177,7 +179,16 @@ function ConfigNavigation() {
|
|
|
177
179
|
};
|
|
178
180
|
}, [blocklet.appDid, pageState.mockRole]);
|
|
179
181
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
180
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
182
|
+
children: [isMobile && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select.default, {
|
|
183
|
+
fullWidth: true,
|
|
184
|
+
size: "small",
|
|
185
|
+
value: navigationState.activeSection,
|
|
186
|
+
onChange: event => updateActiveSection(event.target.value),
|
|
187
|
+
children: Object.keys(navigationTypeMap).map(key => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MenuItem.default, {
|
|
188
|
+
value: key,
|
|
189
|
+
children: [navigationTypeMap[key], " (".concat(getNavigation(key).length, ")")]
|
|
190
|
+
}))
|
|
191
|
+
}), !isMobile && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonGroup.default, {
|
|
181
192
|
variant: "outlined",
|
|
182
193
|
children: Object.keys(navigationTypeMap).map(key => {
|
|
183
194
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Button.default, {
|
|
@@ -199,7 +210,7 @@ function ConfigNavigation() {
|
|
|
199
210
|
sx: {
|
|
200
211
|
flexGrow: 1
|
|
201
212
|
},
|
|
202
|
-
children:
|
|
213
|
+
children: t('common.config')
|
|
203
214
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonGroup.default, {
|
|
204
215
|
variant: "outlined",
|
|
205
216
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoadingButton.default, {
|
|
@@ -217,7 +228,7 @@ function ConfigNavigation() {
|
|
|
217
228
|
onClick: () => {
|
|
218
229
|
pageState.showResetConfirm = true;
|
|
219
230
|
},
|
|
220
|
-
children:
|
|
231
|
+
children: t('navigation.action.reset')
|
|
221
232
|
})
|
|
222
233
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ButtonGroup.default, {
|
|
223
234
|
variant: "outlined",
|
|
@@ -228,7 +239,7 @@ function ConfigNavigation() {
|
|
|
228
239
|
icon: "mdi:plus"
|
|
229
240
|
}),
|
|
230
241
|
onClick: () => handleAddNavigation(),
|
|
231
|
-
children:
|
|
242
|
+
children: t('navigation.action.new')
|
|
232
243
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoadingButton.default, {
|
|
233
244
|
size: "small",
|
|
234
245
|
variant: "contained",
|
|
@@ -238,7 +249,7 @@ function ConfigNavigation() {
|
|
|
238
249
|
loading: pageState.saveLoading,
|
|
239
250
|
loadingPosition: "start",
|
|
240
251
|
onClick: handleSaveNavigation,
|
|
241
|
-
children:
|
|
252
|
+
children: t('common.save')
|
|
242
253
|
})]
|
|
243
254
|
})]
|
|
244
255
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Paper.default, {
|
|
@@ -304,7 +315,7 @@ function ConfigNavigation() {
|
|
|
304
315
|
sx: {
|
|
305
316
|
flexGrow: 1
|
|
306
317
|
},
|
|
307
|
-
children:
|
|
318
|
+
children: t('common.preview')
|
|
308
319
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FormControl.default, {
|
|
309
320
|
sx: {
|
|
310
321
|
m: 1,
|
|
@@ -312,7 +323,7 @@ function ConfigNavigation() {
|
|
|
312
323
|
},
|
|
313
324
|
size: "small",
|
|
314
325
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_InputLabel.default, {
|
|
315
|
-
children:
|
|
326
|
+
children: t('common.role')
|
|
316
327
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select.default, {
|
|
317
328
|
value: pageState.mockRole,
|
|
318
329
|
label: "Role",
|
|
@@ -339,8 +350,21 @@ function ConfigNavigation() {
|
|
|
339
350
|
components: navigationState.components,
|
|
340
351
|
rawNavigations: navigationState.rawNavigation
|
|
341
352
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.Confirm, {
|
|
353
|
+
confirmButton: {
|
|
354
|
+
text: t('common.confirm'),
|
|
355
|
+
props: {
|
|
356
|
+
variant: 'contained',
|
|
357
|
+
color: 'error'
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
cancelButton: {
|
|
361
|
+
text: t('common.cancel'),
|
|
362
|
+
props: {
|
|
363
|
+
color: 'primary'
|
|
364
|
+
}
|
|
365
|
+
},
|
|
342
366
|
open: pageState.showResetConfirm,
|
|
343
|
-
title:
|
|
367
|
+
title: t('navigation.action.restConfirmTitle'),
|
|
344
368
|
onConfirm: async () => {
|
|
345
369
|
await handleResetNavigation();
|
|
346
370
|
pageState.showResetConfirm = false;
|
|
@@ -349,7 +373,7 @@ function ConfigNavigation() {
|
|
|
349
373
|
pageState.showResetConfirm = false;
|
|
350
374
|
},
|
|
351
375
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
352
|
-
children:
|
|
376
|
+
children: t('navigation.action.restConfirmDesc')
|
|
353
377
|
})
|
|
354
378
|
})]
|
|
355
379
|
});
|
package/lib/certificate.js
CHANGED
package/lib/dot.js
CHANGED
|
@@ -13,6 +13,6 @@ const color = {
|
|
|
13
13
|
error: '#D0021B'
|
|
14
14
|
};
|
|
15
15
|
const defaultSize = '10px';
|
|
16
|
-
const Dot = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n width: ", ";\n height: ", ";\n background: ", ";\n border-radius: 100%;\n"])), props => props.size || defaultSize, props => props.size || defaultSize, props => color[props.color] || props.color || color.success);
|
|
16
|
+
const Dot = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n min-width: ", ";\n min-height: ", ";\n background: ", ";\n border-radius: 100%;\n"])), props => props.size || defaultSize, props => props.size || defaultSize, props => color[props.color] || props.color || color.success);
|
|
17
17
|
var _default = Dot;
|
|
18
18
|
exports.default = _default;
|
package/lib/locales/en.js
CHANGED
|
@@ -233,6 +233,7 @@ module.exports = {
|
|
|
233
233
|
port: 'Port',
|
|
234
234
|
pre: 'Previous',
|
|
235
235
|
preferences: 'Preferences',
|
|
236
|
+
preview: 'Preview',
|
|
236
237
|
protected: 'Protected',
|
|
237
238
|
protocol: 'Protocol',
|
|
238
239
|
publish: 'Publish',
|
|
@@ -1432,9 +1433,14 @@ module.exports = {
|
|
|
1432
1433
|
hide: 'Hide navigation',
|
|
1433
1434
|
show: 'Show navigation',
|
|
1434
1435
|
del: 'Delete navigation',
|
|
1436
|
+
new: 'New',
|
|
1435
1437
|
noAddSub: "Uninstalled component can't add sub navigation",
|
|
1436
1438
|
noEdit: "Uninstalled component can't edit",
|
|
1437
|
-
noDel: 'Not allowed delete built-in navigation'
|
|
1439
|
+
noDel: 'Not allowed delete built-in navigation',
|
|
1440
|
+
reset: 'Reset',
|
|
1441
|
+
restConfirmTitle: 'Do you want to clear all custom navigation?',
|
|
1442
|
+
restConfirmDesc: "After clearing, the navigation will be restored to Blocklet's original default configuration.",
|
|
1443
|
+
resetSuccessful: 'Reset successful'
|
|
1438
1444
|
}
|
|
1439
1445
|
},
|
|
1440
1446
|
storage: {
|
package/lib/locales/zh.js
CHANGED
|
@@ -238,6 +238,7 @@ module.exports = {
|
|
|
238
238
|
port: '端口',
|
|
239
239
|
pre: '上一步',
|
|
240
240
|
preferences: '偏好',
|
|
241
|
+
preview: '预览',
|
|
241
242
|
protected: '受保护',
|
|
242
243
|
protocol: '协议',
|
|
243
244
|
publish: '发布',
|
|
@@ -1409,8 +1410,8 @@ module.exports = {
|
|
|
1409
1410
|
}
|
|
1410
1411
|
},
|
|
1411
1412
|
navigation: {
|
|
1412
|
-
navigation: '导航',
|
|
1413
1413
|
actionFailed: '操作失败',
|
|
1414
|
+
navigation: '导航',
|
|
1414
1415
|
form: {
|
|
1415
1416
|
title: '标题',
|
|
1416
1417
|
titlePlaceholder: '请输入导航标题',
|
|
@@ -1437,9 +1438,14 @@ module.exports = {
|
|
|
1437
1438
|
hide: '隐藏导航',
|
|
1438
1439
|
show: '显示导航',
|
|
1439
1440
|
del: '删除导航',
|
|
1441
|
+
new: '新建',
|
|
1440
1442
|
noAddSub: '未安装组件无法添加子导航',
|
|
1441
1443
|
noEdit: '未安装组件的导航无法编辑',
|
|
1442
|
-
noDel: '内置的导航无法删除'
|
|
1444
|
+
noDel: '内置的导航无法删除',
|
|
1445
|
+
reset: '重置',
|
|
1446
|
+
restConfirmTitle: '是否清空所有自定义导航?',
|
|
1447
|
+
restConfirmDesc: '清空后,导航会恢复到 Blocklet 原有默认的配置.',
|
|
1448
|
+
resetSuccessful: '重置成功'
|
|
1443
1449
|
}
|
|
1444
1450
|
},
|
|
1445
1451
|
storage: {
|
package/lib/lost-passport.js
CHANGED
|
@@ -23,6 +23,7 @@ var _context = require("@arcblock/ux/lib/Locale/context");
|
|
|
23
23
|
var _useBrowser = _interopRequireDefault(require("@arcblock/react-hooks/lib/useBrowser"));
|
|
24
24
|
var _Connect = _interopRequireDefault(require("@arcblock/did-connect/lib/Connect"));
|
|
25
25
|
var _constant = require("@abtnode/constant");
|
|
26
|
+
var _ahooks = require("ahooks");
|
|
26
27
|
var _cardSelector = _interopRequireDefault(require("./card-selector"));
|
|
27
28
|
var _didAddress = _interopRequireDefault(require("./did-address"));
|
|
28
29
|
var _wrapLocale = _interopRequireDefault(require("./wrap-locale"));
|
|
@@ -32,7 +33,7 @@ var _templateObject;
|
|
|
32
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
34
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
34
35
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } /* eslint-disable react/no-unstable-nested-components */
|
|
36
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } /* eslint-disable react/no-unstable-nested-components */
|
|
36
37
|
const isFromWallet = () => {
|
|
37
38
|
const {
|
|
38
39
|
searchParams
|
|
@@ -83,18 +84,21 @@ function LostPassport(_ref2) {
|
|
|
83
84
|
api,
|
|
84
85
|
session
|
|
85
86
|
} = (0, _react.useContext)(SessionContext);
|
|
87
|
+
const pageState = (0, _ahooks.useReactive)({
|
|
88
|
+
user: null,
|
|
89
|
+
passport: null,
|
|
90
|
+
success: false,
|
|
91
|
+
activeStep: 0
|
|
92
|
+
});
|
|
93
|
+
const {
|
|
94
|
+
setPassportId,
|
|
95
|
+
clearPassportId
|
|
96
|
+
} = (0, _usePassportId.default)();
|
|
86
97
|
const {
|
|
87
98
|
t,
|
|
88
99
|
locale
|
|
89
100
|
} = (0, _react.useContext)(_context.LocaleContext);
|
|
90
|
-
const [user, setUser] = (0, _react.useState)(false);
|
|
91
|
-
const [passport, setPassport] = (0, _react.useState)(false);
|
|
92
|
-
const [success, setSuccess] = (0, _react.useState)(false);
|
|
93
101
|
const navigate = (0, _reactRouterDom.useNavigate)();
|
|
94
|
-
const [activeStep, setActiveStep] = (0, _react.useState)(0);
|
|
95
|
-
const {
|
|
96
|
-
setPassportId
|
|
97
|
-
} = (0, _usePassportId.default)();
|
|
98
102
|
const {
|
|
99
103
|
wallet: isWalletWebview
|
|
100
104
|
} = (0, _useBrowser.default)();
|
|
@@ -104,10 +108,10 @@ function LostPassport(_ref2) {
|
|
|
104
108
|
searchParams
|
|
105
109
|
} = new URL(window.location.href);
|
|
106
110
|
const onNext = () => {
|
|
107
|
-
|
|
111
|
+
pageState.activeStep++;
|
|
108
112
|
};
|
|
109
113
|
const onGetUser = result => {
|
|
110
|
-
|
|
114
|
+
pageState.user = result.user;
|
|
111
115
|
};
|
|
112
116
|
const onSelectPassport = () => {
|
|
113
117
|
onNext();
|
|
@@ -116,7 +120,7 @@ function LostPassport(_ref2) {
|
|
|
116
120
|
if (result !== null && result !== void 0 && result.passportId) {
|
|
117
121
|
setPassportId(result.passportId);
|
|
118
122
|
}
|
|
119
|
-
|
|
123
|
+
pageState.success = true;
|
|
120
124
|
onNext();
|
|
121
125
|
};
|
|
122
126
|
const onUsePassport = () => {
|
|
@@ -134,28 +138,27 @@ function LostPassport(_ref2) {
|
|
|
134
138
|
}
|
|
135
139
|
const redirect = searchParams.get('redirect');
|
|
136
140
|
if (redirect) {
|
|
137
|
-
|
|
138
|
-
replace: true
|
|
139
|
-
});
|
|
141
|
+
window.location.replace(redirect);
|
|
140
142
|
return;
|
|
141
143
|
}
|
|
142
144
|
if ((((_window$env = window.env) === null || _window$env === void 0 ? void 0 : _window$env.apiPrefix) || '').startsWith(_constant.WELLKNOWN_SERVICE_PATH_PREFIX)) {
|
|
143
|
-
navigate("".concat(_constant.WELLKNOWN_SERVICE_PATH_PREFIX, "/
|
|
145
|
+
navigate("".concat(_constant.WELLKNOWN_SERVICE_PATH_PREFIX, "/connect"), {
|
|
144
146
|
replace: true
|
|
145
147
|
});
|
|
146
148
|
return;
|
|
147
149
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
|
|
151
|
+
// HACK: 因为默认页面不会处理 passportId 的逻辑,所以需要清除存储的信息
|
|
152
|
+
clearPassportId();
|
|
153
|
+
window.location.replace('/');
|
|
151
154
|
};
|
|
152
|
-
const
|
|
153
|
-
|
|
155
|
+
const handleChangePassport = event => {
|
|
156
|
+
pageState.passport = event.target.value;
|
|
154
157
|
};
|
|
155
158
|
const steps = [{
|
|
156
159
|
label: t('lostPassport.selectPassport'),
|
|
157
160
|
content: () => {
|
|
158
|
-
if (!user) {
|
|
161
|
+
if (!pageState.user) {
|
|
159
162
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Connect.default, {
|
|
160
163
|
popup: true,
|
|
161
164
|
open: true,
|
|
@@ -185,7 +188,7 @@ function LostPassport(_ref2) {
|
|
|
185
188
|
alignItems: "center",
|
|
186
189
|
className: "user-info",
|
|
187
190
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
188
|
-
src: user.avatar,
|
|
191
|
+
src: pageState.user.avatar,
|
|
189
192
|
style: {
|
|
190
193
|
width: 48,
|
|
191
194
|
height: 48,
|
|
@@ -195,12 +198,12 @@ function LostPassport(_ref2) {
|
|
|
195
198
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
196
199
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
197
200
|
className: "name",
|
|
198
|
-
children: user.fullName
|
|
201
|
+
children: pageState.user.fullName
|
|
199
202
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
200
203
|
className: "did",
|
|
201
204
|
mt: 1,
|
|
202
205
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_didAddress.default, {
|
|
203
|
-
did: user.did
|
|
206
|
+
did: pageState.user.did
|
|
204
207
|
})
|
|
205
208
|
})]
|
|
206
209
|
})]
|
|
@@ -209,24 +212,24 @@ function LostPassport(_ref2) {
|
|
|
209
212
|
width: 230,
|
|
210
213
|
height: 306,
|
|
211
214
|
cardSpace: 24,
|
|
212
|
-
list: user.passportTypes.map(x => {
|
|
215
|
+
list: pageState.user.passportTypes.map(x => {
|
|
213
216
|
return {
|
|
214
217
|
src: createPassportSvg({
|
|
215
218
|
title: x.title,
|
|
216
219
|
issuer: x.issuer.name,
|
|
217
220
|
issuerDid: x.issuer.id,
|
|
218
|
-
ownerDid: user.did,
|
|
219
|
-
ownerName: user.fullName,
|
|
220
|
-
ownerAvatarUrl: user.avatar,
|
|
221
|
+
ownerDid: pageState.user.did,
|
|
222
|
+
ownerName: pageState.user.fullName,
|
|
223
|
+
ownerAvatarUrl: pageState.user.avatar,
|
|
221
224
|
preferredColor: passportColor || 'auto'
|
|
222
225
|
}),
|
|
223
226
|
name: x.title,
|
|
224
227
|
id: x.id
|
|
225
228
|
};
|
|
226
229
|
}),
|
|
227
|
-
onSelect: index =>
|
|
230
|
+
onSelect: index => handleChangePassport({
|
|
228
231
|
target: {
|
|
229
|
-
value: user.passportTypes[index].name
|
|
232
|
+
value: pageState.user.passportTypes[index].name
|
|
230
233
|
}
|
|
231
234
|
}),
|
|
232
235
|
defaultIndex: 0
|
|
@@ -237,7 +240,7 @@ function LostPassport(_ref2) {
|
|
|
237
240
|
variant: "contained",
|
|
238
241
|
color: "primary",
|
|
239
242
|
onClick: () => onSelectPassport(),
|
|
240
|
-
disabled: !passport,
|
|
243
|
+
disabled: !pageState.passport,
|
|
241
244
|
children: t('common.next')
|
|
242
245
|
})
|
|
243
246
|
})]
|
|
@@ -248,8 +251,8 @@ function LostPassport(_ref2) {
|
|
|
248
251
|
content: () => {
|
|
249
252
|
var _window, _window$blocklet;
|
|
250
253
|
const extraParams = {
|
|
251
|
-
receiverDid: user.did,
|
|
252
|
-
passportName: passport,
|
|
254
|
+
receiverDid: pageState.user.did,
|
|
255
|
+
passportName: pageState.passport,
|
|
253
256
|
teamDid: ((_window = window) === null || _window === void 0 ? void 0 : (_window$blocklet = _window.blocklet) === null || _window$blocklet === void 0 ? void 0 : _window$blocklet.did) || ''
|
|
254
257
|
};
|
|
255
258
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Connect.default, {
|
|
@@ -306,7 +309,7 @@ function LostPassport(_ref2) {
|
|
|
306
309
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Stepper.default, {
|
|
307
310
|
className: "stepper-progress",
|
|
308
311
|
alternativeLabel: true,
|
|
309
|
-
activeStep: activeStep,
|
|
312
|
+
activeStep: pageState.activeStep,
|
|
310
313
|
children: steps.map(_ref3 => {
|
|
311
314
|
let {
|
|
312
315
|
label
|
|
@@ -320,8 +323,8 @@ function LostPassport(_ref2) {
|
|
|
320
323
|
})
|
|
321
324
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
322
325
|
className: "stepper-content",
|
|
323
|
-
children: steps[activeStep].content()
|
|
324
|
-
}), !success && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
326
|
+
children: steps[pageState.activeStep].content()
|
|
327
|
+
}), !pageState.success && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
325
328
|
textAlign: "center",
|
|
326
329
|
fontSize: 12,
|
|
327
330
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Link, {
|
|
@@ -9,6 +9,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
10
|
var _Add = _interopRequireDefault(require("@mui/icons-material/Add"));
|
|
11
11
|
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
12
|
+
var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
12
13
|
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
13
14
|
var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
|
|
14
15
|
var _SplitButton = _interopRequireDefault(require("@arcblock/ux/lib/SplitButton"));
|
|
@@ -16,7 +17,7 @@ var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularPr
|
|
|
16
17
|
var _EditIcon = _interopRequireDefault(require("@arcblock/icons/lib/EditIcon"));
|
|
17
18
|
var _LockIcon = _interopRequireDefault(require("@arcblock/icons/lib/LockIcon"));
|
|
18
19
|
var _ExternalIssuerIcon = _interopRequireDefault(require("@arcblock/icons/lib/ExternalIssuerIcon"));
|
|
19
|
-
var
|
|
20
|
+
var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
|
|
20
21
|
var _node = require("../../contexts/node");
|
|
21
22
|
var _team = require("../../contexts/team");
|
|
22
23
|
var _util = require("../../util");
|
|
@@ -62,6 +63,7 @@ function PassportList(_ref) {
|
|
|
62
63
|
const [showTrustedFactories, setShowTrustedFactories] = (0, _react.useState)(false);
|
|
63
64
|
const [search, setSearch] = (0, _react.useState)('');
|
|
64
65
|
const [loading, setLoading] = (0, _react.useState)(false);
|
|
66
|
+
const isMobile = (0, _useMediaQuery.default)(x => x.breakpoints.down('md'));
|
|
65
67
|
const toggleShowIssue = async e => {
|
|
66
68
|
e.stopPropagation();
|
|
67
69
|
if (loading) {
|
|
@@ -186,6 +188,10 @@ function PassportList(_ref) {
|
|
|
186
188
|
className: "list",
|
|
187
189
|
children: filteredRoles.map(role => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
188
190
|
"data-cy": "passport-".concat(role.name),
|
|
191
|
+
sx: {
|
|
192
|
+
display: 'flex',
|
|
193
|
+
justifyContent: 'space-between'
|
|
194
|
+
},
|
|
189
195
|
className: "item",
|
|
190
196
|
display: "flex",
|
|
191
197
|
alignItems: "center",
|
|
@@ -215,7 +221,7 @@ function PassportList(_ref) {
|
|
|
215
221
|
className: "title",
|
|
216
222
|
children: role.title
|
|
217
223
|
})]
|
|
218
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
224
|
+
}), !isMobile && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
219
225
|
className: "description",
|
|
220
226
|
children: role.description
|
|
221
227
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_permission.default, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.17-beta-
|
|
3
|
+
"version": "1.16.17-beta-d81014f4",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -27,23 +27,23 @@
|
|
|
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.17-beta-
|
|
31
|
-
"@abtnode/constant": "1.16.17-beta-
|
|
32
|
-
"@abtnode/util": "1.16.17-beta-
|
|
30
|
+
"@abtnode/auth": "1.16.17-beta-d81014f4",
|
|
31
|
+
"@abtnode/constant": "1.16.17-beta-d81014f4",
|
|
32
|
+
"@abtnode/util": "1.16.17-beta-d81014f4",
|
|
33
33
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
34
|
-
"@arcblock/did": "^1.18.
|
|
35
|
-
"@arcblock/did-connect": "^2.8.
|
|
34
|
+
"@arcblock/did": "^1.18.93",
|
|
35
|
+
"@arcblock/did-connect": "^2.8.5",
|
|
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.17-beta-
|
|
37
|
+
"@arcblock/icons": "^2.8.5",
|
|
38
|
+
"@arcblock/nft-display": "2.8.5",
|
|
39
|
+
"@arcblock/react-hooks": "^2.8.5",
|
|
40
|
+
"@arcblock/terminal": "^2.8.5",
|
|
41
|
+
"@arcblock/ux": "^2.8.5",
|
|
42
|
+
"@blocklet/constant": "1.16.17-beta-d81014f4",
|
|
43
43
|
"@blocklet/launcher-layout": "2.2.22",
|
|
44
|
-
"@blocklet/list": "^0.12.
|
|
45
|
-
"@blocklet/meta": "1.16.17-beta-
|
|
46
|
-
"@blocklet/ui-react": "^2.8.
|
|
44
|
+
"@blocklet/list": "^0.12.46",
|
|
45
|
+
"@blocklet/meta": "1.16.17-beta-d81014f4",
|
|
46
|
+
"@blocklet/ui-react": "^2.8.5",
|
|
47
47
|
"@blocklet/uploader": "^0.0.32",
|
|
48
48
|
"@emotion/react": "^11.10.4",
|
|
49
49
|
"@emotion/styled": "^11.10.4",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@mui/material": "^5.14.10",
|
|
55
55
|
"@mui/styles": "^5.14.10",
|
|
56
56
|
"@mui/x-date-pickers": "^6.14.0",
|
|
57
|
-
"@ocap/client": "1.18.
|
|
57
|
+
"@ocap/client": "1.18.93",
|
|
58
58
|
"@uiw/react-markdown-preview": "4.0.6",
|
|
59
59
|
"ahooks": "^3.7.1",
|
|
60
60
|
"axios": "^0.27.2",
|
|
@@ -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": "0317f39a400a7ee4475e09e9154de5d8f8227b50",
|
|
104
104
|
"exports": {
|
|
105
105
|
".": {
|
|
106
106
|
"import": "./es/index.js",
|