@abtnode/ux 1.8.69-beta-e0666d0d → 1.8.69-beta-b0bb2d67
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/lib/blocklet/storage.js +17 -6
- package/lib/team/members/index.js +4 -2
- package/package.json +7 -7
package/lib/blocklet/storage.js
CHANGED
|
@@ -76,7 +76,12 @@ function useAppUrl(blocklet) {
|
|
|
76
76
|
return +a.isProtected - +b.isProtected;
|
|
77
77
|
}
|
|
78
78
|
return +b.accessibility.accessible - +a.accessibility.accessible;
|
|
79
|
-
})) === null || _blocklet$site$domain2 === void 0 ? void 0 : _blocklet$site$domain2.map(domainAlias =>
|
|
79
|
+
})) === null || _blocklet$site$domain2 === void 0 ? void 0 : _blocklet$site$domain2.map(domainAlias => {
|
|
80
|
+
var _domainAlias$domainSt;
|
|
81
|
+
const protocol = domainAlias !== null && domainAlias !== void 0 && (_domainAlias$domainSt = domainAlias.domainStatus) !== null && _domainAlias$domainSt !== void 0 && _domainAlias$domainSt.isHttps ? 'https://' : 'http://';
|
|
82
|
+
const value = domainAlias === null || domainAlias === void 0 ? void 0 : domainAlias.value;
|
|
83
|
+
return "".concat(protocol).concat(value);
|
|
84
|
+
}).filter(Boolean);
|
|
80
85
|
const appUrl = appUrls === null || appUrls === void 0 ? void 0 : appUrls[0];
|
|
81
86
|
|
|
82
87
|
// 授权的时候提供 appUrl, 因为 appUrl 可能很久都拿不到值,所以加一个 loading 效果过渡一下
|
|
@@ -87,10 +92,12 @@ function useAppUrl(blocklet) {
|
|
|
87
92
|
}
|
|
88
93
|
function Storage() {
|
|
89
94
|
var _blocklet$environment;
|
|
90
|
-
/** @type {{ api: import('@abtnode/client').ABTNodeClient }} */
|
|
95
|
+
/** @type {{ api: import('@abtnode/client').ABTNodeClient, info: import('@abtnode/client').NodeState }} */
|
|
91
96
|
const {
|
|
92
|
-
api
|
|
97
|
+
api,
|
|
98
|
+
info
|
|
93
99
|
} = (0, _node.useNodeContext)();
|
|
100
|
+
const nodeDid = info.did;
|
|
94
101
|
const {
|
|
95
102
|
t,
|
|
96
103
|
locale
|
|
@@ -164,7 +171,8 @@ function Storage() {
|
|
|
164
171
|
appDescription,
|
|
165
172
|
scopes: 'list:object read:object write:object',
|
|
166
173
|
appUrl,
|
|
167
|
-
referrer: window.location.href
|
|
174
|
+
referrer: window.location.href,
|
|
175
|
+
nodeDid
|
|
168
176
|
},
|
|
169
177
|
onClose: () => {
|
|
170
178
|
// eslint-disable-next-line no-shadow
|
|
@@ -214,10 +222,13 @@ function Storage() {
|
|
|
214
222
|
(0, _react.useEffect)(() => {
|
|
215
223
|
if (progress !== null && progress !== void 0 && progress.completed) {
|
|
216
224
|
setIsLoading(false);
|
|
225
|
+
if (progress !== null && progress !== void 0 && progress.progress) {
|
|
226
|
+
progress.progress = 0;
|
|
227
|
+
}
|
|
217
228
|
} else if (progress !== null && progress !== void 0 && progress.message) {
|
|
218
229
|
setIsLoading(true);
|
|
219
230
|
}
|
|
220
|
-
}, [progress
|
|
231
|
+
}, [progress]);
|
|
221
232
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
|
|
222
233
|
style: {
|
|
223
234
|
maxWidth: '720px'
|
|
@@ -276,7 +287,7 @@ function Storage() {
|
|
|
276
287
|
},
|
|
277
288
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.LinearProgress, {
|
|
278
289
|
color: "primary",
|
|
279
|
-
variant: "
|
|
290
|
+
variant: "indeterminate",
|
|
280
291
|
value: progress === null || progress === void 0 ? void 0 : progress.progress
|
|
281
292
|
})
|
|
282
293
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = MemberList;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
|
+
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
9
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
12
|
var _Dialog = _interopRequireDefault(require("@arcblock/ux/lib/Dialog"));
|
|
@@ -115,11 +116,12 @@ function MemberList(_ref2) {
|
|
|
115
116
|
type
|
|
116
117
|
} = _ref2;
|
|
117
118
|
const {
|
|
118
|
-
appIdList
|
|
119
|
+
appIdList = []
|
|
119
120
|
} = (0, _blocklet.useBlockletContext)();
|
|
120
121
|
const {
|
|
121
122
|
teamDid,
|
|
122
123
|
invitations,
|
|
124
|
+
teamIssuerDid,
|
|
123
125
|
roles,
|
|
124
126
|
refresh,
|
|
125
127
|
enablePassportIssuance,
|
|
@@ -187,7 +189,7 @@ function MemberList(_ref2) {
|
|
|
187
189
|
}).then(res => {
|
|
188
190
|
setLoading(false);
|
|
189
191
|
(res.users || []).forEach(x => {
|
|
190
|
-
x.isFromExternal = isFromExternal(x, appIdList);
|
|
192
|
+
x.isFromExternal = isFromExternal(x, (0, _isEmpty.default)(appIdList) ? [teamIssuerDid] : appIdList);
|
|
191
193
|
x.avatar = (0, _util2.parseAvatar)(x.avatar, teamDid, inService);
|
|
192
194
|
|
|
193
195
|
// for backwards compatibility
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.8.69-beta-
|
|
6
|
+
"version": "1.8.69-beta-b0bb2d67",
|
|
7
7
|
"description": "UX components shared across abtnode packages",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@abtnode/auth": "1.8.69-beta-
|
|
25
|
-
"@abtnode/constant": "1.8.69-beta-
|
|
26
|
-
"@abtnode/util": "1.8.69-beta-
|
|
24
|
+
"@abtnode/auth": "1.8.69-beta-b0bb2d67",
|
|
25
|
+
"@abtnode/constant": "1.8.69-beta-b0bb2d67",
|
|
26
|
+
"@abtnode/util": "1.8.69-beta-b0bb2d67",
|
|
27
27
|
"@arcblock/did-connect": "^2.5.5",
|
|
28
28
|
"@arcblock/did-motif": "^1.1.10",
|
|
29
29
|
"@arcblock/icons": "^2.5.5",
|
|
30
30
|
"@arcblock/terminal": "^2.5.5",
|
|
31
31
|
"@arcblock/ux": "^2.5.5",
|
|
32
|
-
"@blocklet/constant": "1.8.69-beta-
|
|
32
|
+
"@blocklet/constant": "1.8.69-beta-b0bb2d67",
|
|
33
33
|
"@blocklet/launcher-layout": "^1.9.61",
|
|
34
34
|
"@blocklet/list": "^0.11.4",
|
|
35
|
-
"@blocklet/meta": "1.8.69-beta-
|
|
35
|
+
"@blocklet/meta": "1.8.69-beta-b0bb2d67",
|
|
36
36
|
"@blocklet/ui-react": "^2.5.5",
|
|
37
37
|
"@emotion/react": "^11.10.4",
|
|
38
38
|
"@emotion/styled": "^11.10.4",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"@babel/preset-react": "^7.18.6",
|
|
87
87
|
"babel-plugin-inline-react-svg": "^1.1.2"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "d6853c4b55a67526748017268257b869a5092cb1"
|
|
90
90
|
}
|