@abtnode/ux 1.16.29-beta-0070353c → 1.16.29-beta-88bdefe8
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/component/add-component/add-component-core.js +4 -15
- package/lib/blocklet/logo-uploader.js +1 -1
- package/lib/blocklet/notification/push-kit.js +17 -3
- package/lib/blocklet/publish/create-release/branding.js +4 -3
- package/lib/blocklet/publish/create-release/connect-store-button.js +99 -23
- package/lib/blocklet/publish/create-release/connect-store-list.js +12 -6
- package/lib/blocklet/publish/create-release/header.js +10 -0
- package/lib/blocklet/publish/create-release/index.js +3 -0
- package/lib/blocklet/publish/create-release/resource-upload.js +2 -2
- package/lib/invitation/invitation-receive.js +46 -25
- package/lib/invitation/invitation.js +4 -4
- package/lib/locales/ar.js +8 -17
- package/lib/locales/de.js +8 -17
- package/lib/locales/en.js +5 -2
- package/lib/locales/es.js +8 -17
- package/lib/locales/fr.js +8 -17
- package/lib/locales/hi.js +8 -17
- package/lib/locales/i18n.db +0 -0
- package/lib/locales/id.js +8 -17
- package/lib/locales/ja.js +8 -17
- package/lib/locales/ko.js +8 -17
- package/lib/locales/pt.js +8 -17
- package/lib/locales/ru.js +8 -17
- package/lib/locales/th.js +8 -17
- package/lib/locales/vi.js +8 -17
- package/lib/locales/zh-tw.js +8 -17
- package/lib/locales/zh.js +10 -25
- package/lib/store/add.js +24 -10
- package/lib/store/connect-actions.js +18 -18
- package/lib/store/item.js +28 -4
- package/lib/team/members/index.js +33 -1
- package/lib/team/members/invite-member.js +98 -66
- package/lib/util/sdk.js +3 -0
- package/package.json +9 -8
package/lib/locales/zh.js
CHANGED
|
@@ -37,10 +37,7 @@ export default {
|
|
|
37
37
|
},
|
|
38
38
|
congratulation: '恭喜, 您的节点安全可用!',
|
|
39
39
|
redirectButton: '查看节点仪表盘',
|
|
40
|
-
form: {
|
|
41
|
-
submit: '完成设置',
|
|
42
|
-
title: '设置节点的名称和描述信息'
|
|
43
|
-
}
|
|
40
|
+
form: {}
|
|
44
41
|
},
|
|
45
42
|
login: {
|
|
46
43
|
loginTo: '连接 DID 钱包',
|
|
@@ -162,7 +159,6 @@ export default {
|
|
|
162
159
|
description: '描述',
|
|
163
160
|
detail: '详情',
|
|
164
161
|
did: 'DID',
|
|
165
|
-
disabled: '已禁用',
|
|
166
162
|
disk: '磁盘',
|
|
167
163
|
diskInfo: '磁盘信息',
|
|
168
164
|
docker: 'Docker?',
|
|
@@ -177,7 +173,6 @@ export default {
|
|
|
177
173
|
empty: '暂无',
|
|
178
174
|
emptyData: '未找到结果',
|
|
179
175
|
enable: '启用',
|
|
180
|
-
enabled: '已启用',
|
|
181
176
|
engine: '引擎',
|
|
182
177
|
env: '环境',
|
|
183
178
|
environment: '环境变量',
|
|
@@ -256,7 +251,6 @@ export default {
|
|
|
256
251
|
preview: '预览',
|
|
257
252
|
protected: '受保护',
|
|
258
253
|
protocol: '协议',
|
|
259
|
-
published: '已发布',
|
|
260
254
|
purchase: '购买',
|
|
261
255
|
readMore: '更多',
|
|
262
256
|
redirect: '重定向',
|
|
@@ -348,7 +342,6 @@ export default {
|
|
|
348
342
|
selected: '已选中',
|
|
349
343
|
timeoutError: '超时错误',
|
|
350
344
|
tags: '标签',
|
|
351
|
-
publishToStore: '发布到 Store',
|
|
352
345
|
connectToStore: '连接 Store',
|
|
353
346
|
uploaded: '已上传',
|
|
354
347
|
uploadToStore: '上传到 Store',
|
|
@@ -356,7 +349,9 @@ export default {
|
|
|
356
349
|
blockletStudio: 'Studio',
|
|
357
350
|
visitStore: '访问 Store',
|
|
358
351
|
reconnect: '重新连接',
|
|
359
|
-
change: '更改'
|
|
352
|
+
change: '更改',
|
|
353
|
+
sourceApp: '所属应用',
|
|
354
|
+
disconnect: '断开连接'
|
|
360
355
|
},
|
|
361
356
|
blocklet: {
|
|
362
357
|
external: '外部',
|
|
@@ -454,7 +449,6 @@ export default {
|
|
|
454
449
|
title: '谁可以访问',
|
|
455
450
|
description: '谁可以访问应用',
|
|
456
451
|
useDefault: '使用该应用默认配置',
|
|
457
|
-
invitedTip: '稍后您可以在管理页面中邀请和管理成员',
|
|
458
452
|
defaultDescription: '使用应用的默认配置',
|
|
459
453
|
whoCanAccess: {
|
|
460
454
|
all: {
|
|
@@ -517,9 +511,7 @@ export default {
|
|
|
517
511
|
source: '来源',
|
|
518
512
|
deployedFrom: '部署源',
|
|
519
513
|
accessControl: '访问控制',
|
|
520
|
-
viewInStore: '在商店中查看'
|
|
521
|
-
publicToStore: '在 Store 公开此应用',
|
|
522
|
-
publicInstanceTip: '此应用的访问地址将展示在 Store 中(同时也会展示您的 DID,用于接受捐赠)'
|
|
514
|
+
viewInStore: '在商店中查看'
|
|
523
515
|
},
|
|
524
516
|
diskInfo: {
|
|
525
517
|
empty: '无法获得磁盘信息',
|
|
@@ -604,7 +596,6 @@ export default {
|
|
|
604
596
|
downloadComponentError: '下载组件遇到错误,请重试',
|
|
605
597
|
addComponentTip: {
|
|
606
598
|
introduction: '欢迎来到添加组件向导',
|
|
607
|
-
isFree: '您可以免费添加 <b>{name}</b> 为组件;',
|
|
608
599
|
isPurchase: '您需要验证凭证才能添加 <b>{name}</b> 为组件;',
|
|
609
600
|
belowInformation: '下面为该组件的信息:',
|
|
610
601
|
verifyNFT: '请选择验证凭证方式',
|
|
@@ -615,7 +606,6 @@ export default {
|
|
|
615
606
|
addNext: '添加 {name}',
|
|
616
607
|
upgradeNext: '升级 {name}',
|
|
617
608
|
setting: '参数设置',
|
|
618
|
-
components: '{name} 组件的依赖',
|
|
619
609
|
noDependencies: '{name}没有任何依赖',
|
|
620
610
|
relatedComponents: '相关 Blocklets',
|
|
621
611
|
required: '必须'
|
|
@@ -667,7 +657,6 @@ export default {
|
|
|
667
657
|
isInProgress: '应用正在进行中,请等待完成'
|
|
668
658
|
},
|
|
669
659
|
publish: {
|
|
670
|
-
information: '基本信息',
|
|
671
660
|
createResource: '创建资源',
|
|
672
661
|
addResource: '添加 Blocklet',
|
|
673
662
|
productTitle: 'Blocklet 详情',
|
|
@@ -732,12 +721,11 @@ export default {
|
|
|
732
721
|
},
|
|
733
722
|
resourceTip: '目前,作为资源型 Blocklet,它无法直接从 Store 安装。',
|
|
734
723
|
whyCantSeeInStore: '为什么我不能在 Store 中看到这个 Blocklet?',
|
|
735
|
-
whyCantSeeResourceBlockletInStore: '
|
|
724
|
+
whyCantSeeResourceBlockletInStore: '资源Blocklet默认情况下在商店列表页面上被隐藏',
|
|
736
725
|
tenantScope: '租户',
|
|
737
726
|
blockletStudio: 'Blocklet Studio',
|
|
738
727
|
allComponentsNotRunning: 'Blocklets未运行,请先启动',
|
|
739
728
|
steps: {
|
|
740
|
-
information: '描述您的 Blocklet 的基本信息。这些信息将在 Store 中呈现给。',
|
|
741
729
|
resources: '请选择需要与当前的 Blocklet 关联的资源,这些资源将与 Blocklet 一起安装。',
|
|
742
730
|
blocklets: '请选择当前 Blocklet 安装时, 需要关联安装的 Blocklets。',
|
|
743
731
|
version: '设置发布版本和更改日志。',
|
|
@@ -747,7 +735,9 @@ export default {
|
|
|
747
735
|
branding: '品牌',
|
|
748
736
|
brandingHelp: '将在商店中显示有关区块链的更多信息',
|
|
749
737
|
resourceSelect: '从 blocklets 选择资源',
|
|
750
|
-
resourceUpload: '从您的磁盘上传资源(存档中需要index.html)'
|
|
738
|
+
resourceUpload: '从您的磁盘上传资源(存档中需要index.html)',
|
|
739
|
+
deleteStoreTip: '您确定要将{name}从连接商店列表中移除吗?',
|
|
740
|
+
disconnectStoreTip: '断开连接后,blocklet 将从商店中移除。您确定要断开连接吗?'
|
|
751
741
|
},
|
|
752
742
|
titleValidationError: '标题长度必须至少为3到40个字符',
|
|
753
743
|
descriptionValidationError: '描述长度必须在3到160个字符之间'
|
|
@@ -1072,7 +1062,6 @@ export default {
|
|
|
1072
1062
|
}
|
|
1073
1063
|
},
|
|
1074
1064
|
domainAlias: {
|
|
1075
|
-
inputDomain: '手动配置域名',
|
|
1076
1065
|
nftDomain: '通过 DID Domain 自动配置域名',
|
|
1077
1066
|
showTipHint: '如何配置域名解析?',
|
|
1078
1067
|
add: {
|
|
@@ -1086,7 +1075,6 @@ export default {
|
|
|
1086
1075
|
name: '自定义域名'
|
|
1087
1076
|
},
|
|
1088
1077
|
addDomainNFT: {
|
|
1089
|
-
name: 'NFT 域名',
|
|
1090
1078
|
showNFT: '自动配置域名',
|
|
1091
1079
|
tips: '您可以输入从 DID Domain 购买的域名。如果检测到 DID Domain,您必须出示 DID Domain NFT 才能继续。',
|
|
1092
1080
|
connect: {
|
|
@@ -1334,9 +1322,7 @@ export default {
|
|
|
1334
1322
|
title: '创建权限',
|
|
1335
1323
|
description: "格式:<操作>_<资源>\n举例:'query_user', 'mutate_user'"
|
|
1336
1324
|
},
|
|
1337
|
-
update: {
|
|
1338
|
-
title: '更新权限'
|
|
1339
|
-
},
|
|
1325
|
+
update: {},
|
|
1340
1326
|
delete: {
|
|
1341
1327
|
title: '删除权限',
|
|
1342
1328
|
description: '确认删除 {name}?(角色中关联的 {name} 将会同时被删除)'
|
|
@@ -1526,7 +1512,6 @@ export default {
|
|
|
1526
1512
|
purchaseSpace: '选购空间',
|
|
1527
1513
|
prepareSpace: '准备空间'
|
|
1528
1514
|
},
|
|
1529
|
-
installRelatedDependencies: '安装相关依赖',
|
|
1530
1515
|
installRelatedComponents: '安装相关的 Blocklets'
|
|
1531
1516
|
},
|
|
1532
1517
|
issuePassport: {
|
package/lib/store/add.js
CHANGED
|
@@ -27,14 +27,17 @@ export default function AddStore({
|
|
|
27
27
|
storeList,
|
|
28
28
|
teamDid,
|
|
29
29
|
onAdd,
|
|
30
|
-
scope
|
|
30
|
+
scope,
|
|
31
|
+
hiddenChildren,
|
|
32
|
+
open,
|
|
33
|
+
onClose
|
|
31
34
|
}) {
|
|
32
35
|
const {
|
|
33
36
|
api
|
|
34
37
|
} = useNodeContext();
|
|
35
38
|
const [loading, setLoading] = useState(false);
|
|
36
39
|
const [disable, setDisable] = useState(true);
|
|
37
|
-
const [
|
|
40
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
38
41
|
const [url, setUrl] = useState('');
|
|
39
42
|
const [error, setError] = useState('');
|
|
40
43
|
const {
|
|
@@ -59,7 +62,8 @@ export default function AddStore({
|
|
|
59
62
|
}
|
|
60
63
|
});
|
|
61
64
|
onAdd(decoded);
|
|
62
|
-
|
|
65
|
+
setIsOpen(false);
|
|
66
|
+
onClose();
|
|
63
67
|
} catch (err) {
|
|
64
68
|
const errMsg = `${t('store.blockletRegistry.addFailed')} ${formatError(err)}`;
|
|
65
69
|
setError(errMsg);
|
|
@@ -67,13 +71,17 @@ export default function AddStore({
|
|
|
67
71
|
setLoading(false);
|
|
68
72
|
}
|
|
69
73
|
};
|
|
74
|
+
const handleClose = () => {
|
|
75
|
+
setIsOpen(false);
|
|
76
|
+
onClose();
|
|
77
|
+
};
|
|
70
78
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
71
|
-
children: [/*#__PURE__*/_jsxs(ListItem, {
|
|
79
|
+
children: [!hiddenChildren && /*#__PURE__*/_jsxs(ListItem, {
|
|
72
80
|
button: true,
|
|
73
81
|
disabled: disabled,
|
|
74
82
|
className: classes.addMenuItemRoot,
|
|
75
83
|
onClick: () => {
|
|
76
|
-
|
|
84
|
+
setIsOpen(true);
|
|
77
85
|
},
|
|
78
86
|
children: [/*#__PURE__*/_jsx(AddIcon, {
|
|
79
87
|
font: true
|
|
@@ -85,8 +93,8 @@ export default function AddStore({
|
|
|
85
93
|
title: t('store.blockletRegistry.addRegistry'),
|
|
86
94
|
fullWidth: true,
|
|
87
95
|
maxWidth: "md",
|
|
88
|
-
open: open,
|
|
89
|
-
onClose:
|
|
96
|
+
open: open || isOpen,
|
|
97
|
+
onClose: handleClose,
|
|
90
98
|
PaperProps: {
|
|
91
99
|
style: {
|
|
92
100
|
minHeight: 'auto'
|
|
@@ -96,7 +104,7 @@ export default function AddStore({
|
|
|
96
104
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
97
105
|
onClick: e => {
|
|
98
106
|
e.stopPropagation();
|
|
99
|
-
|
|
107
|
+
handleClose();
|
|
100
108
|
},
|
|
101
109
|
color: "inherit",
|
|
102
110
|
children: t('common.cancel')
|
|
@@ -172,11 +180,17 @@ AddStore.propTypes = {
|
|
|
172
180
|
disabled: PropTypes.bool,
|
|
173
181
|
storeList: PropTypes.array,
|
|
174
182
|
onAdd: PropTypes.func,
|
|
175
|
-
scope: PropTypes.string
|
|
183
|
+
scope: PropTypes.string,
|
|
184
|
+
hiddenChildren: PropTypes.bool,
|
|
185
|
+
open: PropTypes.bool,
|
|
186
|
+
onClose: PropTypes.func
|
|
176
187
|
};
|
|
177
188
|
AddStore.defaultProps = {
|
|
178
189
|
disabled: false,
|
|
179
190
|
storeList: [],
|
|
180
191
|
onAdd: () => {},
|
|
181
|
-
scope: ''
|
|
192
|
+
scope: '',
|
|
193
|
+
hiddenChildren: false,
|
|
194
|
+
open: false,
|
|
195
|
+
onClose: () => {}
|
|
182
196
|
};
|
|
@@ -4,7 +4,7 @@ import { Box, Button, Menu, MenuItem } from '@mui/material';
|
|
|
4
4
|
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
|
5
5
|
import { joinURL } from 'ufo';
|
|
6
6
|
import LaunchIcon from '@mui/icons-material/Launch';
|
|
7
|
-
import
|
|
7
|
+
import LinkOffIcon from '@mui/icons-material/LinkOff';
|
|
8
8
|
import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';
|
|
9
9
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
10
10
|
import ConfirmDialog from '../confirm';
|
|
@@ -12,7 +12,7 @@ import DeleteStore from './delete';
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
function ConnectActions({
|
|
14
14
|
connected,
|
|
15
|
-
|
|
15
|
+
onDisconnect,
|
|
16
16
|
onDelete,
|
|
17
17
|
store,
|
|
18
18
|
teamDid,
|
|
@@ -23,7 +23,7 @@ function ConnectActions({
|
|
|
23
23
|
const {
|
|
24
24
|
t
|
|
25
25
|
} = useLocaleContext();
|
|
26
|
-
const [
|
|
26
|
+
const [showDisconnectConfirm, setShowDisconnectConfirm] = useState(false);
|
|
27
27
|
const handleOpenUrl = e => {
|
|
28
28
|
e.stopPropagation();
|
|
29
29
|
window.open(joinURL(store.url, 'developer/blocklets'));
|
|
@@ -35,21 +35,21 @@ function ConnectActions({
|
|
|
35
35
|
const handleClose = () => {
|
|
36
36
|
setAnchorEl(null);
|
|
37
37
|
};
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
const handleDisconnect = () => {
|
|
39
|
+
setShowDisconnectConfirm(false);
|
|
40
|
+
onDisconnect();
|
|
41
41
|
};
|
|
42
42
|
const actions = [{
|
|
43
43
|
label: t('common.visitStore'),
|
|
44
44
|
action: handleOpenUrl,
|
|
45
45
|
icon: LaunchIcon
|
|
46
46
|
}, {
|
|
47
|
-
label: t('common.
|
|
47
|
+
label: t('common.disconnect'),
|
|
48
48
|
action: () => {
|
|
49
49
|
handleClose();
|
|
50
|
-
|
|
50
|
+
setShowDisconnectConfirm(true);
|
|
51
51
|
},
|
|
52
|
-
icon:
|
|
52
|
+
icon: LinkOffIcon,
|
|
53
53
|
hidden: !connected
|
|
54
54
|
}];
|
|
55
55
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
@@ -93,7 +93,7 @@ function ConnectActions({
|
|
|
93
93
|
children: x.label
|
|
94
94
|
})]
|
|
95
95
|
}, x.label);
|
|
96
|
-
}), /*#__PURE__*/_jsx(DeleteStore, {
|
|
96
|
+
}), !store.protected && /*#__PURE__*/_jsx(DeleteStore, {
|
|
97
97
|
store: store,
|
|
98
98
|
onDelete: onDelete,
|
|
99
99
|
teamDid: teamDid,
|
|
@@ -112,19 +112,19 @@ function ConnectActions({
|
|
|
112
112
|
})]
|
|
113
113
|
})
|
|
114
114
|
})]
|
|
115
|
-
}),
|
|
115
|
+
}), showDisconnectConfirm && /*#__PURE__*/_jsx(ConfirmDialog, {
|
|
116
116
|
displayError: true,
|
|
117
|
-
title: `${t('common.
|
|
118
|
-
description: t('blocklet.publish.
|
|
117
|
+
title: `${t('common.disconnect')} ${store.name}`,
|
|
118
|
+
description: t('blocklet.publish.disconnectStoreTip'),
|
|
119
119
|
confirm: t('common.confirm'),
|
|
120
|
-
onConfirm:
|
|
121
|
-
onCancel: () =>
|
|
120
|
+
onConfirm: handleDisconnect,
|
|
121
|
+
onCancel: () => setShowDisconnectConfirm(false)
|
|
122
122
|
})]
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
ConnectActions.propTypes = {
|
|
126
126
|
connected: PropTypes.bool,
|
|
127
|
-
|
|
127
|
+
onDisconnect: PropTypes.func,
|
|
128
128
|
onDelete: PropTypes.func,
|
|
129
129
|
store: PropTypes.object.isRequired,
|
|
130
130
|
teamDid: PropTypes.string.isRequired,
|
|
@@ -133,7 +133,7 @@ ConnectActions.propTypes = {
|
|
|
133
133
|
ConnectActions.defaultProps = {
|
|
134
134
|
projectId: '',
|
|
135
135
|
connected: false,
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
onDelete: () => {},
|
|
137
|
+
onDisconnect: () => {}
|
|
138
138
|
};
|
|
139
139
|
export default ConnectActions;
|
package/lib/store/item.js
CHANGED
|
@@ -17,6 +17,10 @@ import ConnectActions from './connect-actions';
|
|
|
17
17
|
import DidAddress from '../did-address';
|
|
18
18
|
import usePromiseWindowOpen from '../hooks/use-promise-window-open';
|
|
19
19
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
|
+
export const BEHAVIOR = {
|
|
21
|
+
CONNECT: 'connect',
|
|
22
|
+
SELECT: 'select'
|
|
23
|
+
};
|
|
20
24
|
const useStyles = makeStyles(() => ({
|
|
21
25
|
buttonText: {
|
|
22
26
|
textTransform: 'none !important'
|
|
@@ -98,7 +102,9 @@ export default function StoreItem({
|
|
|
98
102
|
connectedStore,
|
|
99
103
|
releaseType,
|
|
100
104
|
onPublish,
|
|
101
|
-
onOpenConnectStore
|
|
105
|
+
onOpenConnectStore,
|
|
106
|
+
onSelectConnectStore,
|
|
107
|
+
behavior
|
|
102
108
|
}) {
|
|
103
109
|
const classes = useStyles();
|
|
104
110
|
const {
|
|
@@ -123,6 +129,10 @@ export default function StoreItem({
|
|
|
123
129
|
window.open(store.url);
|
|
124
130
|
};
|
|
125
131
|
const handleConnectToStore = () => {
|
|
132
|
+
if (behavior === BEHAVIOR.SELECT) {
|
|
133
|
+
onSelectConnectStore(store);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
126
136
|
openWindow(async (newWindow, open) => {
|
|
127
137
|
try {
|
|
128
138
|
const res = await api.connectToStore({
|
|
@@ -153,6 +163,16 @@ export default function StoreItem({
|
|
|
153
163
|
}
|
|
154
164
|
});
|
|
155
165
|
};
|
|
166
|
+
const handleDisconnectStore = async () => {
|
|
167
|
+
await api.disconnectFromStore({
|
|
168
|
+
input: {
|
|
169
|
+
did: teamDid,
|
|
170
|
+
storeId: store.id,
|
|
171
|
+
projectId
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
onDelete();
|
|
175
|
+
};
|
|
156
176
|
const handleUploadToStore = () => {
|
|
157
177
|
setLoading(true);
|
|
158
178
|
api.publishToStore({
|
|
@@ -302,7 +322,7 @@ export default function StoreItem({
|
|
|
302
322
|
store: store,
|
|
303
323
|
onDelete: onDelete,
|
|
304
324
|
teamDid: teamDid,
|
|
305
|
-
|
|
325
|
+
onDisconnect: handleDisconnectStore
|
|
306
326
|
})]
|
|
307
327
|
}), !isPublish && /*#__PURE__*/_jsxs(ButtonGroup, {
|
|
308
328
|
disabled: loading,
|
|
@@ -349,7 +369,9 @@ StoreItem.propTypes = {
|
|
|
349
369
|
}).isRequired,
|
|
350
370
|
onDelete: PropTypes.func,
|
|
351
371
|
onPublish: PropTypes.func,
|
|
352
|
-
onOpenConnectStore: PropTypes.func
|
|
372
|
+
onOpenConnectStore: PropTypes.func,
|
|
373
|
+
behavior: PropTypes.string,
|
|
374
|
+
onSelectConnectStore: PropTypes.func
|
|
353
375
|
};
|
|
354
376
|
StoreItem.defaultProps = {
|
|
355
377
|
kind: 'store',
|
|
@@ -358,7 +380,9 @@ StoreItem.defaultProps = {
|
|
|
358
380
|
releaseId: '',
|
|
359
381
|
projectId: '',
|
|
360
382
|
releaseType: '',
|
|
383
|
+
behavior: BEHAVIOR.CONNECT,
|
|
361
384
|
onPublish: () => {},
|
|
362
385
|
onDelete: () => {},
|
|
363
|
-
onOpenConnectStore: () => {}
|
|
386
|
+
onOpenConnectStore: () => {},
|
|
387
|
+
onSelectConnectStore: () => {}
|
|
364
388
|
};
|
|
@@ -151,7 +151,8 @@ export default function MemberList({
|
|
|
151
151
|
refresh,
|
|
152
152
|
enablePassportIssuance,
|
|
153
153
|
endpoint,
|
|
154
|
-
api
|
|
154
|
+
api,
|
|
155
|
+
blocklet
|
|
155
156
|
} = useTeamContext();
|
|
156
157
|
const {
|
|
157
158
|
inService,
|
|
@@ -159,6 +160,36 @@ export default function MemberList({
|
|
|
159
160
|
useSubscription
|
|
160
161
|
}
|
|
161
162
|
} = useNodeContext();
|
|
163
|
+
const appInfoList = [];
|
|
164
|
+
if (inService && blocklet) {
|
|
165
|
+
const federatedMaster = (blocklet.settings?.federated?.sites || []).find(item => item.isMaster !== false);
|
|
166
|
+
const federatedCurrent = (blocklet.settings?.federated?.sites || []).find(item => item.appId === blocklet.appDid);
|
|
167
|
+
if (federatedCurrent?.status === 'approved') {
|
|
168
|
+
appInfoList.push({
|
|
169
|
+
appId: federatedMaster.appId,
|
|
170
|
+
appName: federatedMaster.appName,
|
|
171
|
+
appDescription: federatedMaster.appDescription,
|
|
172
|
+
appLogo: federatedMaster.appLogo,
|
|
173
|
+
appPid: federatedMaster.appPid,
|
|
174
|
+
appUrl: federatedMaster.appUrl,
|
|
175
|
+
version: federatedMaster.version,
|
|
176
|
+
sourceAppPid: federatedMaster.appPid,
|
|
177
|
+
provider: 'wallet'
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
appInfoList.push({
|
|
181
|
+
appId: federatedCurrent.appId,
|
|
182
|
+
appName: federatedCurrent.appName,
|
|
183
|
+
appDescription: federatedCurrent.appDescription,
|
|
184
|
+
appLogo: federatedCurrent.appLogo,
|
|
185
|
+
appPid: federatedCurrent.appPid,
|
|
186
|
+
appUrl: federatedCurrent.appUrl,
|
|
187
|
+
version: federatedCurrent.version,
|
|
188
|
+
// NOTICE: null 代表该值置空
|
|
189
|
+
sourceAppPid: null,
|
|
190
|
+
provider: 'wallet'
|
|
191
|
+
});
|
|
192
|
+
}
|
|
162
193
|
const {
|
|
163
194
|
t,
|
|
164
195
|
locale
|
|
@@ -604,6 +635,7 @@ export default function MemberList({
|
|
|
604
635
|
teamDid: teamDid,
|
|
605
636
|
endpoint: endpoint,
|
|
606
637
|
roles: roles,
|
|
638
|
+
apps: appInfoList,
|
|
607
639
|
onCancel: () => setShowInviteMember(false),
|
|
608
640
|
onSuccess: () => {
|
|
609
641
|
refresh();
|