@abtnode/ux 1.16.13-beta-a83ad86d → 1.16.13-beta-0656f92f

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.
@@ -45,6 +45,7 @@ var _tag = _interopRequireDefault(require("../../tag"));
45
45
  var _blockletSource = _interopRequireDefault(require("../blocklet-source"));
46
46
  var _status = _interopRequireDefault(require("../status"));
47
47
  var _version = _interopRequireDefault(require("../version"));
48
+ var _confirm = _interopRequireDefault(require("../../confirm"));
48
49
  var _node = require("../../contexts/node");
49
50
  var _util2 = require("../../util");
50
51
  var _permission = _interopRequireDefault(require("../../permission"));
@@ -158,6 +159,7 @@ function ComponentItem(_ref) {
158
159
  const [componentInfo, setComponentInfo] = (0, _react.useState)();
159
160
  const [showDeleteConfirm, setShowDeleteConfirm] = (0, _react.useState)(false);
160
161
  const [loading, setLoading] = (0, _react.useState)(false);
162
+ const [confirmSetting, setConfirmSetting] = (0, _react.useState)(null);
161
163
  const {
162
164
  deletingBlocklets: deletingComponents
163
165
  } = (0, _deletingBlocklets.useDeletingBlockletContext)();
@@ -427,10 +429,19 @@ function ComponentItem(_ref) {
427
429
  }, {
428
430
  icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Replay.default, {}),
429
431
  text: t('common.restart'),
430
- onClick: async () => {
431
- setLoading(true);
432
- await onRestart(blocklet);
433
- setLoading(false);
432
+ onClick: () => {
433
+ setConfirmSetting({
434
+ title: "".concat(t('common.restart'), " ").concat(blocklet.meta.title),
435
+ description: t('blocklet.action.restartDescription'),
436
+ confirm: t('blocklet.action.confirmRestart'),
437
+ cancel: t('common.cancel'),
438
+ onConfirm: async () => {
439
+ setLoading(true);
440
+ await onRestart(blocklet);
441
+ setLoading(false);
442
+ },
443
+ onCancel: () => setConfirmSetting(null)
444
+ });
434
445
  },
435
446
  disabled: appInProgress || componentInProgress || blocklet.status !== 'running'
436
447
  }, {
@@ -501,6 +512,14 @@ function ComponentItem(_ref) {
501
512
  tip: deleteDisabledTip,
502
513
  hideBtn: true,
503
514
  showConfirm: showDeleteConfirm
515
+ }), confirmSetting && /*#__PURE__*/(0, _jsxRuntime.jsx)(_confirm.default, {
516
+ title: confirmSetting.title,
517
+ description: confirmSetting.description,
518
+ confirm: confirmSetting.confirm,
519
+ cancel: confirmSetting.cancel,
520
+ params: confirmSetting.params,
521
+ onConfirm: confirmSetting.onConfirm,
522
+ onCancel: confirmSetting.onCancel
504
523
  })];
505
524
  }
506
525
  ComponentItem.propTypes = {
package/lib/locales/en.js CHANGED
@@ -678,7 +678,7 @@ module.exports = {
678
678
  switchLabel: 'Welcome Page'
679
679
  },
680
680
  upgrade: {
681
- title: 'Upgrade Blocklet Server to v{version}',
681
+ title: 'Upgrade Blocklet Server {version}',
682
682
  description: 'During the upgrade, your Blocklet Server will enter maintenance mode for a few minutes while the update is completed.',
683
683
  dialog: 'Click on "confirm" to install the update. Blocklet Server will enter maintenance mode until the update is completed and return to production mode automatically.',
684
684
  confirm: 'Upgrade',
package/lib/locales/zh.js CHANGED
@@ -678,7 +678,7 @@ module.exports = {
678
678
  webWalletUrl: 'DID Wallet 地址',
679
679
  webWalletUrlPlaceholder: '你可以使用自己运行的 "DID Wallet", 也可以使用官方提供的版本',
680
680
  upgrade: {
681
- title: '升级节点到 v{version}',
681
+ title: '升级节点 {version}',
682
682
  description: '在升级期间,节点将会进入维护模式几分钟。',
683
683
  dialog: '点击 “确认” 安装更新。节点将进入维护模式,直到更新完成并自动返回生产模式。',
684
684
  confirm: '升级',
@@ -1236,7 +1236,7 @@ module.exports = {
1236
1236
  extracting: '提取应用包的数据...',
1237
1237
  downloadingComponent: '下载 {name}',
1238
1238
  extractingComponent: '提取 {name}',
1239
- installing: '安装应用置组件...',
1239
+ installing: '安装应用组件...',
1240
1240
  installed: '已安装',
1241
1241
  starting: '正在启动应用...',
1242
1242
  done: '等待应用就绪...'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.13-beta-a83ad86d",
3
+ "version": "1.16.13-beta-0656f92f",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -23,9 +23,9 @@
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.13-beta-a83ad86d",
27
- "@abtnode/constant": "1.16.13-beta-a83ad86d",
28
- "@abtnode/util": "1.16.13-beta-a83ad86d",
26
+ "@abtnode/auth": "1.16.13-beta-0656f92f",
27
+ "@abtnode/constant": "1.16.13-beta-0656f92f",
28
+ "@abtnode/util": "1.16.13-beta-0656f92f",
29
29
  "@ahooksjs/use-url-state": "^3.5.1",
30
30
  "@arcblock/did": "^1.18.84",
31
31
  "@arcblock/did-connect": "^2.5.53",
@@ -34,10 +34,10 @@
34
34
  "@arcblock/react-hooks": "^2.5.53",
35
35
  "@arcblock/terminal": "^2.5.53",
36
36
  "@arcblock/ux": "^2.5.53",
37
- "@blocklet/constant": "1.16.13-beta-a83ad86d",
37
+ "@blocklet/constant": "1.16.13-beta-0656f92f",
38
38
  "@blocklet/launcher-layout": "2.1.26",
39
39
  "@blocklet/list": "^0.12.4",
40
- "@blocklet/meta": "1.16.13-beta-a83ad86d",
40
+ "@blocklet/meta": "1.16.13-beta-0656f92f",
41
41
  "@blocklet/ui-react": "^2.5.53",
42
42
  "@emotion/react": "^11.10.4",
43
43
  "@emotion/styled": "^11.10.4",
@@ -94,5 +94,5 @@
94
94
  "@babel/preset-react": "^7.18.6",
95
95
  "babel-plugin-inline-react-svg": "^1.1.2"
96
96
  },
97
- "gitHead": "dc2a4f7d5b55da109ebf873d8aa4d24f27a088c9"
97
+ "gitHead": "07996e8ec6fd2141ee3e93dd699ed7fd434bc0ad"
98
98
  }