@abtnode/ux 1.8.69-beta-76f8a46f → 1.8.69-beta-650a290b

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.
@@ -44,8 +44,7 @@ function ComponentSetting(_ref) {
44
44
  const rootDid = isRoot ? blocklet.meta.did : ancestors.map(x => x.meta.did)[0];
45
45
  const [loading, setLoading] = (0, _react.useState)('');
46
46
  const [mountPointHelperText, setMountPointHelperText] = (0, _react.useState)('');
47
- const isDev = (0, _util.isBlockletDev)(blocklet);
48
- const disabled = isDev || loading || !hasPermission;
47
+ const disabled = loading || !hasPermission;
49
48
  if (!rootDid) {
50
49
  return null;
51
50
  }
@@ -65,7 +65,7 @@ function BlockletMigration() {
65
65
  const {
66
66
  href
67
67
  } = window.location;
68
- const newHref = href.replace(blocklet.meta.bundleDid, blocklet.appDid);
68
+ const newHref = href.replace(blocklet.meta.bundleDid, blocklet.appPid);
69
69
  setTimeout(() => {
70
70
  window.location.href = newHref;
71
71
  }, 5000);
@@ -84,22 +84,22 @@ function BlockletMigration() {
84
84
  display: "flex",
85
85
  alignItems: "center",
86
86
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
87
+ variant: "contained",
88
+ size: "small",
89
+ color: "primary",
87
90
  onClick: () => onMigrate(),
91
+ style: {
92
+ marginRight: 8
93
+ },
88
94
  children: t('blocklet.migrate.intro.l1')
89
95
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
90
96
  children: t('blocklet.migrate.intro.l2')
91
97
  })]
