@abtnode/ux 1.16.13-beta-d17a7de4 → 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:
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.13-beta-
|
|
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-
|
|
27
|
-
"@abtnode/constant": "1.16.13-beta-
|
|
28
|
-
"@abtnode/util": "1.16.13-beta-
|
|
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-
|
|
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-
|
|
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": "
|
|
97
|
+
"gitHead": "07996e8ec6fd2141ee3e93dd699ed7fd434bc0ad"
|
|
98
98
|
}
|