@abtnode/ux 1.16.14-beta-c2843ec5 → 1.16.14-beta-be739405

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.
@@ -106,7 +106,7 @@ function BlockletActions(_ref) {
106
106
  _Toast.default.error(t('blocklet.noComponent'));
107
107
  return;
108
108
  }
109
- if (!inService && !skipSetup && !((_blocklet$settings = blocklet.settings) !== null && _blocklet$settings !== void 0 && _blocklet$settings.initialized)) {
109
+ if (!inService && !skipSetup && !((_blocklet$settings = blocklet.settings) !== null && _blocklet$settings !== void 0 && _blocklet$settings.initialized) && blocklet.mode !== _constant.BLOCKLET_MODES.DEVELOPMENT) {
110
110
  // 跳转到 setup 流程界面时携带 serverUrl 查询参数
111
111
  const serverUrl = (0, _util3.getServerUrl)(node.info);
112
112
  const url = new URL(recommendedUrl);
@@ -31,10 +31,9 @@ function ComponentConfiguration(_ref) {
31
31
  const {
32
32
  t
33
33
  } = (0, _context.useLocaleContext)();
34
- const isRoot = !ancestors.map(x => x.meta.did)[0];
35
- const isLevel1 = ancestors.length === 1;
34
+ const isComponent = !!ancestors.length;
36
35
  const [tab, setTab] = (0, _react.useState)('settings');
37
- const name = ancestors.concat(blocklet).slice(1).map(x => (0, _util.getDisplayName)(x, true)).join(' / ');
36
+ const name = isComponent ? (0, _util.getDisplayName)(blocklet, true) : t('blocklet.component.container');
38
37
  if ((0, _util2.isInstalling)(blocklet.status)) {
39
38
  return null;
40
39
  }
@@ -98,7 +97,7 @@ function ComponentConfiguration(_ref) {
98
97
  minHeight: 'auto'
99
98
  }
100
99
  },
101
- children: isRoot || isLevel1 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
100
+ children: isComponent ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
102
101
  mt: 1,
103
102
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tabs.default, {
104
103
  tabs: tabs,
@@ -20,15 +20,14 @@ var _SettingsOutlined = _interopRequireDefault(require("@mui/icons-material/Sett
20
20
  var _InfoOutlined = _interopRequireDefault(require("@mui/icons-material/InfoOutlined"));
21
21
  var _Launch = _interopRequireDefault(require("@mui/icons-material/Launch"));
22
22
  var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
23
- var _Collapse = _interopRequireDefault(require("@mui/material/Collapse"));
24
23
  var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
25
24
  var _ArrowForward = _interopRequireDefault(require("@mui/icons-material/ArrowForward"));
26
- var _ExpandMore = _interopRequireDefault(require("@mui/icons-material/ExpandMore"));
27
- var _ChevronRight = _interopRequireDefault(require("@mui/icons-material/ChevronRight"));
28
25
  var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
29
26
  var _Replay = _interopRequireDefault(require("@mui/icons-material/Replay"));
30
27
  var _Autorenew = _interopRequireDefault(require("@mui/icons-material/Autorenew"));
31
28
  var _Delete = _interopRequireDefault(require("@mui/icons-material/Delete"));
29
+ var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormControlLabel"));
30
+ var _Switch = _interopRequireDefault(require("@mui/material/Switch"));
32
31
  var _react2 = require("@iconify/react");
33
32
  var _constant = require("@abtnode/constant");
34
33
  var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
@@ -139,7 +138,7 @@ const getComponentName = (componentId, app) => {
139
138
  return names.join(' / ');
140
139
  };
141
140
  function ComponentItem(_ref) {
142
- var _blocklet$dependents, _blocklet$dependents2, _blocklet$dependents3, _blocklet$children;
141
+ var _blocklet$dependents, _blocklet$dependents2, _blocklet$dependents3;
143
142
  let {
144
143
  blocklet,
145
144
  ancestors,
@@ -156,7 +155,6 @@ function ComponentItem(_ref) {
156
155
  t,
157
156
  locale
158
157
  } = (0, _react.useContext)(_context.LocaleContext);
159
- const [expand, setExpand] = (0, _react.useState)(true);
160
158
  const [componentInfo, setComponentInfo] = (0, _react.useState)();
161
159
  const [showDeleteConfirm, setShowDeleteConfirm] = (0, _react.useState)(false);
162
160
  const [loading, setLoading] = (0, _react.useState)(false);
@@ -167,21 +165,10 @@ function ComponentItem(_ref) {
167
165
  let {
168
166
  status
169
167
  } = blocklet;
170
- if (depth <= 1 && deletingComponents.includes(blocklet.meta.did)) {
168
+ if (depth === 1 && deletingComponents.includes(blocklet.meta.did)) {
171
169
  status = 'deleting';
172
170
  }
173
- const mountPoint = "/".concat(ancestors.slice(1) // ignore mountPoint of root component
174
- .map(x => x.mountPoint || '/').join('/'), "/").concat(blocklet.mountPoint || '/').replace(/\/+/g, '/');
175
- const canExpand = depth > 0 && blocklet.children.length > 0;
176
- const expandIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
177
- size: "small",
178
- children: expand ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandMore.default, {
179
- fontSize: "inherit"
180
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChevronRight.default, {
181
- fontSize: "inherit"
182
- })
183
- });
184
- const root = ancestors[0] || blocklet;
171
+ const mountPoint = "/".concat(blocklet.mountPoint || '/').replace(/\/+/g, '/');
185
172
  const href = getComponentUrl(mountPoint);
186
173
  const renderRows = rows => rows.map(row => {
187
174
  if (row.name === t('common.did') || row.name === t('blocklet.appId')) {
@@ -272,10 +259,10 @@ function ComponentItem(_ref) {
272
259
  }))
273
260
  })
274
261
  } : null].filter(Boolean) : [];
262
+ const appInProgress = (0, _util.isInProgress)(app.status);
263
+ const componentInProgress = (0, _util.isInProgress)(blocklet.status);
275
264
  let deleteDisabledTip = '';
276
- if (depth !== 1) {
277
- deleteDisabledTip = t('blocklet.component.tip.notDynamic');
278
- } else if ((0, _util.isInProgress)(root.status) || depth === 1 && deletingComponents.includes(blocklet.meta.did)) {
265
+ if (appInProgress || componentInProgress || depth === 1 && deletingComponents.includes(blocklet.meta.did)) {
279
266
  deleteDisabledTip = t('blocklet.component.tip.stopBlocklet');
280
267
  } else if ((_blocklet$dependents2 = blocklet.dependents) !== null && _blocklet$dependents2 !== void 0 && _blocklet$dependents2.length) {
281
268
  const requires = blocklet.dependents.filter(x => x.required);
@@ -286,29 +273,21 @@ function ComponentItem(_ref) {
286
273
  });
287
274
  }
288
275
  }
289
- const appInProgress = (0, _util.isInProgress)(root.status);
290
- const componentInProgress = (0, _util.isInProgress)(blocklet.status);
291
- return [(depth > 0 || blocklet.meta.group !== 'gateway') && /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledComponentRow, {
276
+ return [/*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledComponentRow, {
292
277
  display: "flex",
293
278
  py: 2,
294
279
  className: "component-item",
295
280
  justifyContent: "space-between",
296
281
  alignItems: "center",
297
282
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
298
- pl: Math.max((depth - 1) * 2, 0),
283
+ pl: 2,
299
284
  width: {
300
285
  xs: 300,
301
286
  md: 400
302
287
  },
303
288
  display: "flex",
304
289
  alignItems: "center",
305
- style: {
306
- cursor: canExpand ? 'pointer' : 'cursor'
307
- },
308
- onClick: () => canExpand && setExpand(!expand),
309
- children: [canExpand ? expandIcon : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
310
- width: 28
311
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bundleAvatar.default, {
290
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_bundleAvatar.default, {
312
291
  blocklet: blocklet,
313
292
  ancestors: ancestors
314
293
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
@@ -414,11 +393,11 @@ function ComponentItem(_ref) {
414
393
  }, "config");
415
394
  }
416
395
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_start.default, {
417
- blocklet: root,
396
+ blocklet: app,
418
397
  component: blocklet,
419
398
  onStart: onStart,
420
399
  onStop: onStop,
421
- disabled: root.status !== 'starting' && (0, _util.isInProgress)(root.status)
400
+ disabled: app.status !== 'starting' && (0, _util.isInProgress)(app.status)
422
401
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_actions.default, {
423
402
  "data-cy": "component-actions",
424
403
  actions: [{
@@ -460,27 +439,14 @@ function ComponentItem(_ref) {
460
439
  onClick: () => {
461
440
  setShowDeleteConfirm(true);
462
441
  },
463
- disabled: appInProgress || componentInProgress
442
+ disabled: appInProgress || componentInProgress || !!deleteDisabledTip,
443
+ tip: deleteDisabledTip
464
444
  }]
465
445
  })]
466
446
  }, "actions")]
467
447
  }, "group-not-gateway-box"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_line.default, {
468
- depth: depth
469
- }), (_blocklet$children = blocklet.children) !== null && _blocklet$children !== void 0 && _blocklet$children.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Collapse.default, {
470
- in: expand,
471
- children: blocklet.children.map(x => /*#__PURE__*/(0, _jsxRuntime.jsx)(ComponentItem, {
472
- blocklet: x,
473
- ancestors: [...ancestors, blocklet],
474
- depth: depth + 1,
475
- onRemove: onRemove,
476
- onStart: onStart,
477
- onStop: onStop,
478
- onRestart: onRestart,
479
- onReload: onReload,
480
- getComponentUrl: getComponentUrl,
481
- app: app
482
- }, "".concat(depth + 1, "-").concat(x.meta.did)))
483
- }, "blocklet-collapse") : null, !!componentInfo && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
448
+ depth: 2
449
+ }), !!componentInfo && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
484
450
  open: true,
485
451
  fullWidth: true,
486
452
  maxWidth: "md",
@@ -496,7 +462,7 @@ function ComponentItem(_ref) {
496
462
  })]
