@abtnode/ux 1.16.13 → 1.16.14-beta-0c29907f

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.
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _propTypes = _interopRequireDefault(require("prop-types"));
8
- var _Box = _interopRequireDefault(require("@mui/material/Box"));
9
8
  var _reactRouterDom = require("react-router-dom");
10
9
  var _Link = _interopRequireDefault(require("@mui/material/Link"));
11
- var _Address = _interopRequireDefault(require("@arcblock/did-connect/lib/Address"));
12
- var _Avatar = _interopRequireDefault(require("@arcblock/did-connect/lib/Avatar"));
10
+ var _DID = _interopRequireDefault(require("@arcblock/ux/lib/DID"));
13
11
  var _jsxRuntime = require("react/jsx-runtime");
14
12
  const _excluded = ["did", "href", "external", "avatarProps"];
15
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -28,37 +26,24 @@ function WrappedDidAddress(_ref) {
28
26
  avatarProps
29
27
  } = _ref,
30
28
  rest = _objectWithoutProperties(_ref, _excluded);
31
- // eslint-disable-next-line react/no-unstable-nested-components
32
- function Content() {
33
- if (href) {
34
- if (external) {
35
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
36
- target: "_blank",
37
- href: href,
38
- underline: "hover",
39
- children: did
40
- });
41
- }
42
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Link, {
43
- to: href,
44
- children: did
29
+ const content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_DID.default, _objectSpread({
30
+ did: did
31
+ }, rest));
32
+ if (href) {
33
+ if (external) {
34
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
35
+ target: "_blank",
36
+ href: href,
37
+ underline: "hover",
38
+ children: content
45
39
  });
46
40
  }
47
- return did;
41
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Link, {
42
+ to: href,
43
+ children: content
44
+ });
48
45
  }
49
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Address.default, _objectSpread(_objectSpread({
50
- prepend: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
51
- component: "span",
52
- display: "flex",
53
- mr: 1,
54
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, _objectSpread({
55
- did: did,
56
- size: 18
57
- }, avatarProps))
58
- })
59
- }, rest), {}, {
60
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Content, {})
61
- }));
46
+ return content;
62
47
  }
