@abtnode/ux 1.16.6-beta-8be2fe37 → 1.16.6-beta-4562aa60

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.
@@ -87,20 +87,32 @@ function BlockletActions(_ref) {
87
87
  setConfirmSetting(null);
88
88
  let isRemoved = false;
89
89
  try {
90
- var _blocklet$settings;
91
90
  if (action === 'remove') {
92
91
  await fn(params);
93
- } else if (action === 'start' && !inService && !skipSetup && !((_blocklet$settings = blocklet.settings) !== null && _blocklet$settings !== void 0 && _blocklet$settings.initialized)) {
94
- // 启动 blocklet 并跳转到 setup 流程界面时携带 serverUrl 查询参数
95
- const serverUrl = (0, _util3.getServerUrl)(node.info);
96
- const url = new URL(recommendedUrl);
97
- url.searchParams.set('serverUrl', serverUrl);
98
- window.open(url.href);
99
- onComplete({
100
- action,
101
- blocklet
92
+ } else if (action === 'start') {
93
+ var _blocklet$settings;
94
+ if (!inService && !skipSetup && !((_blocklet$settings = blocklet.settings) !== null && _blocklet$settings !== void 0 && _blocklet$settings.initialized)) {
95
+ // 跳转到 setup 流程界面时携带 serverUrl 查询参数
96
+ const serverUrl = (0, _util3.getServerUrl)(node.info);
97
+ const url = new URL(recommendedUrl);
98
+ url.searchParams.set('serverUrl', serverUrl);
99
+ window.open(url.href);
100
+ onComplete({
101
+ action,
102
+ blocklet
103
+ });
104
+ return;
105
+ }
106
+ if (!(0, _util.hasRunnableComponent)(blocklet)) {
107
+ _toast.default.error(t('blocklet.noComponent'));
108
+ return;
109
+ }
110
+ const input = {
111
+ did: blocklet.meta.did
112
+ };
113
+ await fn({
114
+ input
102
115
  });
103
- return;
104
116
  } else {
105
117
  const input = {
106
118
  did: blocklet.meta.did
@@ -283,7 +295,7 @@ function BlockletActions(_ref) {
283
295
  icon: _icons.default.Start,
284
296
  name: t('common.start'),
285
297
  handler: createHandler('start', node.api.startBlocklet),
286
- disabled: !(0, _util.hasRunnableComponent)(blocklet) || blocklet.status === 'running' || blocklet.status === 'corrupted' || missingRequiredConfigs.length > 0 || (0, _util2.isDownloading)(blocklet.status) || blocklet.mode === _constant.BLOCKLET_MODES.DEVELOPMENT || recommendedUrlLoading || inProgress
298
+ disabled: blocklet.status === 'running' || blocklet.status === 'corrupted' || missingRequiredConfigs.length > 0 || (0, _util2.isDownloading)(blocklet.status) || blocklet.mode === _constant.BLOCKLET_MODES.DEVELOPMENT || recommendedUrlLoading || inProgress
287
299
  }, {
288
300
  action: 'stop',
289
301
  icon: _icons.default.Stop,
@@ -553,7 +553,7 @@ function BlockletEnvironment(_ref) {
553
553
  edge: "end",
554
554
  color: "error",
555
555
  size: "small",
556
- "data-cy": "invite-member",
556
+ "data-cy": "transfer-app",
557
557
  onClick: () => setShowTransferOwner(true),
558
558
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Loop.default, {
559
559
  style: {
@@ -43,28 +43,31 @@ const addComponentTabs = function addComponentTabs(tabs, blocklet) {
43
43
  let ancestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
44
44
  let depth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
45
45
  const key = [...ancestors.map(x => x.meta.did), blocklet.meta.did].join('/');
46
- tabs.push({
47
- label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
48
- pl: Math.max(1, depth - 1) * 2,
49
- display: "flex",
50
- alignItems: "center",
51
- justifyContent: "flex-start",
52
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_bundleAvatar.default, {
53
- size: 24,
54
- blocklet: blocklet,
55
- ancestors: ancestors
56
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
57
- ml: "16px",
58
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
59
- style: {
60
- color: '#222'
61
- },
62
- children: (0, _util.getDisplayName)(blocklet, true)
63
- })
64
- })]
65
- }, key),
66
- value: key
67
- });
46
+ const isContainer = !(ancestors !== null && ancestors !== void 0 && ancestors.length);
47
+ if (!isContainer) {
48
+ tabs.push({
49
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
50
+ pl: Math.max(1, depth - 1) * 2,
51
+ display: "flex",
52
+ alignItems: "center",
53
+ justifyContent: "flex-start",
54
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_bundleAvatar.default, {
55
+ size: 24,
56
+ blocklet: blocklet,
57
+ ancestors: ancestors
58
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
59
+ ml: "16px",
60
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
61
+ style: {
62
+ color: '#222'
63
+ },
64
+ children: (0, _util.getDisplayName)(blocklet, true)
65
+ })
66
+ })]
67
+ }, key),
68
+ value: key
69
+ });
70
+ }
68
71
  if (blocklet.children.length > 0) {
69
72
  blocklet.children.forEach(x => {
70
73
  addComponentTabs(tabs, x, [...ancestors, blocklet], depth + 1);
@@ -115,24 +115,29 @@ function TransferOwner(_ref) {
115
115
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
116
116
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
117
117
  component: Bold,
118
- children: t('team.transferApp.transferDialog.createSuccessTip', {
119
- expireDate: (0, _util.formatToDatetime)(result.expireDate)
120
- })
118
+ dangerouslySetInnerHTML: {
119
+ __html: t('team.transferApp.transferDialog.createSuccessTip1')
120
+ }
121
121
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
122
122
  component: Bold,
123
- mt: 1,
123
+ mt: 2,
124
124
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Bold, {
125
- children: t('team.transferApp.transferDialog.createSuccessTip2')
125
+ children: t('team.transferApp.transferDialog.createSuccessTip3')
126
126
  })
127
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
128
- style: {
129
- marginTop: '20px'
130
- }
131
127
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
132
128
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
133
- children: t('team.transferApp.transferDialog.link')
134
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_clickToCopy.default, {
135
- children: link
129
+ component: Bold,
130
+ mt: 2,
131
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Bold, {
132
+ children: t('team.transferApp.transferDialog.createSuccessTip2', {
133
+ expireDate: (0, _util.formatToDatetime)(result.expireDate)
134
+ })
135
+ })
136
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
137
+ my: 1,
138
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_clickToCopy.default, {
139
+ children: link
140
+ })
136
141
  })]