497
463
  }, "dialog-wrapper")
498
464
  }, "base-info-dialog"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_delete.default, {
499
- blocklet: root,
465
+ blocklet: app,
500
466
  component: blocklet,
501
467
  remove: async function remove() {
502
468
  setLoading(true);
@@ -509,8 +475,6 @@ function ComponentItem(_ref) {
509
475
  setShowDeleteConfirm(false);
510
476
  },
511
477
  onCancel: () => setShowDeleteConfirm(false),
512
- disabled: !!deleteDisabledTip,
513
- tip: deleteDisabledTip,
514
478
  hideBtn: true,
515
479
  showConfirm: showDeleteConfirm
516
480
  }), confirmSetting && /*#__PURE__*/(0, _jsxRuntime.jsx)(_confirm.default, {
@@ -570,6 +534,8 @@ function BlockletComponent(_ref4) {
570
534
  } = (0, _deletingBlocklets.useDeletingBlockletContext)();
571
535
  const [loading, setLoading] = (0, _react.useState)(false);
572
536
  const [updateConfirm, setUpdateConfirm] = (0, _react.useState)(null);
537
+ const [showSettings, setShowSettings] = (0, _react.useState)(null);
538
+ const [showContainer, setShowContainer] = (0, _react.useState)(false);
573
539
  const needMigration = blocklet && blocklet.structVersion !== _constant.APP_STRUCT_VERSION;
574
540
 
575
541
  // update dot is not used but maybe useful in the further
@@ -836,16 +802,37 @@ function BlockletComponent(_ref4) {
836
802
  }), t('blocklet.component.add')]