63
48
  WrappedDidAddress.propTypes = {
64
49
  did: _propTypes.default.string.isRequired,
@@ -20,7 +20,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
20
20
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
21
21
  // eslint-disable-next-line import/prefer-default-export
22
22
  function useBlocklet(_ref) {
23
- var _blocklet$site, _blocklet$site$domain, _blocklet$meta, _blocklet$meta2, _blocklet$meta3, _blocklet$meta4, _blocklet$meta5, _blocklet$meta6, _blocklet$meta7;
23
+ var _blocklet$site, _blocklet$site$domain, _blocklet$meta, _blocklet$meta2, _blocklet$meta3, _blocklet$meta4, _blocklet$meta5, _blocklet$meta6;
24
24
  let {
25
25
  did,
26
26
  client,
@@ -212,8 +212,7 @@ function useBlocklet(_ref) {
212
212
  useSubscription(_constant.BlockletEvents.storeChange, handleRefreshWithoutRuntime, [blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta3 = blocklet.meta) === null || _blocklet$meta3 === void 0 ? void 0 : _blocklet$meta3.did, !disableSubscription]);
213
213
  useSubscription(_constant.BlockletEvents.installed, handleRefresh, [blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta4 = blocklet.meta) === null || _blocklet$meta4 === void 0 ? void 0 : _blocklet$meta4.did, !disableSubscription]);
214
214
  useSubscription(_constant.BlockletEvents.upgraded, handleRefresh, [blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta5 = blocklet.meta) === null || _blocklet$meta5 === void 0 ? void 0 : _blocklet$meta5.did, !disableSubscription]);
215
- useSubscription(_constant.BlockletEvents.downgraded, handleRefresh, [blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta6 = blocklet.meta) === null || _blocklet$meta6 === void 0 ? void 0 : _blocklet$meta6.did, !disableSubscription]);
216
- useSubscription(_constant.BlockletEvents.updated, handleRefresh, [blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta7 = blocklet.meta) === null || _blocklet$meta7 === void 0 ? void 0 : _blocklet$meta7.did, !disableSubscription]);
215
+ useSubscription(_constant.BlockletEvents.updated, handleRefresh, [blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta6 = blocklet.meta) === null || _blocklet$meta6 === void 0 ? void 0 : _blocklet$meta6.did, !disableSubscription]);
217
216
  const data = blocklet ? (0, _merge.default)(blocklet, {
218
217
  site: {
219
218
  domainAliases: blocklet.site.domainAliases.map(x => {
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = useConfirm;
7
+ var _react = require("react");
8
+ var _Dialog = require("@arcblock/ux/lib/Dialog");
9
+ var _ahooks = require("ahooks");
10
+ var _noop = _interopRequireDefault(require("lodash/noop"));
11
+ var _context = require("@arcblock/ux/lib/Locale/context");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ const ConfirmHolder = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
15
+ const {
16
+ t
17
+ } = (0, _react.useContext)(_context.LocaleContext);
18
+ const state = (0, _ahooks.useReactive)({
19
+ show: false,
20
+ title: '',
21
+ content: '',
22
+ onConfirm: _noop.default,
23
+ onCancel: _noop.default
24
+ });
25
+ const open = (0, _ahooks.useMemoizedFn)(function () {
26
+ let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
27
+ state.show = true;
28
+ state.title = params.title;
29
+ state.content = params.content;
30
+ state.onConfirm = params.onConfirm || _noop.default;
31
+ state.onCancel = params.onCancel || _noop.default;
32
+ });
33
+ const reset = (0, _ahooks.useMemoizedFn)(() => {
34
+ state.title = '';
35
+ state.content = '';
36
+ state.onConfirm = _noop.default;
37
+ state.onCancel = _noop.default;
38
+ });
39
+ const close = (0, _ahooks.useMemoizedFn)(() => {
40
+ state.show = false;
41
+ setTimeout(() => {
42
+ reset();
43
+ }, 300);
44
+ });
45
+ const onCancel = (0, _ahooks.useMemoizedFn)(() => {
46
+ close();
47
+ state === null || state === void 0 ? void 0 : state.onCancel();
48
+ }, []);
49
+ const onConfirm = (0, _ahooks.useMemoizedFn)(() => {
50
+ state === null || state === void 0 ? void 0 : state.onConfirm(close);
51
+ }, []);
52
+ (0, _react.useImperativeHandle)(ref, () => {
53
+ return {
54
+ open,
55
+ close
56
+ };
57
+ }, [open, close]);
58
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.Confirm, {
59
+ open: state.show,
60
+ title: state.title,
61
+ onConfirm: onConfirm,
62
+ onCancel: onCancel,
63
+ confirmButton: {
64
+ text: t('common.confirm'),
65
+ props: {
66
+ variant: 'contained',
67
+ color: 'primary'
68
+ }
69
+ },
70
+ cancelButton: {
71
+ text: t('common.cancel'),
72
+ props: {
73
+ variant: 'outlined',
74
+ color: 'primary'
75
+ }
76
+ },
77
+ children: state.content
78
+ });
79
+ });
80
+ function useConfirm() {
81
+ const confirmRef = (0, _react.useRef)(null);
82
+ const open = (0, _ahooks.useMemoizedFn)(function () {
83
+ var _confirmRef$current;
84
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
85
+ args[_key] = arguments[_key];
86
+ }
87
+ (_confirmRef$current = confirmRef.current) === null || _confirmRef$current === void 0 ? void 0 : _confirmRef$current.open(...args);
88
+ });
89
+ const close = (0, _ahooks.useMemoizedFn)(function () {
90
+ var _confirmRef$current2;
91
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
92
+ args[_key2] = arguments[_key2];
93
+ }
94
+ (_confirmRef$current2 = confirmRef.current) === null || _confirmRef$current2 === void 0 ? void 0 : _confirmRef$current2.close(...args);
95
+ });
96
+ const confirmApi = {
97
+ open,
98
+ close
99
+ };
100
+ return {
101
+ confirmHolder: /*#__PURE__*/(0, _jsxRuntime.jsx)(ConfirmHolder, {
102
+ ref: confirmRef
103
+ }),
104
+ confirmApi
105
+ };
106
+ }
@@ -7,17 +7,18 @@ exports.default = void 0;
7
7
  var _react = require("react");
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
- var _createPassportSvg = _interopRequireDefault(require("@abtnode/auth/lib/util/create-passport-svg"));
11
10
  var _context = require("@arcblock/ux/lib/Locale/context");