137
142
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
138
143
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControlLabel.default, {
package/lib/locales/en.js CHANGED
@@ -321,6 +321,7 @@ module.exports = {
321
321
  statusTip: 'Blocklet is {status}',
322
322
  initialUptime: 'Less than 1m',
323
323
  dashboard: 'Blocklet Dashboard',
324
+ noComponent: 'Application has no components and cannot be started',
324
325
  fromUrl: {
325
326
  title: 'Install Blocklet',
326
327
  label: 'Blocklet Meta URL',
@@ -995,8 +996,9 @@ module.exports = {
995
996
  newOwnerPermissions: 'The new Owner will have the right to manage all operations such as members, passports, and settings.'
996
997
  },
997
998
  createTransferLink: 'Generate Transfer Link',
998
- createSuccessTip: 'The transfer link is successfully created, click to copy and send the link to the invited member, please note that this invitation link can not be reused and will expire on {expireDate}',
999
- createSuccessTip2: 'Your transfer link will only be shown once and will not be viewable again after closing this dialog',
999
+ createSuccessTip1: 'The transfer link is successfully created, the invitee must use <a style="color: rgb(29, 193, 199)" target="_blank" href="https://www.didwallet.io/">DID Wallet</a> to receive the app ownership',
1000
+ createSuccessTip2: 'Please click to copy and send the link to the invited member, please note that this transfer link can not be reused and will expire on {expireDate}. Your transfer link will only be shown once and will not be viewable again after closing this dialog',
1001
+ createSuccessTip3: 'After the transfer is successful, the application will automatically restart to make the changes take effect',
1000
1002
  link: 'Transfer Link',
1001
1003
  iKnow: 'I have copied and saved the link'
1002
1004
  },
package/lib/locales/zh.js CHANGED
@@ -326,6 +326,7 @@ module.exports = {
326
326
  statusTip: 'Blocklet {status}',
327
327
  initialUptime: '少于1分钟',
328
328
  dashboard: 'Blocklet 控制台',
329
+ noComponent: '应用没有组件,无法启动',
329
330
  action: {
330
331
  stopDescription: '停止该基石程序将会使页面不可以访问,可能会导致使用它的用户出现错误',
331
332
  confirmStop: '是的,停止',
@@ -997,8 +998,9 @@ module.exports = {
997
998
  newOwnerPermissions: '新 Owner 将有权管理成员、通行证,以及设置等所有操作。'
998
999
  },
999
1000
  createTransferLink: '生成转移链接',
1000
- createSuccessTip: '创建转移链接成功,请复制并发送给被邀请人。该链接只能使用一次,并将在 {expireDate} 过期',
1001
- createSuccessTip2: '你的转移链接只会展示一次,关闭此窗口后将无法再次查看',
1001
+ createSuccessTip1: '创建转移链接成功,被邀请人必须使用 <a style="color: rgb(29, 193, 199)" target="_blank" href="https://www.didwallet.io/">DID Wallet</a> 接收应用所有权',
1002
+ createSuccessTip2: '请复制并发送给被邀请人。该链接只能使用一次,并将在 {expireDate} 过期。你的转移链接只会展示一次,关闭此窗口后将无法再次查看',
1003
+ createSuccessTip3: '转移成功之后应用会自动重启以使变更生效',
1002
1004
  link: '邀请链接',
1003
1005
  iKnow: '我已复制保存好该链接'
1004
1006
  },
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.6-beta-8be2fe37",
6
+ "version": "1.16.6-beta-4562aa60",
7
7
  "description": "UX components shared across abtnode packages",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -22,20 +22,20 @@
22
22
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
- "@abtnode/auth": "1.16.6-beta-8be2fe37",
26
- "@abtnode/constant": "1.16.6-beta-8be2fe37",
27
- "@abtnode/util": "1.16.6-beta-8be2fe37",
28
- "@arcblock/did-connect": "^2.5.25",
25
+ "@abtnode/auth": "1.16.6-beta-4562aa60",
26
+ "@abtnode/constant": "1.16.6-beta-4562aa60",
27
+ "@abtnode/util": "1.16.6-beta-4562aa60",
28
+ "@arcblock/did-connect": "^2.5.27",
29
29
  "@arcblock/did-motif": "^1.1.10",
30
- "@arcblock/icons": "^2.5.25",
31
- "@arcblock/react-hooks": "^2.5.25",
32
- "@arcblock/terminal": "^2.5.25",
33
- "@arcblock/ux": "^2.5.25",
34
- "@blocklet/constant": "1.16.6-beta-8be2fe37",
35
- "@blocklet/launcher-layout": "^2.0.30",
30
+ "@arcblock/icons": "^2.5.27",
31
+ "@arcblock/react-hooks": "^2.5.27",
32
+ "@arcblock/terminal": "^2.5.27",
33
+ "@arcblock/ux": "^2.5.27",
34
+ "@blocklet/constant": "1.16.6-beta-4562aa60",
35
+ "@blocklet/launcher-layout": "2.0.30",
36
36
  "@blocklet/list": "^0.11.18",
37
- "@blocklet/meta": "1.16.6-beta-8be2fe37",
38
- "@blocklet/ui-react": "^2.5.25",
37
+ "@blocklet/meta": "1.16.6-beta-4562aa60",
38
+ "@blocklet/ui-react": "^2.5.27",
39
39
  "@emotion/react": "^11.10.4",
40
40
  "@emotion/styled": "^11.10.4",
41
41
  "@iconify/react": "^4.0.0",
@@ -90,5 +90,5 @@
90
90
  "@babel/preset-react": "^7.18.6",
91
91
  "babel-plugin-inline-react-svg": "^1.1.2"
92
92
  },
93
- "gitHead": "27229a1a62850e95907b7a53e0259a809d99377b"
93
+ "gitHead": "e49856099ffc3c16eda77480a7ad93b2e9760764"
94
94
  }