837
803
  });
838
804
  }
805
+ }), !needMigration && /*#__PURE__*/(0, _jsxRuntime.jsx)(_configuration.default, {
806
+ blocklet: blocklet,
807
+ ancestors: [],
808
+ children: _ref9 => {
809
+ let {
810
+ open
811
+ } = _ref9;
812
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
813
+ title: "".concat(t('blocklet.component.container')).concat(t('common.config')),
814
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
815
+ onClick: open,
816
+ size: "small",
817
+ color: "primary",
818
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsOutlined.default, {
819
+ style: {
820
+ fontSize: 18
821
+ }
822
+ })
823
+ })
824
+ }, "config");
825
+ }
839
826
  })]
840
827
  })
841
828
  })]
842
- }), components && components.length ? [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
829
+ }), components && components.length ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
843
830
  mt: 2,
844
831
  ml: {
845
832
  xs: '-12px',
846
833
  md: '-24px'
847
834
  },
848
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ComponentItem, {
835
+ children: [blocklet.meta.group !== 'gateway' && /*#__PURE__*/(0, _jsxRuntime.jsx)(ComponentItem, {
849
836
  blocklet: blocklet,
850
837
  app: blocklet,
851
838
  onRemove: removeComponent,
@@ -854,8 +841,19 @@ function BlockletComponent(_ref4) {
854
841
  onReload: reloadComponent,
855
842
  onRestart: restartComponent,
856
843
  getComponentUrl: getComponentUrl
857
- }, "0-".concat(blocklet.meta.did))
858
- }, "top-blocklet-".concat(blocklet.meta.did))] : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
844
+ }, "0-".concat(blocklet.meta.did)), blocklet.children.map(component => /*#__PURE__*/(0, _jsxRuntime.jsx)(ComponentItem, {
845
+ depth: 1,
846
+ blocklet: component,
847
+ ancestors: [blocklet],
848
+ app: blocklet,
849
+ onRemove: removeComponent,
850
+ onStart: startComponent,
851
+ onStop: stopComponent,
852
+ onReload: reloadComponent,
853
+ onRestart: restartComponent,
854
+ getComponentUrl: getComponentUrl
855
+ }, "1-".concat(component.meta.did)))]
856
+ }, "top-blocklet-".concat(blocklet.meta.did)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
859
857
  mt: 8,