92
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
93
- ml: 3,
98
+ }), ['l3', 'l4', 'l5', 'l6'].map(x => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
94
99
  display: "flex",
95
100
  alignItems: "center",
96
- children: t('blocklet.migrate.intro.l3')
97
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
98
- ml: 3,
99
- display: "flex",
100
- alignItems: "center",
101
- children: t('blocklet.migrate.intro.l4')
102
- })]
101
+ children: t("blocklet.migrate.intro.".concat(x))
102
+ }, x))]
103
103
  }), blocklet && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Connect.default, {
104
104
  popup: true,
105
105
  open: openConnect,
@@ -10,6 +10,7 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
10
10
  var _useSetState = _interopRequireDefault(require("react-use/lib/useSetState"));
11
11
  var _Connect = _interopRequireDefault(require("@arcblock/did-connect/lib/Connect"));
12
12
  var _Box = _interopRequireDefault(require("@mui/material/Box"));
13
+ var _constant = require("@abtnode/constant");
13
14
  var _context = require("@arcblock/ux/lib/Locale/context");
14
15
  var _formTextInput = _interopRequireDefault(require("../../form/form-text-input"));
15
16
  var _confirm = _interopRequireDefault(require("../../confirm"));
@@ -57,13 +58,13 @@ function AppSk(_ref) {
57
58
  const onClose = () => setState({
58
59
  isConnectOpen: false
59
60
  });
60
- const triggers = [{
61
+ const triggers = blocklet.structVersion === _constant.APP_STRUCT_VERSION ? [{
61
62
  key: 'rotate-with-did-wallet',
62
63
  title: 'Migrate with DID Wallet',
63
64
  handler: () => setState({
64
65
  isConnectOpen: true
65
66
  })
66
- }];
67
+ }] : [];
67
68
  return [/*#__PURE__*/(0, _jsxRuntime.jsx)(_formTextInput.default, {
68
69
  disabled: disabled,
69
70
  loading: loading,
package/lib/locales/en.js CHANGED
@@ -528,9 +528,11 @@ module.exports = {
528
528
  success: 'Your application is successfully migrated, the page will be refreshed in {sec} seconds',
529
529
  intro: {
530
530
  l1: 'Click here',
531
- l2: 'to migrate your application',
532
- l3: '1. Your Application DID will be fully controlled in your DID Wallet.',
533
- l4: '2. The component structure will be updated and you can manage your components more flexibly.'
531
+ l2: 'to migrate your application to new version (changes are disabled before the migration completes)',
532
+ l3: '1. The application DID will be fully controlled from your DID Wallet.',
533
+ l4: '2. The application data will be migrated, and no further changes required.',
534
+ l5: '3. The new application structure will give you more flexibly when change components.',
535
+ l6: '4. Please do not change component mount points before component new version is out.'
534
536
  },
535
537
  tip: {
536
538
  duplicate: 'Find duplicate component {name}, please delete useless components and migrate again',
package/lib/locales/zh.js CHANGED
@@ -536,9 +536,11 @@ module.exports = {
536
536
  success: '你的应用已迁移成功,页面将在 {sec} 秒后刷新',
537
537
  intro: {
538
538
  l1: '点击这里',
539
- l2: '迁移你的应用',
540
- l3: '1. 应用程序的 DID 将在你的钱包中完全控制。',
541
- l4: '2. 组件结构将更新,你可以更灵活地管理您的组件。'
539
+ l2: '迁移应用到新版(迁移完成之前组件升级将被禁用)',
540
+ l3: '1. 应用的钥匙对将完全由钱包管理',
541
+ l4: '2. 应用的数据将平滑迁移,不会丢失',
542
+ l5: '3. 新的结构将为你组合应用提供更大的灵活性',
543
+ l6: '4. 在组件有新版之前,请不要在迁移之后随意变更组件挂载点'
542
544
  },
543
545
  tip: {
544
546
  duplicate: '发现重复的组件 {name},请删除无用组件并重新迁移',
@@ -24,6 +24,7 @@ var _createPassportSvg = _interopRequireDefault(require("@abtnode/auth/lib/util/
24
24
  var _node = require("../../contexts/node");
25
25
  var _session = require("../../contexts/session");
26
26
  var _team = require("../../contexts/team");
27
+ var _blocklet = require("../../contexts/blocklet");
27
28
  var _util = require("../../util");
28
29
  var _confirm = _interopRequireDefault(require("../../confirm"));
29
30
  var _permission = _interopRequireDefault(require("../../permission"));
@@ -91,6 +92,9 @@ function Passports(_ref2) {
91
92
  passportColor,
92
93
  blocklet
93
94
  } = (0, _team.useTeamContext)();
95
+ const {
96
+ appIdList: idList
97
+ } = (0, _blocklet.useBlockletContext)();
94
98
  const {
95
99
  api,
96
100
  inService
@@ -102,6 +106,7 @@ function Passports(_ref2) {
102
106
  const [toggleConfirm, setToggleConfirm] = (0, _react.useState)(null);
103
107
  const [showIssueDialog, setShowIssueDialog] = (0, _react.useState)(false);
104
108
  const [search, setSearch] = (0, _react.useState)('');
109
+ const appIdList = [teamIssuerDid, ...(idList || [])].filter(Boolean);
105
110
  const passports = ((0, _get.default)(user, 'passports') || []).map(x => _objectSpread(_objectSpread({}, x), {}, {
106
111
  revoked: x.status === _constant.PASSPORT_STATUS.REVOKED
107
112
  }));
@@ -249,9 +254,9 @@ function Passports(_ref2) {
249
254
  alignItems: "center",
250
255
  children: [(0, _upperFirst.default)(x.title), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
251
256
  className: "status-icons",
252
- children: [!!teamIssuerDid && x.issuer.id !== teamIssuerDid && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExternalIssuerIcon.default, {}), x.revoked && /*#__PURE__*/(0, _jsxRuntime.jsx)(_RevokeIcon.default, {})]
257
+ children: [!!appIdList.length && !appIdList.includes(x.issuer.id) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExternalIssuerIcon.default, {}), x.revoked && /*#__PURE__*/(0, _jsxRuntime.jsx)(_RevokeIcon.default, {})]
253
258
  })]
254
- }), !!teamIssuerDid && x.issuer.id !== teamIssuerDid && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
259
+ }), !!appIdList.length && !appIdList.includes(x.issuer.id) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
255
260
  className: "tip",
256
261
  children: [x.issuer.id !== teamIssuerDid && !trustedPassports.some(y => y.issuerDid === x.issuer.id) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
257
262
  title: t('team.passport.notTrustedIssuerTip'),
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.8.69-beta-76f8a46f",
6
+ "version": "1.8.69-beta-650a290b",
7
7
  "description": "UX components shared across abtnode packages",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -21,19 +21,19 @@
21
21
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@abtnode/auth": "1.8.69-beta-76f8a46f",
25
- "@abtnode/constant": "1.8.69-beta-76f8a46f",
26
- "@abtnode/util": "1.8.69-beta-76f8a46f",
27
- "@arcblock/did-connect": "^2.5.5",
24
+ "@abtnode/auth": "1.8.69-beta-650a290b",
25
+ "@abtnode/constant": "1.8.69-beta-650a290b",
26
+ "@abtnode/util": "1.8.69-beta-650a290b",
27
+ "@arcblock/did-connect": "^2.5.10",
28
28
  "@arcblock/did-motif": "^1.1.10",
29
- "@arcblock/icons": "^2.5.5",
30
- "@arcblock/terminal": "^2.5.5",
31
- "@arcblock/ux": "^2.5.5",
32
- "@blocklet/constant": "1.8.69-beta-76f8a46f",
29
+ "@arcblock/icons": "^2.5.10",
30
+ "@arcblock/terminal": "^2.5.10",
31
+ "@arcblock/ux": "^2.5.10",
32
+ "@blocklet/constant": "1.8.69-beta-650a290b",
33
33
  "@blocklet/launcher-layout": "^1.9.65",
34
34
  "@blocklet/list": "^0.11.6",
35
- "@blocklet/meta": "1.8.69-beta-76f8a46f",
36
- "@blocklet/ui-react": "^2.5.5",
35
+ "@blocklet/meta": "1.8.69-beta-650a290b",
36
+ "@blocklet/ui-react": "^2.5.10",
37
37
  "@emotion/react": "^11.10.4",
38
38
  "@emotion/styled": "^11.10.4",
39
39
  "@iconify/react": "^4.0.0",
@@ -86,5 +86,5 @@
86
86
  "@babel/preset-react": "^7.18.6",
87
87
  "babel-plugin-inline-react-svg": "^1.1.2"
88
88
  },
89
- "gitHead": "07415e674443b85648ea80b734f7a3690abfc15e"
89
+ "gitHead": "a33c9ce6a52b8d522d13860e85809dcbba236712"
90
90
  }