@abtnode/ux 1.16.17-beta-09df289d → 1.16.17-beta-4f13d99d
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.
- package/es/blocklet/publish/create-project.js +33 -21
- package/es/blocklet/publish/create-release.js +131 -37
- package/es/blocklet/publish/project-list.js +26 -2
- package/es/blocklet/publish/release-list.js +21 -0
- package/es/blocklet/router/util.js +2 -1
- package/es/blocklet/storage/connect-to.js +7 -3
- package/es/blocklet/storage/item.js +2 -1
- package/es/locales/en.js +3 -1
- package/es/locales/zh.js +3 -1
- package/es/team/members/toggle-user-approval.js +4 -1
- package/es/util/spaces.js +19 -5
- package/lib/blocklet/publish/create-project.js +33 -21
- package/lib/blocklet/publish/create-release.js +126 -38
- package/lib/blocklet/publish/project-list.js +26 -2
- package/lib/blocklet/publish/release-list.js +21 -0
- package/lib/blocklet/router/util.js +2 -1
- package/lib/blocklet/storage/connect-to.js +6 -2
- package/lib/blocklet/storage/item.js +2 -1
- package/lib/locales/en.js +3 -1
- package/lib/locales/zh.js +3 -1
- package/lib/team/members/toggle-user-approval.js +4 -1
- package/lib/util/spaces.js +20 -5
- package/package.json +18 -18
package/lib/locales/en.js
CHANGED
|
@@ -634,6 +634,7 @@ module.exports = {
|
|
|
634
634
|
saveDraft: 'Save Draft',
|
|
635
635
|
releaseNote: 'Release Note',
|
|
636
636
|
errorTip: {
|
|
637
|
+
noDid: 'Blocklet DID is required',
|
|
637
638
|
noTitle: 'Blocklet Title is required',
|
|
638
639
|
noVersion: 'Blocklet Version is required',
|
|
639
640
|
noDescription: 'Blocklet Description is required',
|
|
@@ -1315,7 +1316,8 @@ module.exports = {
|
|
|
1315
1316
|
launchFailed: 'Failed to launch the app, please try again',
|
|
1316
1317
|
installedButStopped: 'The app is installed successfully, but cannot be started. You can start it manually after resolving blocking issues',
|
|
1317
1318
|
installedButError: 'The app is successfully installed, but failed to start',
|
|
1318
|
-
restoreFailed: 'Failed to restore app, please try again'
|
|
1319
|
+
restoreFailed: 'Failed to restore app, please try again',
|
|
1320
|
+
resourceBlocklet: 'Resource Blocklet cannot be installed as an application, you can mount this blocklet into existing applications.'
|
|
1319
1321
|
},
|
|
1320
1322
|
steps: {
|
|
1321
1323
|
introduction: 'Introduction',
|
package/lib/locales/zh.js
CHANGED
|
@@ -641,6 +641,7 @@ module.exports = {
|
|
|
641
641
|
saveDraft: '保存草稿',
|
|
642
642
|
releaseNote: '发布说明',
|
|
643
643
|
errorTip: {
|
|
644
|
+
noDid: '请填写 Blocklet DID',
|
|
644
645
|
noTitle: '请填写 Blocklet 名称',
|
|
645
646
|
noVersion: '请填写 Blocklet 版本号',
|
|
646
647
|
noDescription: '请填写 Blocklet 描述',
|
|
@@ -1320,7 +1321,8 @@ module.exports = {
|
|
|
1320
1321
|
launchFailed: '启动应用失败,请重试',
|
|
1321
1322
|
installedButStopped: '应用安装成功,但是无法启动,解决启动问题之后后可手动启动',
|
|
1322
1323
|
installedButError: '应用已经安装,但是运行出错了',
|
|
1323
|
-
restoreFailed: '还原应用失败,请重试'
|
|
1324
|
+
restoreFailed: '还原应用失败,请重试',
|
|
1325
|
+
resourceBlocklet: '资源 Blocklet 无法作为应用被安装,你可以将该 Blocklet 挂载到现有的应用中。'
|
|
1324
1326
|
},
|
|
1325
1327
|
steps: {
|
|
1326
1328
|
introduction: '简介',
|
|
@@ -8,6 +8,7 @@ var _react = require("react");
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
10
10
|
var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
11
|
+
var _passport = require("@abtnode/util/lib/passport");
|
|
11
12
|
var _confirm = _interopRequireDefault(require("../../confirm"));
|
|
12
13
|
var _node = require("../../contexts/node");
|
|
13
14
|
var _team = require("../../contexts/team");
|
|
@@ -88,7 +89,9 @@ function ToggleUserApproval(_ref) {
|
|
|
88
89
|
color: user.approved ? 'error' : 'primary'
|
|
89
90
|
};
|
|
90
91
|
let can;
|
|
91
|
-
if (
|
|
92
|
+
if ((0, _passport.hasActiveOwnerPassport)(user)) {
|
|
93
|
+
can = false;
|
|
94
|
+
} else if (!inService) {
|
|
92
95
|
can = nodeInfo.nodeOwner && !isNodeOwner(nodeInfo, user.did) && !isSelf(session.user, user.did);
|
|
93
96
|
} else {
|
|
94
97
|
can = !isSelf(session.user, user.did);
|
package/lib/util/spaces.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.extraDIDSpacesCoreUrl = extraDIDSpacesCoreUrl;
|
|
6
7
|
exports.getBackupFilesUrlFromEndpoint = getBackupFilesUrlFromEndpoint;
|
|
7
8
|
exports.getDIDSpaceDidFromEndpoint = getDIDSpaceDidFromEndpoint;
|
|
8
9
|
exports.getDIDSpaceEndpoint = void 0;
|
|
@@ -16,10 +17,10 @@ exports.isValidSpaceGatewayUrl = isValidSpaceGatewayUrl;
|
|
|
16
17
|
var _isUrl = _interopRequireDefault(require("is-url"));
|
|
17
18
|
var _constant = require("@blocklet/constant");
|
|
18
19
|
var _lodash = require("lodash");
|
|
20
|
+
var _ufo = require("ufo");
|
|
19
21
|
var _api = require("./api");
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
/* eslint-disable import/prefer-default-export */
|
|
22
|
-
const joinUrl = require('url-join');
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
26
|
* @FIXME 希望之后放在 sdk 中 @jianchao
|
|
@@ -32,7 +33,7 @@ function getBackupFilesUrlFromEndpoint(endpoint) {
|
|
|
32
33
|
const strArray = endpoint.replace(/\/$/, '').split('/');
|
|
33
34
|
const spaceDid = strArray.at(-4);
|
|
34
35
|
const appDid = strArray.at(-2);
|
|
35
|
-
return
|
|
36
|
+
return (0, _ufo.joinURL)(prefix, 'space', spaceDid, 'apps', appDid, "explorer?key=/apps/".concat(appDid, "/.did-objects/").concat(appDid, "/"));
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
/**
|
|
@@ -45,7 +46,7 @@ function getDIDSpaceUrlFromEndpoint(endpoint) {
|
|
|
45
46
|
const prefix = endpoint.replace(/\/api\/space\/.+/, '');
|
|
46
47
|
const strArray = endpoint.replace(/\/$/, '').split('/');
|
|
47
48
|
const spaceDid = strArray.at(-4);
|
|
48
|
-
return
|
|
49
|
+
return (0, _ufo.joinURL)(prefix, 'space', spaceDid);
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
/**
|
|
@@ -104,6 +105,19 @@ function getSpaceGatewayFromEndpoint(endpoint) {
|
|
|
104
105
|
return endpoint === null || endpoint === void 0 ? void 0 : endpoint.replace(/\/api\/space\/.+/, '');
|
|
105
106
|
}
|
|
106
107
|
|
|
108
|
+
/**
|
|
109
|
+
* @description
|
|
110
|
+
* @export
|
|
111
|
+
* @param {string} url
|
|
112
|
+
* @return {string}
|
|
113
|
+
*/
|
|
114
|
+
function extraDIDSpacesCoreUrl(url) {
|
|
115
|
+
const Url = new URL(url);
|
|
116
|
+
// @note: 去除查询参数的那部分字符串
|
|
117
|
+
const didSpacesCoreUrl = (0, _ufo.joinURL)(Url.origin, Url.pathname);
|
|
118
|
+
return didSpacesCoreUrl;
|
|
119
|
+
}
|
|
120
|
+
|
|
107
121
|
/**
|
|
108
122
|
* @description
|
|
109
123
|
* @export
|
|
@@ -115,7 +129,8 @@ async function isValidSpaceGatewayUrl(spaceGatewayUrl) {
|
|
|
115
129
|
if (!(0, _isUrl.default)(spaceGatewayUrl)) {
|
|
116
130
|
return false;
|
|
117
131
|
}
|
|
118
|
-
const
|
|
132
|
+
const didSpacesCoreUrl = extraDIDSpacesCoreUrl(spaceGatewayUrl);
|
|
133
|
+
const didConnectTokenUrl = (0, _ufo.joinURL)(didSpacesCoreUrl, 'space/api/did/one-click-authorization/token');
|
|
119
134
|
const {
|
|
120
135
|
status,
|
|
121
136
|
data
|
|
@@ -163,7 +178,7 @@ function getSpaceNftDisplayUrlFromEndpoint(endpoint) {
|
|
|
163
178
|
const prefix = endpoint.replace(/\/api\/space\/.+/, '');
|
|
164
179
|
const strArray = endpoint.replace(/\/$/, '').split('/');
|
|
165
180
|
const spaceDid = strArray.at(-4);
|
|
166
|
-
return
|
|
181
|
+
return (0, _ufo.joinURL)(prefix, "/api/space/nft/display?spaceDid=".concat(spaceDid));
|
|
167
182
|
}
|
|
168
183
|
|
|
169
184
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.17-beta-
|
|
3
|
+
"version": "1.16.17-beta-4f13d99d",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -27,24 +27,24 @@
|
|
|
27
27
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@abtnode/auth": "1.16.17-beta-
|
|
31
|
-
"@abtnode/constant": "1.16.17-beta-
|
|
32
|
-
"@abtnode/util": "1.16.17-beta-
|
|
30
|
+
"@abtnode/auth": "1.16.17-beta-4f13d99d",
|
|
31
|
+
"@abtnode/constant": "1.16.17-beta-4f13d99d",
|
|
32
|
+
"@abtnode/util": "1.16.17-beta-4f13d99d",
|
|
33
33
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
34
|
-
"@arcblock/did": "^1.18.
|
|
35
|
-
"@arcblock/did-connect": "^2.7.
|
|
34
|
+
"@arcblock/did": "^1.18.92",
|
|
35
|
+
"@arcblock/did-connect": "^2.7.27",
|
|
36
36
|
"@arcblock/did-motif": "^1.1.13",
|
|
37
|
-
"@arcblock/icons": "^2.7.
|
|
38
|
-
"@arcblock/nft-display": "2.7.
|
|
39
|
-
"@arcblock/react-hooks": "^2.7.
|
|
40
|
-
"@arcblock/terminal": "^2.7.
|
|
41
|
-
"@arcblock/ux": "^2.7.
|
|
42
|
-
"@blocklet/constant": "1.16.17-beta-
|
|
43
|
-
"@blocklet/launcher-layout": "2.2.
|
|
37
|
+
"@arcblock/icons": "^2.7.27",
|
|
38
|
+
"@arcblock/nft-display": "2.7.27",
|
|
39
|
+
"@arcblock/react-hooks": "^2.7.27",
|
|
40
|
+
"@arcblock/terminal": "^2.7.27",
|
|
41
|
+
"@arcblock/ux": "^2.7.27",
|
|
42
|
+
"@blocklet/constant": "1.16.17-beta-4f13d99d",
|
|
43
|
+
"@blocklet/launcher-layout": "2.2.21",
|
|
44
44
|
"@blocklet/list": "^0.12.45",
|
|
45
|
-
"@blocklet/meta": "1.16.17-beta-
|
|
46
|
-
"@blocklet/ui-react": "^2.7.
|
|
47
|
-
"@blocklet/uploader": "^0.0.
|
|
45
|
+
"@blocklet/meta": "1.16.17-beta-4f13d99d",
|
|
46
|
+
"@blocklet/ui-react": "^2.7.27",
|
|
47
|
+
"@blocklet/uploader": "^0.0.26",
|
|
48
48
|
"@emotion/react": "^11.10.4",
|
|
49
49
|
"@emotion/styled": "^11.10.4",
|
|
50
50
|
"@iconify/react": "^4.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@mui/material": "^5.14.10",
|
|
55
55
|
"@mui/styles": "^5.14.10",
|
|
56
56
|
"@mui/x-date-pickers": "^6.14.0",
|
|
57
|
-
"@ocap/client": "1.18.
|
|
57
|
+
"@ocap/client": "1.18.92",
|
|
58
58
|
"@uiw/react-markdown-preview": "4.0.6",
|
|
59
59
|
"ahooks": "^3.7.1",
|
|
60
60
|
"axios": "^0.27.2",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"babel-plugin-inline-react-svg": "^1.1.2",
|
|
101
101
|
"glob": "^10.3.3"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "005478c4b14448f2ae896ae363972afbde1d7e7b",
|
|
104
104
|
"exports": {
|
|
105
105
|
".": {
|
|
106
106
|
"import": "./es/index.js",
|