860
858
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Empty.default, {
861
859
  children: t('blocklet.component.noComponent')
@@ -947,6 +945,27 @@ function BlockletComponent(_ref4) {
947
945
  })]
948
946
  })]
949
947
  })
948
+ }), !!showSettings && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
949
+ open: true,
950
+ fullWidth: true,
951
+ onClose: () => setShowSettings(false),
952
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
953
+ paddingY: 1.5,
954
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DialogTitle.default, {
955
+ children: t('common.configuration')
956
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DialogContent.default, {
957
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
958
+ py: 2,
959
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControlLabel.default, {
960
+ control: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, {
961
+ checked: showContainer,
962
+ onChange: e => setShowContainer(!!e.target.checked)
963
+ }),
964
+ label: t('blocklet.component.showContainer')
965
+ })
966
+ })
967
+ })]
968
+ })
950
969
  })]
951
970
  }));
952
971
  }
@@ -23,6 +23,7 @@ var _context = require("@arcblock/ux/lib/Locale/context");
23
23
  var _Tabs = _interopRequireDefault(require("@arcblock/ux/lib/Tabs"));
24
24
  var _util = require("@blocklet/meta/lib/util");
25
25
  var _bundleAvatar = _interopRequireDefault(require("../bundle-avatar"));
26
+ var _appAvatar = _interopRequireDefault(require("../app-avatar"));
26
27
  var _configuration = _interopRequireDefault(require("../configuration"));
27
28
  var _notification = _interopRequireDefault(require("../notification"));
28
29
  var _index = _interopRequireDefault(require("../access/index"));
@@ -42,47 +43,59 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
42
43
  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); }