12
11
  var _Dialog = _interopRequireDefault(require("@arcblock/ux/lib/Dialog"));
13
12
  var _iconsMaterial = require("@mui/icons-material");
14
13
  var _jsxRuntime = require("react/jsx-runtime");
15
14
  var _templateObject;
15
+ /* eslint-disable jsx-a11y/alt-text */
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
18
18
  function InvitationPassport(_ref) {
19
19
  let {
20
20
  invitation,
21
+ createPassportSvg,
21
22
  passportColor
22
23
  } = _ref;
23
24
  const [open, setOpen] = (0, _react.useState)(false);
@@ -29,13 +30,14 @@ function InvitationPassport(_ref) {
29
30
  return roleRaw.toUpperCase();
30
31
  }, [invitation.role.title, invitation.role.name]);
31
32
  const display = (0, _react.useMemo)(() => {
32
- return (0, _createPassportSvg.default)({
33
+ return createPassportSvg({
33
34
  title: roleName,
34
35
  issuer: invitation.info.name,
35
36
  issuerDid: invitation.info.appDid,
36
37
  ownerName: 'Your Name',
37
38
  // can't get avatar, cause user is not login
38
39
  // ownerAvatarUrl: user.avatar,
40
+ ownerDid: invitation.info.appDid,
39
41
  isDataUrl: true,
40
42
  preferredColor: invitation.info.passportColor || passportColor
41
43
  });
@@ -48,33 +50,16 @@ function InvitationPassport(_ref) {
48
50
  setOpen(false);
49
51
  }, []);
50
52
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
51
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, {
52
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
53
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Root, {
54
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
53
55
  className: "invite-passport__card",
54
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
55
- src: display,
56
+ onClick: onViewPermission,
57
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("object", {
58
+ data: display,
56
59
  alt: "passport",
57
60
  className: "invite-passport__cover"
58
61
  })
59
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
60
- className: "invite-passport__content",
61
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
62
- className: "invite-passport__title",
63
- children: roleName
64
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
65
- className: "invite-passport__description",
66
- title: invitation.role.description,
67
- children: invitation.role.description
68
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
69
- style: {
70
- flex: 1
71
- }
72
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
73
- className: "invite-passport__view-permission",
74
- onClick: onViewPermission,
75
- children: t('invite.viewPermission')
76
- })]
77
- })]
62
+ })
78
63
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
79
64
  open: open,
80
65
  title: t('invite.viewPermission'),
@@ -115,12 +100,13 @@ function InvitationPassport(_ref) {
115
100
  }
116
101
  InvitationPassport.propTypes = {
117
102
  invitation: _propTypes.default.object.isRequired,
103
+ createPassportSvg: _propTypes.default.func.isRequired,
118
104
  passportColor: _propTypes.default.string
119
105
  };
120
106
  InvitationPassport.defaultProps = {
121
107
  passportColor: 'auto'
122
108
  };
123
- const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin-right: 12px;\n width: 100px;\n height: 100px;\n flex-shrink: 0;\n .invite-passport__cover {\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ", ";\n }\n"])), _ref2 => {
109
+ const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ", ";\n }\n"])), _ref2 => {
124
110
  let {
125
111
  theme
126
112
  } = _ref2;