43
44
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
44
45
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
45
- const addComponentTabs = function addComponentTabs(tabs, blocklet) {
46
- let ancestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
47
- let depth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
46
+ const addComponentTabs = _ref => {
47
+ let {
48
+ tabs,
49
+ blocklet,
50
+ ancestors = [],
51
+ depth = 1,
52
+ t
53
+ } = _ref;
48
54
  const key = [...ancestors.map(x => x.meta.did), blocklet.meta.did].join('/');
49
55
  const isContainer = !(ancestors !== null && ancestors !== void 0 && ancestors.length);
50
- if (!isContainer) {
51
- tabs.push({
52
- label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
53
- pl: Math.max(1, depth - 1) * 2,
54
- display: "flex",
55
- alignItems: "center",
56
- justifyContent: "flex-start",
57
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_bundleAvatar.default, {
58
- size: 24,
59
- blocklet: blocklet,
60
- ancestors: ancestors
61
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
62
- ml: "16px",
63
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
64
- style: {
65
- color: '#222'
66
- },
67
- children: (0, _util.getDisplayName)(blocklet, true)
68
- })
69
- })]
70
- }, key),
71
- value: key
72
- });
73
- }
56
+ tabs.push({
57
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
58
+ pl: Math.max(1, depth - 1) * 2,
59
+ display: "flex",
60
+ alignItems: "center",
61
+ justifyContent: "flex-start",
62
+ children: [isContainer ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_appAvatar.default, {
63
+ size: 24,
64
+ blocklet: blocklet
65
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_bundleAvatar.default, {
66
+ size: 24,
67
+ blocklet: blocklet,
68
+ ancestors: ancestors
69
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
70
+ ml: "16px",
71
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
72
+ style: {
73
+ color: '#222'
74
+ },
75
+ children: isContainer ? t('blocklet.component.container') : (0, _util.getDisplayName)(blocklet, true)
76
+ })
77
+ })]
78
+ }, key),
79
+ value: key
80
+ });
74
81
  if (blocklet.children.length > 0) {
75
82
  blocklet.children.forEach(x => {
76
- addComponentTabs(tabs, x, [...ancestors, blocklet], depth + 1);
83
+ addComponentTabs({
84
+ tabs,
85
+ blocklet: x,
86
+ ancestors: [...ancestors, blocklet],
87
+ depth: depth + 1,
88
+ t
89
+ });
77
90
  });
78
91
  }
79
92
  };
80
- function BlockletPreferences(_ref) {
93
+ function BlockletPreferences(_ref2) {
81
94
  let {
82
95
  blocklet,
83
96
  onUpdate
84
- } = _ref,
85
- rest = _objectWithoutProperties(_ref, _excluded);
97
+ } = _ref2,
98
+ rest = _objectWithoutProperties(_ref2, _excluded);
86
99
  const {
87
100
  t
88
101
  } = (0, _react.useContext)(_context.LocaleContext);
@@ -205,7 +218,11 @@ function BlockletPreferences(_ref) {
205
218
  value: 'preference'
206
219
  }];
207
220
  if (expandPref) {
208
- addComponentTabs(tabs, blocklet);
221
+ addComponentTabs({
222
+ tabs,
223
+ blocklet,
224
+ t
225
+ });
209
226
  }
210
227
  const onTabChange = x => {
211
228
  if (x === 'preference') {
package/lib/locales/en.js CHANGED
@@ -500,6 +500,8 @@ module.exports = {
500
500
  star: 'Star'
501
501
  },
502
502
  component: {
503
+ container: 'Global Config',
504
+ showContainer: 'Show Global Config',
503
505
  didSpaceConfig: 'Configure DID Spaces',
504
506
  didSpaceConfigTip: 'Complete the following authorize process to store application data in DID Spaces',
505
507
  didSpaceConnected: 'Storage being authorized to: {endpoint}',
package/lib/locales/zh.js CHANGED
@@ -507,6 +507,8 @@ module.exports = {
507
507
  star: '收藏数'
508
508
  },
509
509
  component: {
510
+ container: '全局配置',
511
+ showContainer: '显示全局配置',
510
512
  didSpaceConfig: '配置 DID Spaces',
511
513
  didSpaceConfigTip: '完成以下授权流程,即可将应用数据存储到 DID Spaces 中',
512
514
  didSpaceConnected: '正在授权存储到:{endpoint}',
@@ -67,21 +67,18 @@ const isFromExternal = (user, appIdList) => {
67
67
  });
68
68
  };
69
69
  function SimpleInfo(_ref) {
70
- var _window$blocklet, _window$blocklet$capa;
71
70
  let {
72
71
  user
73
72
  } = _ref;
74
73
  const {
75
74
  t
76
75
  } = (0, _react.useContext)(_context.LocaleContext);
77
- const hasImageService = ((_window$blocklet = window.blocklet) === null || _window$blocklet === void 0 ? void 0 : (_window$blocklet$capa = _window$blocklet.capabilities) === null || _window$blocklet$capa === void 0 ? void 0 : _window$blocklet$capa.httpImageFilter) || false;
78
- const avatar = hasImageService ? "".concat(user.avatar, "/resize?w=48&h=48") : user.avatar;
79
76
  const main = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
80
77
  className: "member-block",
81
78
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
82
79
  className: "member-avatar",
83
80
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
84
- src: avatar,
81
+ src: "".concat(user.avatar, "?imageFilter=resize&w=48&h=48"),
85
82
  size: 24,
86
83
  did: user.did,
87
84
  shape: "circle",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.14-beta-c2843ec5",
3
+ "version": "1.16.14-beta-be739405",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -23,23 +23,23 @@
23
23
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@abtnode/auth": "1.16.14-beta-c2843ec5",
27
- "@abtnode/constant": "1.16.14-beta-c2843ec5",
28
- "@abtnode/util": "1.16.14-beta-c2843ec5",
26
+ "@abtnode/auth": "1.16.14-beta-be739405",
27
+ "@abtnode/constant": "1.16.14-beta-be739405",
28
+ "@abtnode/util": "1.16.14-beta-be739405",
29
29
  "@ahooksjs/use-url-state": "^3.5.1",
30
30
  "@arcblock/did": "^1.18.87",
31
- "@arcblock/did-connect": "^2.6.2",
31
+ "@arcblock/did-connect": "^2.6.5",
32
32
  "@arcblock/did-motif": "^1.1.13",
33
- "@arcblock/icons": "^2.6.2",
34
- "@arcblock/nft-display": "2.6.2",
35
- "@arcblock/react-hooks": "^2.6.2",
36
- "@arcblock/terminal": "^2.6.2",
37
- "@arcblock/ux": "^2.6.2",
38
- "@blocklet/constant": "1.16.14-beta-c2843ec5",
39
- "@blocklet/launcher-layout": "2.1.72",
40
- "@blocklet/list": "^0.12.15",
41
- "@blocklet/meta": "1.16.14-beta-c2843ec5",
42
- "@blocklet/ui-react": "^2.6.2",
33
+ "@arcblock/icons": "^2.6.5",
34
+ "@arcblock/nft-display": "2.6.5",
35
+ "@arcblock/react-hooks": "^2.6.5",
36
+ "@arcblock/terminal": "^2.6.5",
37
+ "@arcblock/ux": "^2.6.5",
38
+ "@blocklet/constant": "1.16.14-beta-be739405",
39
+ "@blocklet/launcher-layout": "2.1.80",
40
+ "@blocklet/list": "^0.12.20",
41
+ "@blocklet/meta": "1.16.14-beta-be739405",
42
+ "@blocklet/ui-react": "^2.6.5",
43
43
  "@emotion/react": "^11.10.4",
44
44
  "@emotion/styled": "^11.10.4",
45
45
  "@iconify/react": "^4.0.0",
@@ -97,5 +97,5 @@
97
97
  "@babel/preset-react": "^7.18.6",
98
98
  "babel-plugin-inline-react-svg": "^1.1.2"
99
99
  },
100
- "gitHead": "968bfad93779a21dd1374eede3ac7d4d6d40822b"
100
+ "gitHead": "4a7be8e8a321f8be5b172c10c09c32af216a1c73"
101
101
  }