@@ -24,6 +24,7 @@ function Invitation(_ref) {
24
24
  let {
25
25
  getDataFn,
26
26
  passportColor,
27
+ createPassportSvg,
27
28
  onLoginSuccess,
28
29
  checkFn,
29
30
  onReceive
@@ -53,6 +54,7 @@ function Invitation(_ref) {
53
54
  invitation: state.data
54
55
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_invitationPassport.default, {
55
56
  invitation: state.data,
57
+ createPassportSvg: createPassportSvg,
56
58
  passportColor: passportColor
57
59
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Section2, {
58
60
  invitation: state.data,
@@ -66,6 +68,7 @@ function Invitation(_ref) {
66
68
  Invitation.propTypes = {
67
69
  getDataFn: _propTypes.default.func.isRequired,
68
70
  checkFn: _propTypes.default.func.isRequired,
71
+ createPassportSvg: _propTypes.default.func.isRequired,
69
72
  onLoginSuccess: _propTypes.default.func,
70
73
  onReceive: _propTypes.default.func,
71
74
  passportColor: _propTypes.default.string
package/lib/locales/en.js CHANGED
@@ -91,6 +91,7 @@ module.exports = {
91
91
  alreadyExist: 'already exists',
92
92
  approve: 'Approve',
93
93
  approved: 'approved',
94
+ appUrl: 'APP Url',
94
95
  auditLogs: 'Audit Trail',
95
96
  author: 'Author',
96
97
  avatar: 'Avatar',
@@ -122,6 +123,7 @@ module.exports = {
122
123
  continue: 'Continue',
123
124
  continueWith: 'Continue With',
124
125
  copiedTip: 'Copied',
126
+ copyAndClose: 'Copy & Close',
125
127
  copyTip: 'Click To Copy',
126
128
  coreStorage: 'Core Storage',
127
129
  cpu: 'CPU',
@@ -189,6 +191,7 @@ module.exports = {
189
191
  lastPublishedAt: 'Published At',
190
192
  launcher: 'Launcher Information',
191
193
  leavePageTip: 'Are you sure to leave the page?',
194
+ link: 'Link',
192
195
  loading: 'loading',
193
196
  log: 'View Logs',
194
197
  logStorage: 'Log Storage',
@@ -1247,7 +1250,6 @@ module.exports = {
1247
1250
  launchFailed: 'Failed to launch the app, please try again',
1248
1251
  installedButStopped: 'The app is installed successfully, but cannot be started. You can start it manually after resolving blocking issues',
1249
1252
  installedButError: 'The app is successfully installed, but failed to start',
1250
- upgradeFailed: 'Upgrade Failed',
1251
1253
  restoreFailed: 'Failed to restore app, please try again'
1252
1254
  },
1253
1255
  steps: {
@@ -1422,7 +1424,8 @@ module.exports = {
1422
1424
  useWallet: 'Connect DID Spaces',
1423
1425
  useSpaceGateway: 'Connect using the DID Spaces gateway',
1424
1426
  switchToSpace: 'Switch to Space',
1425
- switchToSpaceSucceeded: 'Switched to Space{name}'
1427
+ switchToSpaceSucceeded: 'Switched to Space{name}',
1428
+ succeeded: 'You have successfully connected to DID Spaces'
1426
1429
  },
1427
1430
  disconnected: {
1428
1431
  tag: 'Disconnected',
@@ -1453,7 +1456,8 @@ module.exports = {
1453
1456
  clientIdDescribe: "Auth0's clientId is required"
1454
1457
  },
1455
1458
  comingSoon: 'More login methods are under construction',
1456
- moreLogin: 'More Login'
1459
+ moreLogin: 'More Login',
1460
+ federated: 'Federated Login'
1457
1461
  },
1458
1462
  expiration: {
1459
1463
  tips: {
@@ -1479,5 +1483,49 @@ module.exports = {
1479
1483
  logSize: 'Log Size',
1480
1484
  bandwidth: 'Bandwidth'
1481
1485
  }
1486
+ },
1487
+ federated: {
1488
+ inviteJoinFederatedLogin: 'Invite to join federated login',
1489
+ inviteJoinFederatedLoginDescription: 'Copy the following address and fill it in the application where you need to join to apply for federated login.',
1490
+ federatedLogin: 'Federated login',
1491
+ joinFederatedLogin: 'Join federated login',
1492
+ joinFederatedLoginDescription: 'Please enter the federated login address provided by Master Blocklet to join the federated login',
1493
+ federatedJoinAppUrl: 'Federated login join appUrl',
1494
+ federatedJoinAppUrlRequired: 'Please input federated login join appUrl',
1495
+ failedToGetFederatedLoginAppUrl: 'Failed to get federated login join appUrl',
1496
+ federatedJoinAppUrlInvalid: 'Federated login appUrl is invalid',
1497
+ siteDetail: 'Site detail',
1498
+ approveToJoinLogin: 'Approve to join federated login',
1499
+ approve: 'Enable login',
1500
+ revoke: 'Disable login',
1501
+ enableFederatedLogin: 'Enable federated login',
1502
+ disableFederatedLogin: 'Disable federated login',
1503
+ enableFederatedLoginDescription: 'After enable federated login, this site will be auto login',
1504
+ disableFederatedLoginDescription: 'After disable federated login, this site will not be auto login',
1505
+ enableFederatedAutoLogin: 'Enable automatic login',
1506
+ enableFederatedAutoLoginDescription: 'After enable automatic login, if there is currently a unified login status, the site will automatically log in the identity of the federated login',
1507
+ disableFederatedAutoLogin: 'Disable automatic login',
1508
+ disableFederatedAutoLoginDescription: 'After the automatic login is turned off, the site will not automatically log in the user information of the unified login, and you can still choose to manually click to log in with the identity of the federated login',
1509
+ info: {
1510
+ appId: 'APP DID',
1511
+ appPid: 'Permanent ID',
1512
+ migratedFrom: 'Also Known As',
1513
+ appName: 'Blocklet name',
1514
+ appDescription: 'Blocklet description',
1515
+ appUrl: 'Blocklet url',
1516
+ appLogo: 'Blocklet logo',
1517
+ did: 'Blocklet DID',
1518
+ serverId: 'Blocklet Server ID',
1519
+ serverVersion: 'Blocklet Server version',
1520
+ version: 'Blocklet version',
1521
+ appliedAt: 'Apply at',
1522
+ status: 'Status'
1523
+ },
1524
+ status: {
1525
+ pending: 'Pending',
1526
+ approved: 'Approved',
1527
+ rejected: 'Rejected',
1528
+ revoked: 'Revoked'
1529
+ }
1482
1530
  }
1483
1531
  };
package/lib/locales/zh.js CHANGED
@@ -94,6 +94,7 @@ module.exports = {
94
94
  alreadyExist: '已经存在',
95
95
  approve: '同意',
96
96
  approved: 'Approved',
97
+ appUrl: 'APP 链接',
97
98
  auditLogs: '审计记录',
98
99
  author: '作者',
99
100
  avatar: '头像',
@@ -125,6 +126,7 @@ module.exports = {
125
126
  continue: '继续',
126
127
  continueWith: '确认继续',
127
128
  copiedTip: '已复制',
129
+ copyAndClose: '复制并关闭',
128
130
  copyTip: '点击复制',
129
131
  coreStorage: '核心存储',
130
132
  cpu: 'CPU',
@@ -194,6 +196,7 @@ module.exports = {
194
196
  lastPublishedAt: '发布时间',
195
197
  launcher: '启动器信息',
196
198
  leavePageTip: '是否确定离开当前页面?',
199
+ link: '链接',
197
200
  loading: '加载中',
198
201
  log: '查看日志',
199
202
  logStorage: '日志存储',
@@ -1252,7 +1255,6 @@ module.exports = {
1252
1255
  launchFailed: '启动应用失败,请重试',
1253
1256
  installedButStopped: '应用安装成功,但是无法启动,解决启动问题之后后可手动启动',
1254
1257
  installedButError: '应用已经安装,但是运行出错了',
1255
- upgradeFailed: '更新失败',
1256
1258
  restoreFailed: '还原应用失败,请重试'
1257
1259
  },
1258
1260
  steps: {
@@ -1425,7 +1427,8 @@ module.exports = {
1425
1427
  useWallet: '使用 DID Wallet 连接',
1426
1428
  useSpaceGateway: '使用 DID Spaces 网关连接',
1427
1429
  switchToSpace: '切换至 Space',
1428
- switchToSpaceSucceeded: '已切换至 Space{name}'
1430
+ switchToSpaceSucceeded: '已切换至 Space{name}',
1431
+ succeeded: '你已成功连接至 DID Spaces'
1429
1432
  },
1430
1433
  disconnected: {
1431
1434
  tag: '连接已断开',
@@ -1456,7 +1459,8 @@ module.exports = {
1456
1459
  clientIdDescribe: '请输入 Auth0 的 ClientID'
1457
1460
  },
1458
1461
  comingSoon: '更多登录方式正在建设中',
1459
- moreLogin: '更多登录方式'
1462
+ moreLogin: '更多登录方式',
1463
+ federated: '统一登录'
1460
1464
  },
1461
1465
  expiration: {
1462
1466
  tips: {
@@ -1482,5 +1486,49 @@ module.exports = {
1482
1486
  logSize: '日志大小',
1483
1487
  bandwidth: '带宽消耗'
1484
1488
  }
1489
+ },
1490
+ federated: {
1491
+ inviteJoinFederatedLogin: '邀请加入统一登录',
1492
+ inviteJoinFederatedLoginDescription: '复制以下地址到需要加入的应用中填入,申请加入统一登录',
1493
+ federatedLogin: '统一登录',
1494
+ joinFederatedLogin: '加入统一登录',
1495
+ joinFederatedLoginDescription: '请输入 Master Blocklet 提供的统一登录地址以加入统一登录',
1496
+ federatedJoinAppUrl: '统一登录地址',
1497
+ federatedJoinAppUrlRequired: '请输入统一登录地址',
1498
+ failedToGetFederatedLoginAppUrl: '获取统一登录地址失败',
1499
+ federatedJoinAppUrlInvalid: '统一登录地址不可用',
1500
+ siteDetail: '站点详情',
1501
+ approveToJoinLogin: '审核加入统一登录',
1502
+ approve: '恢复登录',
1503
+ revoke: '禁止登录',
1504
+ enableFederatedLogin: '启用统一登录',
1505
+ disableFederatedLogin: '禁用统一登录',
1506
+ enableFederatedLoginDescription: '启用统一登录后,该站点将自动登录',
1507
+ disableFederatedLoginDescription: '禁用统一登录后,该站点将无法自动登录',
1508
+ enableFederatedAutoLogin: '开启自动登录',
1509
+ enableFederatedAutoLoginDescription: '开启自动登录后,如果当前存在统一登录的状态,则该站点将自动登录统一登录的身份',
1510
+ disableFederatedAutoLogin: '关闭自动登录',
1511
+ disableFederatedAutoLoginDescription: '关闭自动登录后,该站点将不会自动登录统一登录的用户信息,您仍可选择手动点击登录统一登录的身份',
1512
+ info: {
1513
+ appId: '应用 DID',
1514
+ appPid: '永久 DID',
1515
+ migratedFrom: '曾用 DID',
1516
+ appName: '应用名称',
1517
+ appDescription: '应用描述',
1518
+ appUrl: '应用地址',
1519
+ appLogo: '应用图标',
1520
+ did: '应用 DID',
1521
+ serverId: 'Blocklet Server ID',
1522
+ serverVersion: 'Blocklet Server 版本',
1523
+ version: '应用版本',
1524
+ appliedAt: '申请时间',
1525
+ status: '状态'
1526
+ },
1527
+ status: {
1528
+ pending: '待审核',
1529
+ approved: '已通过',
1530
+ rejected: '已拒绝',
1531
+ revoked: '已撤销'
1532
+ }
1485
1533
  }
1486
1534
  };
@@ -19,12 +19,12 @@ var _GetApp = _interopRequireDefault(require("@mui/icons-material/GetApp"));
19
19
  var _Done = _interopRequireDefault(require("@mui/icons-material/Done"));
20
20
  var _Avatar = _interopRequireDefault(require("@mui/material/Avatar"));
21
21
  var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
22
- var _Address = _interopRequireDefault(require("@arcblock/did-connect/lib/Address"));
23
22
  var _context = require("@arcblock/ux/lib/Locale/context");
24
23
  var _useBrowser = _interopRequireDefault(require("@arcblock/react-hooks/lib/useBrowser"));
25
24
  var _Connect = _interopRequireDefault(require("@arcblock/did-connect/lib/Connect"));
26
25
  var _constant = require("@abtnode/constant");
27
26
  var _cardSelector = _interopRequireDefault(require("./card-selector"));
27
+ var _didAddress = _interopRequireDefault(require("./did-address"));
28
28
  var _wrapLocale = _interopRequireDefault(require("./wrap-locale"));
29
29
  var _usePassportId = _interopRequireDefault(require("./hooks/use-passport-id"));
30
30
  var _jsxRuntime = require("react/jsx-runtime");
@@ -199,8 +199,8 @@ function LostPassport(_ref2) {
199
199
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
200
200
  className: "did",
201
201
  mt: 1,
202
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Address.default, {
203
- children: user.did
202
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_didAddress.default, {
203
+ did: user.did
204
204
  })
205
205
  })]
206
206
  })]
@@ -215,6 +215,7 @@ function LostPassport(_ref2) {
215
215
  title: x.title,
216
216
  issuer: x.issuer.name,
217
217
  issuerDid: x.issuer.id,
218
+ ownerDid: user.did,
218
219
  ownerName: user.fullName,
219
220
  ownerAvatarUrl: user.avatar,
220
221
  isDataUrl: true,
@@ -7,7 +7,7 @@ exports.default = PassportInput;
7
7
  var _propTypes = _interopRequireDefault(require("prop-types"));
8
8
  var _Box = _interopRequireDefault(require("@mui/material/Box"));
9
9
  var _createPassportSvg = _interopRequireDefault(require("@abtnode/auth/lib/util/create-passport-svg"));
10
- var _passportColor = require("@abtnode/auth/lib/util/passport-color");
10
+ var _nftDisplay = require("@arcblock/nft-display");
11
11
  var _util = require("@blocklet/meta/lib/util");
12
12
  var _colorInput = _interopRequireDefault(require("./color-input"));
13
13
  var _commonPropTypes = _interopRequireDefault(require("./common-prop-types"));
@@ -32,7 +32,7 @@ function PassportInput(_ref) {
32
32
  const {
33
33
  blocklet
34
34
  } = componentProps;
35
- const color = value === 'auto' ? (0, _passportColor.getPassportColorFromDid)(blocklet.appDid) : value;
35
+ const color = value === 'auto' ? (0, _nftDisplay.getPassportColorFromDid)(blocklet.appDid) : value;
36
36
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
37
37
  display: "flex",
38
38
  alignItems: "center",
@@ -47,6 +47,7 @@ function PassportInput(_ref) {
47
47
  issuer: (0, _util.getDisplayName)(blocklet),
48
48
  issuerDid: blocklet.appDid,
49
49
  ownerName: 'Your Name',
50
+ ownerDid: blocklet.appDid,
50
51
  isDataUrl: true,
51
52
  preferredColor: value || 'auto'
52
53
  })
@@ -16,7 +16,6 @@ var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormContro
16
16
  var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
17
17
  var _Add = _interopRequireDefault(require("@mui/icons-material/Add"));
18
18
  var _Loop = _interopRequireDefault(require("@mui/icons-material/Loop"));
19
- var _Address = _interopRequireDefault(require("@arcblock/did-connect/lib/Address"));
20
19
  var _Avatar = _interopRequireDefault(require("@arcblock/did-connect/lib/Avatar"));
21
20
  var _context = require("@arcblock/ux/lib/Locale/context");
22
21
  var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
@@ -28,6 +27,7 @@ var _constant = require("@abtnode/constant");
28
27
  var _useUrlState = _interopRequireDefault(require("@ahooksjs/use-url-state"));
29
28
  var _ahooks = require("ahooks");
30
29
  var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
30
+ var _didAddress = _interopRequireDefault(require("../../did-address"));
31
31
  var _node = require("../../contexts/node");
32
32
  var _team = require("../../contexts/team");
33
33
  var _blocklet = require("../../contexts/blocklet");
@@ -115,7 +115,8 @@ SimpleInfo.propTypes = {
115
115
  };
116
116
  function MemberList(_ref2) {
117
117
  let {
118
- type
118
+ type,
119
+ createPassportSvg
119
120
  } = _ref2;
120
121
  const {
121
122
  appIdList = []
@@ -263,10 +264,11 @@ function MemberList(_ref2) {
263
264
  name: 'did',
264
265
  options: {
265
266
  customBodyRender: e => {
266
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Address.default, {
267
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_didAddress.default, {
267
268
  size: 14,
269
+ responsive: true,
268
270
  copyable: false,
269
- children: e
271
+ did: e
270
272
  });
271
273
  }
272
274
  }
@@ -479,6 +481,9 @@ function MemberList(_ref2) {
479
481
  className: "table-toolbar-left",
480
482
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControlLabel.default, {
481
483
  control: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
484
+ sx: {
485
+ display: 'flex !important'
486
+ },
482
487
  disabled: loading,
483
488
  color: "primary",
484
489
  checked: search.hideBlocked,
@@ -505,6 +510,7 @@ function MemberList(_ref2) {
505
510
  }), memberDialog && /*#__PURE__*/(0, _jsxRuntime.jsx)(_member.default, {
506
511
  onCancel: () => setMemberDialog(null),
507
512
  userDid: memberDialog.did,
513
+ createPassportSvg: createPassportSvg,
508
514
  initTab: memberDialog.initTab
509
515
  }), showInviteMember && /*#__PURE__*/(0, _jsxRuntime.jsx)(_inviteMember.default, {
510
516
  teamDid: teamDid,
@@ -527,7 +533,8 @@ function MemberList(_ref2) {
527
533
  })]
528
534
  });
529
535
  }
530
- const Div = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .main {\n .left {\n width: 168px;\n flex-shrink: 0;\n margin-right: 65px;\n .tabs {\n padding-top: 16px;\n .tab {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n transition: background 0.4s;\n\n width: 168px;\n height: 36px;\n border-radius: 8px;\n\n cursor: pointer;\n user-select: none;\n\n &:nth-child(n + 2) {\n margin-top: 24px;\n }\n\n &.active {\n background: #f2f2f2;\n }\n\n &:hover {\n background: #f2f2f2;\n }\n\n .text {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n\n color: #222222;\n }\n\n .badge {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n color: #fff;\n background: #666666;\n font-size: 10px;\n font-weight: 400;\n &.is-rect {\n width: auto;\n border-radius: 8px;\n padding: 0 4px;\n }\n }\n }\n }\n @media (max-width: ", "px) {\n display: none;\n }\n }\n .right {\n flex-grow: 1;\n }\n }\n\n .member-block {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .member-avatar {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .member-text {\n margin-left: 10px;\n }\n .badge-block {\n width: 14px;\n height: 14px;\n position: absolute;\n right: -4px;\n top: -4px;\n background: #ff5757;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n &::after {\n content: '';\n width: 6px;\n height: 2px;\n background: #fefefe;\n }\n }\n }\n\n .table-toolbar-left {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 7px 0;\n label span:first-child {\n display: flex;\n }\n }\n"])), props => props.theme.breakpoints.values.md);
536
+ const Div = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .main {\n .left {\n width: 168px;\n flex-shrink: 0;\n margin-right: 65px;\n .tabs {\n padding-top: 16px;\n .tab {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n transition: background 0.4s;\n\n width: 168px;\n height: 36px;\n border-radius: 8px;\n\n cursor: pointer;\n user-select: none;\n\n &:nth-child(n + 2) {\n margin-top: 24px;\n }\n\n &.active {\n background: #f2f2f2;\n }\n\n &:hover {\n background: #f2f2f2;\n }\n\n .text {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n\n color: #222222;\n }\n\n .badge {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n color: #fff;\n background: #666666;\n font-size: 10px;\n font-weight: 400;\n &.is-rect {\n width: auto;\n border-radius: 8px;\n padding: 0 4px;\n }\n }\n }\n }\n @media (max-width: ", "px) {\n display: none;\n }\n }\n .right {\n flex-grow: 1;\n }\n }\n\n .member-block {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .member-avatar {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .member-text {\n margin-left: 10px;\n }\n .badge-block {\n width: 14px;\n height: 14px;\n position: absolute;\n right: -4px;\n top: -4px;\n background: #ff5757;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n &::after {\n content: '';\n width: 6px;\n height: 2px;\n background: #fefefe;\n }\n }\n }\n\n .table-toolbar-left {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 7px 0;\n }\n"])), props => props.theme.breakpoints.values.md);
531
537
  MemberList.propTypes = {
532
- type: _propTypes.default.oneOf(['server', 'blocklet']).isRequired
538
+ type: _propTypes.default.oneOf(['server', 'blocklet']).isRequired,
539
+ createPassportSvg: _propTypes.default.func.isRequired
533
540
  };