@abtnode/ux 1.16.29 → 1.16.30-beta-958ae719
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/did-space/item.js +10 -6
- package/lib/blocklet/component/environment.js +16 -6
- package/lib/blocklet/configuration.js +2 -34
- package/lib/blocklet/disk-info.js +66 -55
- package/lib/blocklet/publish/create-release/project-setting.js +3 -3
- package/lib/blocklet/storage/connected.js +1 -3
- package/lib/blocklet/storage/disconnect.js +1 -7
- package/lib/blocklet/storage/item.js +0 -2
- package/lib/hooks/blocklet.js +17 -5
- package/lib/locales/ar.js +2 -1
- package/lib/locales/de.js +2 -1
- package/lib/locales/en.js +8 -7
- package/lib/locales/es.js +2 -1
- package/lib/locales/fr.js +2 -1
- package/lib/locales/hi.js +2 -1
- package/lib/locales/i18n.db +0 -0
- package/lib/locales/id.js +2 -1
- package/lib/locales/ja.js +2 -1
- package/lib/locales/ko.js +2 -1
- package/lib/locales/pt.js +2 -1
- package/lib/locales/ru.js +2 -1
- package/lib/locales/th.js +2 -1
- package/lib/locales/vi.js +2 -1
- package/lib/locales/zh-tw.js +2 -1
- package/lib/locales/zh.js +7 -6
- package/lib/team/members/invite-member.js +16 -3
- package/lib/team/members/issue-passport.js +16 -2
- package/lib/team/members/member.js +62 -23
- package/package.json +17 -17
|
@@ -87,17 +87,21 @@ function SpaceItem({
|
|
|
87
87
|
flexDirection: "column",
|
|
88
88
|
sx: {
|
|
89
89
|
marginLeft: '20px',
|
|
90
|
-
padding: '0px 0px'
|
|
90
|
+
padding: '0px 0px',
|
|
91
|
+
minWidth: 0
|
|
91
92
|
},
|
|
92
93
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
93
94
|
className: "spaces-info",
|
|
94
95
|
display: "flex",
|
|
95
|
-
maxWidth: "360px",
|
|
96
|
-
alignItems: "center",
|
|
97
96
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
sx: {
|
|
98
|
+
color: connected ? 'primary' : 'inherit',
|
|
99
|
+
fontSize: '1rem',
|
|
100
|
+
fontWeight: 'bold',
|
|
101
|
+
whiteSpace: 'nowrap',
|
|
102
|
+
overflow: 'hidden',
|
|
103
|
+
textOverflow: 'ellipsis'
|
|
104
|
+
},
|
|
101
105
|
children: spaceGateway.name
|
|
102
106
|
}), /*#__PURE__*/_jsx(Chip, {
|
|
103
107
|
label: /*#__PURE__*/_jsxs(_Fragment, {
|
|
@@ -49,6 +49,16 @@ const isCustom = (env, blocklet, ancestors = []) => {
|
|
|
49
49
|
}
|
|
50
50
|
return env.custom;
|
|
51
51
|
};
|
|
52
|
+
const isValidKey = key => {
|
|
53
|
+
if ([BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(key)) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
if (key.startsWith('BLOCKLET_') || key.startsWith('COMPONENT_')) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
return true;
|
|
60
|
+
};
|
|
61
|
+
const isCustomKey = key => [BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(key) === false;
|
|
52
62
|
export default function ComponentEnvironment({
|
|
53
63
|
blocklet,
|
|
54
64
|
ancestors
|
|
@@ -74,11 +84,11 @@ export default function ComponentEnvironment({
|
|
|
74
84
|
Toast.error(t('blocklet.config.environment.keyValueRequired'));
|
|
75
85
|
return;
|
|
76
86
|
}
|
|
77
|
-
if (data.key
|
|
87
|
+
if (isValidKey(data.key) === false) {
|
|
78
88
|
Toast.error(t('blocklet.config.environment.invalidKey'));
|
|
79
89
|
return;
|
|
80
90
|
}
|
|
81
|
-
data.custom =
|
|
91
|
+
data.custom = isCustomKey(data.key);
|
|
82
92
|
try {
|
|
83
93
|
const result = await node.api.configBlocklet({
|
|
84
94
|
input: {
|
|
@@ -97,7 +107,7 @@ export default function ComponentEnvironment({
|
|
|
97
107
|
Toast.error(t('blocklet.config.environment.keyValueRequired'));
|
|
98
108
|
return;
|
|
99
109
|
}
|
|
100
|
-
if (newData.key
|
|
110
|
+
if (isValidKey(newData.key) === false) {
|
|
101
111
|
Toast.error(t('blocklet.config.environment.invalidKey'));
|
|
102
112
|
return;
|
|
103
113
|
}
|
|
@@ -119,7 +129,7 @@ export default function ComponentEnvironment({
|
|
|
119
129
|
}
|
|
120
130
|
configs.push({
|
|
121
131
|
key: oldData.key,
|
|
122
|
-
custom:
|
|
132
|
+
custom: isCustomKey(newData.key)
|
|
123
133
|
});
|
|
124
134
|
}
|
|
125
135
|
try {
|
|
@@ -149,7 +159,7 @@ export default function ComponentEnvironment({
|
|
|
149
159
|
did: dids,
|
|
150
160
|
configs: [{
|
|
151
161
|
key: data.key,
|
|
152
|
-
custom:
|
|
162
|
+
custom: isCustomKey(data.key)
|
|
153
163
|
}]
|
|
154
164
|
}
|
|
155
165
|
});
|
|
@@ -160,7 +170,7 @@ export default function ComponentEnvironment({
|
|
|
160
170
|
};
|
|
161
171
|
|
|
162
172
|
// configs
|
|
163
|
-
const componentConfigs = (blocklet.configs || []).filter(x => !BLOCKLET_CONFIGURABLE_KEY[x.key]);
|
|
173
|
+
const componentConfigs = (blocklet.configs || []).filter(x => !BLOCKLET_CONFIGURABLE_KEY[x.key] || [BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(x.key));
|
|
164
174
|
const sharedConfigObj = getSharedConfigObj(ancestors[0], blocklet);
|
|
165
175
|
const missingRequiredConfigs = getComponentMissingConfigs(blocklet, ancestors[0]);
|
|
166
176
|
const configs = componentConfigs.map(x => ({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useState, useContext } from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import get from 'lodash/get';
|
|
5
4
|
import isEqual from 'lodash/isEqual';
|
|
6
5
|
import Box from '@mui/material/Box';
|
|
7
6
|
import Switch from '@mui/material/Switch';
|
|
@@ -9,14 +8,13 @@ import Divider from '@mui/material/Divider';
|
|
|
9
8
|
import { LocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
10
9
|
import Button from '@arcblock/ux/lib/Button';
|
|
11
10
|
import LoopIcon from '@mui/icons-material/Loop';
|
|
12
|
-
import { EVENTS } from '@abtnode/constant';
|
|
13
11
|
import { BLOCKLET_CONFIGURABLE_KEY, BLOCKLET_TENANT_MODES, SUPPORTED_LANGUAGES } from '@blocklet/constant';
|
|
14
12
|
import { getWhoCanAccess } from '@blocklet/meta/lib/util';
|
|
15
13
|
import Toast from '@arcblock/ux/lib/Toast';
|
|
16
14
|
import FormTextInput from '../form/form-text-input';
|
|
17
15
|
import FormAutocompleteInput from '../form/form-autocomplete-input';
|
|
18
16
|
import { useNodeContext } from '../contexts/node';
|
|
19
|
-
import { isInstalling,
|
|
17
|
+
import { isInstalling, BlockletAdminRoles } from '../util';
|
|
20
18
|
import { enableDebug } from '../util/mode';
|
|
21
19
|
import Permission, { withPermission } from '../permission';
|
|
22
20
|
import ClearCache from '../clear-cache';
|
|
@@ -41,15 +39,11 @@ function BlockletEnvironment({
|
|
|
41
39
|
api,
|
|
42
40
|
inService,
|
|
43
41
|
prefix,
|
|
44
|
-
getSessionInHeader
|
|
45
|
-
ws: {
|
|
46
|
-
useSubscription
|
|
47
|
-
}
|
|
42
|
+
getSessionInHeader
|
|
48
43
|
} = useNodeContext();
|
|
49
44
|
const {
|
|
50
45
|
t
|
|
51
46
|
} = useContext(LocaleContext);
|
|
52
|
-
const [cpuCores, setCpuCores] = useState('');
|
|
53
47
|
const [loading, setLoading] = useState('');
|
|
54
48
|
const [showTransferOwner, setShowTransferOwner] = useState(false);
|
|
55
49
|
const whoCanAccess = getWhoCanAccess(blocklet);
|
|
@@ -68,12 +62,6 @@ function BlockletEnvironment({
|
|
|
68
62
|
const {
|
|
69
63
|
site
|
|
70
64
|
} = blocklet;
|
|
71
|
-
const clusterMode = get(blocklet.meta, 'capabilities.clusterMode', false);
|
|
72
|
-
useSubscription(EVENTS.NODE_RUNTIME_INFO, res => {
|
|
73
|
-
if (clusterMode) {
|
|
74
|
-
setCpuCores(get(res, 'cpu.physicalCores', ''));
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
65
|
if (isInstalling(blocklet.status)) {
|
|
78
66
|
return null;
|
|
79
67
|
}
|
|
@@ -108,16 +96,6 @@ function BlockletEnvironment({
|
|
|
108
96
|
description: t('blocklet.config.copyrightYear'),
|
|
109
97
|
value: copyrightYear ? copyrightYear.value : ''
|
|
110
98
|
}];
|
|
111
|
-
if (clusterMode) {
|
|
112
|
-
const exist = blocklet.configs.find(x => x.key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE);
|
|
113
|
-
const value = exist ? exist.value : cpuCores;
|
|
114
|
-
configurableEnvs.push({
|
|
115
|
-
key: BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE,
|
|
116
|
-
description: t('blocklet.config.clusterSize'),
|
|
117
|
-
value,
|
|
118
|
-
cpuCores
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
99
|
const onPublicToStoreChange = async e => {
|
|
122
100
|
if (loading) {
|
|
123
101
|
return;
|
|
@@ -143,16 +121,6 @@ function BlockletEnvironment({
|
|
|
143
121
|
}
|
|
144
122
|
};
|
|
145
123
|
const onSubmitConfig = async (key, value) => {
|
|
146
|
-
if (key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE) {
|
|
147
|
-
const errMessage = isValidClusterSize({
|
|
148
|
-
value,
|
|
149
|
-
cpuCores
|
|
150
|
-
});
|
|
151
|
-
if (errMessage) {
|
|
152
|
-
Toast.error(errMessage);
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
124
|
const params = [{
|
|
157
125
|
key,
|
|
158
126
|
value
|
|
@@ -1,74 +1,85 @@
|
|
|
1
1
|
/* eslint-disable react/jsx-one-expression-per-line */
|
|
2
|
-
import { useContext } from 'react';
|
|
2
|
+
import { useContext, useEffect } from 'react';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
|
-
import
|
|
4
|
+
import CircularProgress from '@mui/material/CircularProgress';
|
|
5
5
|
import Typography from '@mui/material/Typography';
|
|
6
6
|
import Link from '@mui/material/Link';
|
|
7
7
|
import InfoRow from '@arcblock/ux/lib/InfoRow';
|
|
8
8
|
import { LocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
9
|
+
import { useBlockletContext } from '../contexts/blocklet';
|
|
9
10
|
import { filesize } from '../util';
|
|
10
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
12
|
export default function BlockletDiskInfo({
|
|
12
|
-
blocklet,
|
|
13
13
|
...rest
|
|
14
14
|
}) {
|
|
15
15
|
const {
|
|
16
16
|
t
|
|
17
17
|
} = useContext(LocaleContext);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const {
|
|
19
|
+
blocklet,
|
|
20
|
+
loadingDiskInfo,
|
|
21
|
+
actions
|
|
22
|
+
} = useBlockletContext();
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
actions.refreshBlocklet({
|
|
25
|
+
showError: false,
|
|
26
|
+
attachDiskInfo: true
|
|
27
|
+
});
|
|
28
|
+
}, []); // eslint-disable-line
|
|
29
|
+
|
|
30
|
+
if (blocklet.diskInfo) {
|
|
31
|
+
const renderDiskInfo = (dir, size, handler) => /*#__PURE__*/_jsxs(Typography, {
|
|
32
|
+
children: [handler ?
|
|
33
|
+
/*#__PURE__*/
|
|
34
|
+
/* eslint-disable-next-line no-script-url, jsx-a11y/anchor-is-valid */
|
|
35
|
+
_jsx(Link, {
|
|
36
|
+
style: {
|
|
37
|
+
cursor: 'pointer'
|
|
38
|
+
},
|
|
39
|
+
onClick: handler,
|
|
40
|
+
underline: "hover",
|
|
41
|
+
children: dir
|
|
42
|
+
}) : dir, ' ', /*#__PURE__*/_jsx("strong", {
|
|
43
|
+
children: size ? filesize(size) : 'empty'
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
46
|
+
const env = blocklet.environments.reduce((acc, x) => {
|
|
47
|
+
acc[x.key] = x.value;
|
|
48
|
+
return acc;
|
|
49
|
+
}, {});
|
|
50
|
+
const rows = [{
|
|
51
|
+
key: 'appDir',
|
|
52
|
+
name: t('blocklet.diskInfo.appDir'),
|
|
53
|
+
value: renderDiskInfo(env.BLOCKLET_APP_DIR, blocklet.diskInfo.app)
|
|
54
|
+
}, {
|
|
55
|
+
key: 'dataDir',
|
|
56
|
+
name: t('blocklet.diskInfo.dataDir'),
|
|
57
|
+
value: renderDiskInfo(env.BLOCKLET_DATA_DIR, blocklet.diskInfo.data)
|
|
58
|
+
}, {
|
|
59
|
+
key: 'logDir',
|
|
60
|
+
name: t('blocklet.diskInfo.logDir'),
|
|
61
|
+
value: renderDiskInfo(env.BLOCKLET_LOG_DIR, blocklet.diskInfo.log)
|
|
62
|
+
}, {
|
|
63
|
+
key: 'cacheDir',
|
|
64
|
+
name: t('blocklet.diskInfo.cacheDir'),
|
|
65
|
+
value: renderDiskInfo(env.BLOCKLET_CACHE_DIR, blocklet.diskInfo.cache)
|
|
66
|
+
}];
|
|
67
|
+
return /*#__PURE__*/_jsx(Div, {
|
|
68
|
+
component: "div",
|
|
69
|
+
...rest,
|
|
70
|
+
children: rows.map(row => /*#__PURE__*/_jsx(InfoRow, {
|
|
71
|
+
valueComponent: "div",
|
|
72
|
+
nameWidth: 120,
|
|
73
|
+
name: row.name,
|
|
74
|
+
children: row.value
|
|
75
|
+
}, row.key))
|
|
21
76
|
});
|
|
22
77
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
style: {
|
|
29
|
-
cursor: 'pointer'
|
|
30
|
-
},
|
|
31
|
-
onClick: handler,
|
|
32
|
-
underline: "hover",
|
|
33
|
-
children: dir
|
|
34
|
-
}) : dir, ' ', /*#__PURE__*/_jsx("strong", {
|
|
35
|
-
children: size ? filesize(size) : 'empty'
|
|
36
|
-
})]
|
|
37
|
-
});
|
|
38
|
-
const env = blocklet.environments.reduce((acc, x) => {
|
|
39
|
-
acc[x.key] = x.value;
|
|
40
|
-
return acc;
|
|
41
|
-
}, {});
|
|
42
|
-
const rows = [{
|
|
43
|
-
key: 'appDir',
|
|
44
|
-
name: t('blocklet.diskInfo.appDir'),
|
|
45
|
-
value: renderDiskInfo(env.BLOCKLET_APP_DIR, blocklet.diskInfo.app)
|
|
46
|
-
}, {
|
|
47
|
-
key: 'dataDir',
|
|
48
|
-
name: t('blocklet.diskInfo.dataDir'),
|
|
49
|
-
value: renderDiskInfo(env.BLOCKLET_DATA_DIR, blocklet.diskInfo.data)
|
|
50
|
-
}, {
|
|
51
|
-
key: 'logDir',
|
|
52
|
-
name: t('blocklet.diskInfo.logDir'),
|
|
53
|
-
value: renderDiskInfo(env.BLOCKLET_LOG_DIR, blocklet.diskInfo.log)
|
|
54
|
-
}, {
|
|
55
|
-
key: 'cacheDir',
|
|
56
|
-
name: t('blocklet.diskInfo.cacheDir'),
|
|
57
|
-
value: renderDiskInfo(env.BLOCKLET_CACHE_DIR, blocklet.diskInfo.cache)
|
|
58
|
-
}];
|
|
59
|
-
return /*#__PURE__*/_jsx(Div, {
|
|
60
|
-
component: "div",
|
|
61
|
-
...rest,
|
|
62
|
-
children: rows.map(row => /*#__PURE__*/_jsx(InfoRow, {
|
|
63
|
-
valueComponent: "div",
|
|
64
|
-
nameWidth: 120,
|
|
65
|
-
name: row.name,
|
|
66
|
-
children: row.value
|
|
67
|
-
}, row.key))
|
|
78
|
+
if (loadingDiskInfo) {
|
|
79
|
+
return /*#__PURE__*/_jsx(CircularProgress, {});
|
|
80
|
+
}
|
|
81
|
+
return /*#__PURE__*/_jsx(Typography, {
|
|
82
|
+
children: t('blocklet.diskInfo.empty')
|
|
68
83
|
});
|
|
69
84
|
}
|
|
70
|
-
BlockletDiskInfo.propTypes = {
|
|
71
|
-
blocklet: PropTypes.object.isRequired
|
|
72
|
-
};
|
|
73
|
-
BlockletDiskInfo.defaultProps = {};
|
|
74
85
|
const Div = styled(Typography)``;
|
|
@@ -40,9 +40,9 @@ function ProjectSetting({
|
|
|
40
40
|
input: {
|
|
41
41
|
did,
|
|
42
42
|
projectId,
|
|
43
|
-
blockletTitle: params.blockletTitle,
|
|
44
|
-
blockletDescription: params.blockletDescription,
|
|
45
|
-
blockletIntroduction: params.blockletIntroduction,
|
|
43
|
+
blockletTitle: params.blockletTitle || '',
|
|
44
|
+
blockletDescription: params.blockletDescription || '',
|
|
45
|
+
blockletIntroduction: params.blockletIntroduction || '',
|
|
46
46
|
autoUpload: !!autoUpload,
|
|
47
47
|
possibleSameStore: !!possibleSameStore
|
|
48
48
|
}
|
|
@@ -104,9 +104,7 @@ function Connected() {
|
|
|
104
104
|
fontWeight: "bold",
|
|
105
105
|
mb: 2,
|
|
106
106
|
children: t('common.dataStorage')
|
|
107
|
-
}), /*#__PURE__*/_jsx(DiskInfo, {
|
|
108
|
-
blocklet: blocklet
|
|
109
|
-
})]
|
|
107
|
+
}), /*#__PURE__*/_jsx(DiskInfo, {})]
|
|
110
108
|
});
|
|
111
109
|
}
|
|
112
110
|
export default Connected;
|
|
@@ -198,7 +198,6 @@ EmptySpacesNFT.defaultProps = {
|
|
|
198
198
|
xmlns: "http://www.w3.org/2000/svg",
|
|
199
199
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
200
200
|
};
|
|
201
|
-
import { useBlockletContext } from '../../contexts/blocklet';
|
|
202
201
|
import ConnectTo from './connect-to';
|
|
203
202
|
import DiskInfo from '../disk-info';
|
|
204
203
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -206,9 +205,6 @@ function Disconnect() {
|
|
|
206
205
|
const {
|
|
207
206
|
t
|
|
208
207
|
} = useLocaleContext();
|
|
209
|
-
const {
|
|
210
|
-
blocklet
|
|
211
|
-
} = useBlockletContext();
|
|
212
208
|
return /*#__PURE__*/_jsxs(Box, {
|
|
213
209
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
214
210
|
minHeight: "40vh",
|
|
@@ -232,9 +228,7 @@ function Disconnect() {
|
|
|
232
228
|
fontWeight: "bold",
|
|
233
229
|
mb: 2,
|
|
234
230
|
children: t('common.dataStorage')
|
|
235
|
-
}), /*#__PURE__*/_jsx(DiskInfo, {
|
|
236
|
-
blocklet: blocklet
|
|
237
|
-
})]
|
|
231
|
+
}), /*#__PURE__*/_jsx(DiskInfo, {})]
|
|
238
232
|
});
|
|
239
233
|
}
|
|
240
234
|
Disconnect.propTypes = {};
|
|
@@ -243,8 +243,6 @@ function SpaceItem({
|
|
|
243
243
|
if (backupProgress?.completed) {
|
|
244
244
|
if (backupProgress?.progress === 100) {
|
|
245
245
|
Toast.success(t('storage.spaces.backupSuccessfully'));
|
|
246
|
-
} else if (backupProgress?.progress === -1) {
|
|
247
|
-
Toast.error(backupProgress?.message);
|
|
248
246
|
}
|
|
249
247
|
setLoading(false);
|
|
250
248
|
backupProgress.progress = 0;
|
package/lib/hooks/blocklet.js
CHANGED
|
@@ -56,6 +56,7 @@ export function useBlocklet({
|
|
|
56
56
|
const [error, setError] = useState(null);
|
|
57
57
|
const [loading, setLoading] = useState(false);
|
|
58
58
|
const [loadingRuntimeInfo, setLoadingRuntimeInfo] = useState(false);
|
|
59
|
+
const [loadingDiskInfo, setLoadingDiskInfo] = useState(true);
|
|
59
60
|
const [blocklet, setBlocklet] = useState();
|
|
60
61
|
const [runtimeHistory, setRuntimeHistory] = useState({
|
|
61
62
|
cpu: [],
|
|
@@ -69,8 +70,12 @@ export function useBlocklet({
|
|
|
69
70
|
domainsAccessibility,
|
|
70
71
|
recommendedDomain
|
|
71
72
|
} = useDomainsAccessibility(domains);
|
|
72
|
-
const refreshRuntimeInfo = async () => {
|
|
73
|
-
|
|
73
|
+
const refreshRuntimeInfo = async (attachDiskInfo = false) => {
|
|
74
|
+
if (attachDiskInfo) {
|
|
75
|
+
setLoadingDiskInfo(true);
|
|
76
|
+
} else {
|
|
77
|
+
setLoadingRuntimeInfo(true);
|
|
78
|
+
}
|
|
74
79
|
try {
|
|
75
80
|
const {
|
|
76
81
|
blocklet: data
|
|
@@ -78,6 +83,7 @@ export function useBlocklet({
|
|
|
78
83
|
input: {
|
|
79
84
|
did,
|
|
80
85
|
attachRuntimeInfo: true,
|
|
86
|
+
attachDiskInfo,
|
|
81
87
|
getOptionalComponents
|
|
82
88
|
}
|
|
83
89
|
});
|
|
@@ -89,7 +95,11 @@ export function useBlocklet({
|
|
|
89
95
|
} catch (err) {
|
|
90
96
|
Toast.error(err.message);
|
|
91
97
|
} finally {
|
|
92
|
-
|
|
98
|
+
if (attachDiskInfo) {
|
|
99
|
+
setLoadingDiskInfo(false);
|
|
100
|
+
} else {
|
|
101
|
+
setLoadingRuntimeInfo(false);
|
|
102
|
+
}
|
|
93
103
|
}
|
|
94
104
|
};
|
|
95
105
|
const getRuntimeHistory = async () => {
|
|
@@ -118,7 +128,8 @@ export function useBlocklet({
|
|
|
118
128
|
};
|
|
119
129
|
const refreshBlocklet = async ({
|
|
120
130
|
showError = true,
|
|
121
|
-
attachRuntimeInfo = true
|
|
131
|
+
attachRuntimeInfo = true,
|
|
132
|
+
attachDiskInfo = false
|
|
122
133
|
} = {}) => {
|
|
123
134
|
if (loading) {
|
|
124
135
|
return;
|
|
@@ -145,7 +156,7 @@ export function useBlocklet({
|
|
|
145
156
|
});
|
|
146
157
|
setLoading(false);
|
|
147
158
|
if (attachRuntimeInfo) {
|
|
148
|
-
refreshRuntimeInfo();
|
|
159
|
+
refreshRuntimeInfo(attachDiskInfo);
|
|
149
160
|
getRuntimeHistory();
|
|
150
161
|
}
|
|
151
162
|
} else {
|
|
@@ -303,6 +314,7 @@ export function useBlocklet({
|
|
|
303
314
|
return {
|
|
304
315
|
loading,
|
|
305
316
|
loadingRuntimeInfo,
|
|
317
|
+
loadingDiskInfo,
|
|
306
318
|
error,
|
|
307
319
|
blocklet: data,
|
|
308
320
|
runtimeHistory,
|
package/lib/locales/ar.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: 'جلسات المستخدم النشطة',
|
|
1276
1276
|
forceLogout: 'تسجيل الخروج القسري',
|
|
1277
|
-
forceLogoutDescription: 'هل تؤكد تسجيل خروج هذا المستخدم؟'
|
|
1277
|
+
forceLogoutDescription: 'هل تؤكد تسجيل خروج هذا المستخدم؟',
|
|
1278
|
+
openProfile: 'عرض الصفحة الشخصية'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: 'تحويل الملكية',
|
package/lib/locales/de.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: 'Aktive Benutzersitzungen',
|
|
1276
1276
|
forceLogout: 'Erzwungenes Abmelden',
|
|
1277
|
-
forceLogoutDescription: 'Bestätigen Sie die erzwungene Abmeldung dieses Benutzers?'
|
|
1277
|
+
forceLogoutDescription: 'Bestätigen Sie die erzwungene Abmeldung dieses Benutzers?',
|
|
1278
|
+
openProfile: 'Profil anzeigen'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: 'Änderung des Eigentums',
|
package/lib/locales/en.js
CHANGED
|
@@ -65,12 +65,12 @@ export default {
|
|
|
65
65
|
tooltip: 'If you received a server ownership nft, you can claim your owner passport with this link.'
|
|
66
66
|
},
|
|
67
67
|
exchangePassport: {
|
|
68
|
-
title: '
|
|
69
|
-
success: 'You have successfully
|
|
68
|
+
title: 'Get Passport with NFT',
|
|
69
|
+
success: 'You have successfully get your passport and logged in with the passport',
|
|
70
70
|
login: 'Login',
|
|
71
71
|
tooltip: 'If you own NFT from collection {collections}, you can exchange your passport with this link.',
|
|
72
72
|
dialog: {
|
|
73
|
-
title: '
|
|
73
|
+
title: 'Get Passport with NFT',
|
|
74
74
|
scan: 'Connect your DID Wallet to present your NFT to get a passport',
|
|
75
75
|
confirm: 'Select NFT on your DID Wallet',
|
|
76
76
|
success: 'Passport has been successfully exchanged'
|
|
@@ -1228,6 +1228,7 @@ export default {
|
|
|
1228
1228
|
passports: 'Passports',
|
|
1229
1229
|
lastLogin: 'Last Login',
|
|
1230
1230
|
lastLoginIp: 'Last Login IP',
|
|
1231
|
+
openProfile: 'View Profile',
|
|
1231
1232
|
source: 'Register Source',
|
|
1232
1233
|
source_derived: 'Derived from oauth',
|
|
1233
1234
|
source_wallet: 'DID Wallet',
|
|
@@ -1390,11 +1391,11 @@ export default {
|
|
|
1390
1391
|
role: 'Passport Type',
|
|
1391
1392
|
ttl: 'Passport Expire Policy',
|
|
1392
1393
|
ttlNever: 'Never Expire',
|
|
1393
|
-
ttlMint: '
|
|
1394
|
-
ttlExchange: '
|
|
1394
|
+
ttlMint: 'From NFT Purchase',
|
|
1395
|
+
ttlExchange: 'From Passport Exchange',
|
|
1395
1396
|
ttlNeverTip: 'The passport will be valid until revoked',
|
|
1396
|
-
ttlMintTip: 'The passport will be valid
|
|
1397
|
-
ttlExchangeTip: 'The passport will be valid
|
|
1397
|
+
ttlMintTip: 'The passport will be valid from the time the NFT is purchased until you specified ttl or revoke',
|
|
1398
|
+
ttlExchangeTip: 'The passport will be valid from the time user successfully exchanged until you specified ttl or revoke',
|
|
1398
1399
|
ttlTip: '"365d" means 365 days, you can also use "30 days" or "24h"',
|
|
1399
1400
|
validUntil: 'Valid until: {date}',
|
|
1400
1401
|
externalPassport: 'External Passport',
|
package/lib/locales/es.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: 'Sesiones de usuario activas',
|
|
1276
1276
|
forceLogout: 'Cerrar sesión forzada',
|
|
1277
|
-
forceLogoutDescription: '¿Confirmar para forzar el cierre de sesión de este usuario?'
|
|
1277
|
+
forceLogoutDescription: '¿Confirmar para forzar el cierre de sesión de este usuario?',
|
|
1278
|
+
openProfile: 'Ver Perfil'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: 'Transferir propiedad',
|
package/lib/locales/fr.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: "Sessions d'utilisateurs actives",
|
|
1276
1276
|
forceLogout: 'Déconnexion forcée',
|
|
1277
|
-
forceLogoutDescription: 'Confirmez-vous la déconnexion forcée de cet utilisateur?'
|
|
1277
|
+
forceLogoutDescription: 'Confirmez-vous la déconnexion forcée de cet utilisateur?',
|
|
1278
|
+
openProfile: 'Voir le profil'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: 'Transfert de propriété',
|
package/lib/locales/hi.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: 'सक्रिय उपयोगकर्ता सत्र',
|
|
1276
1276
|
forceLogout: 'बाहर करें बल',
|
|
1277
|
-
forceLogoutDescription: 'क्या आप इस उपयोगकर्ता को बाहर करने के लिए पुष्टि करें?'
|
|
1277
|
+
forceLogoutDescription: 'क्या आप इस उपयोगकर्ता को बाहर करने के लिए पुष्टि करें?',
|
|
1278
|
+
openProfile: 'प्रोफ़ाइल देखें'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: 'स्वामित्व स्थानांतरण',
|
package/lib/locales/i18n.db
CHANGED
|
Binary file
|
package/lib/locales/id.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: 'Sesi Pengguna Aktif',
|
|
1276
1276
|
forceLogout: 'Keluar paksa',
|
|
1277
|
-
forceLogoutDescription: 'Konfirmasi untuk logout paksa pengguna ini?'
|
|
1277
|
+
forceLogoutDescription: 'Konfirmasi untuk logout paksa pengguna ini?',
|
|
1278
|
+
openProfile: 'Lihat Profil'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: 'Pindahkan Kepemilikan',
|
package/lib/locales/ja.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: 'アクティブユーザーセッション',
|
|
1276
1276
|
forceLogout: '強制ログアウト',
|
|
1277
|
-
forceLogoutDescription: 'このユーザーを強制的にログアウトしますか?'
|
|
1277
|
+
forceLogoutDescription: 'このユーザーを強制的にログアウトしますか?',
|
|
1278
|
+
openProfile: 'プロフィールを表示'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: '権限の移譲',
|
package/lib/locales/ko.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: '활성 사용자 세션',
|
|
1276
1276
|
forceLogout: '강제 로그아웃',
|
|
1277
|
-
forceLogoutDescription: '이 사용자를 강제로 로그아웃하시겠습니까?'
|
|
1277
|
+
forceLogoutDescription: '이 사용자를 강제로 로그아웃하시겠습니까?',
|
|
1278
|
+
openProfile: '프로필 보기'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: '소유권 이전',
|
package/lib/locales/pt.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: 'Sessões de Usuários Ativos',
|
|
1276
1276
|
forceLogout: 'Logout forçado',
|
|
1277
|
-
forceLogoutDescription: 'Confirmar o logout forçado deste usuário?'
|
|
1277
|
+
forceLogoutDescription: 'Confirmar o logout forçado deste usuário?',
|
|
1278
|
+
openProfile: 'Ver perfil'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: 'Transferir Propriedade',
|
package/lib/locales/ru.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: 'Активные пользовательские сессии',
|
|
1276
1276
|
forceLogout: 'Принудительный выход',
|
|
1277
|
-
forceLogoutDescription: 'Подтвердить выход из системы этого пользователя?'
|
|
1277
|
+
forceLogoutDescription: 'Подтвердить выход из системы этого пользователя?',
|
|
1278
|
+
openProfile: 'Просмотр профиля'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: 'Передача собственности',
|
package/lib/locales/th.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: 'เซสชันผู้ใช้ที่ใช้งานอยู่',
|
|
1276
1276
|
forceLogout: 'ออกจากระบบบังคับ',
|
|
1277
|
-
forceLogoutDescription: 'ยืนยันให้ออกจากระบบผู้ใช้นี้หรือไม่?'
|
|
1277
|
+
forceLogoutDescription: 'ยืนยันให้ออกจากระบบผู้ใช้นี้หรือไม่?',
|
|
1278
|
+
openProfile: 'ดูโปรไฟล์'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: 'โอนสิทธิ์การเป็นเจ้าของ',
|
package/lib/locales/vi.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: 'Phiên người dùng hoạt động',
|
|
1276
1276
|
forceLogout: 'Đăng xuất bắt buộc',
|
|
1277
|
-
forceLogoutDescription: 'Xác nhận đăng xuất buộc người dùng này?'
|
|
1277
|
+
forceLogoutDescription: 'Xác nhận đăng xuất buộc người dùng này?',
|
|
1278
|
+
openProfile: 'Xem hồ sơ'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: 'Chuyển quyền sở hữu',
|
package/lib/locales/zh-tw.js
CHANGED
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: '活躍用戶會話',
|
|
1276
1276
|
forceLogout: '強制登出',
|
|
1277
|
-
forceLogoutDescription: '確認是否強制登出此使用者?'
|
|
1277
|
+
forceLogoutDescription: '確認是否強制登出此使用者?',
|
|
1278
|
+
openProfile: '檢視個人檔案'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: '轉讓所有權',
|
package/lib/locales/zh.js
CHANGED
|
@@ -65,12 +65,12 @@ export default {
|
|
|
65
65
|
tooltip: '如果你收到了 Owner NFT,你可以通过这个链接申请你的节点所有者通行证'
|
|
66
66
|
},
|
|
67
67
|
exchangePassport: {
|
|
68
|
-
title: '用 NFT
|
|
69
|
-
success: '
|
|
70
|
-
tooltip: '如果你拥有来自 {collections} 集合的 NFT
|
|
68
|
+
title: '用 NFT 来获得通行证',
|
|
69
|
+
success: '你已经成功获得通行证,并自动登录',
|
|
70
|
+
tooltip: '如果你拥有来自 {collections} 集合的 NFT,点击这里获得通行证',
|
|
71
71
|
dialog: {
|
|
72
|
-
title: '用 NFT
|
|
73
|
-
scan: '连接 DID 钱包出示 NFT
|
|
72
|
+
title: '用 NFT 来获得通行证',
|
|
73
|
+
scan: '连接 DID 钱包出示 NFT 以获得通行证',
|
|
74
74
|
confirm: '在钱包中选择 NFT',
|
|
75
75
|
success: '通行证换取成功'
|
|
76
76
|
},
|
|
@@ -1274,7 +1274,8 @@ export default {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
activeUserSessions: '活跃用户会话',
|
|
1276
1276
|
forceLogout: '强制注销',
|
|
1277
|
-
forceLogoutDescription: '确认是否强制退出此用户?'
|
|
1277
|
+
forceLogoutDescription: '确认是否强制退出此用户?',
|
|
1278
|
+
openProfile: '查看个人资料'
|
|
1278
1279
|
},
|
|
1279
1280
|
transferNode: {
|
|
1280
1281
|
name: '转移所有者',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { Alert, Box, CircularProgress, DialogContentText, MenuItem, Select, TextField, InputLabel, FormControl } from '@mui/material';
|
|
2
|
+
import { Alert, Box, CircularProgress, DialogContentText, MenuItem, Select, TextField, InputLabel, FormControl, Typography } from '@mui/material';
|
|
3
3
|
import { useReactive } from 'ahooks';
|
|
4
4
|
import Dialog from '@arcblock/ux/lib/Dialog';
|
|
5
5
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
@@ -139,8 +139,21 @@ export default function InviteMember({
|
|
|
139
139
|
children: roles.filter(d => d.name !== 'owner').map(r => /*#__PURE__*/_jsx(MenuItem, {
|
|
140
140
|
value: r.name,
|
|
141
141
|
"data-cy": `invite-member-select-option-${r.name}`,
|
|
142
|
-
children: /*#__PURE__*/
|
|
143
|
-
|
|
142
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
143
|
+
sx: {
|
|
144
|
+
display: 'flex',
|
|
145
|
+
flexDirection: 'column'
|
|
146
|
+
},
|
|
147
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
148
|
+
variant: "subtitle1",
|
|
149
|
+
children: r.title || r.name
|
|
150
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
151
|
+
variant: "caption",
|
|
152
|
+
sx: {
|
|
153
|
+
opacity: 0.7
|
|
154
|
+
},
|
|
155
|
+
children: r.description
|
|
156
|
+
})]
|
|
144
157
|
})
|
|
145
158
|
}, r.name))
|
|
146
159
|
})]
|
|
@@ -11,6 +11,7 @@ import FormControl from '@mui/material/FormControl';
|
|
|
11
11
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
12
12
|
import Button from '@arcblock/ux/lib/Button';
|
|
13
13
|
import Alert from '@mui/material/Alert';
|
|
14
|
+
import { Box } from '@mui/material';
|
|
14
15
|
import { useNodeContext } from '../../contexts/node';
|
|
15
16
|
import { formatError } from '../../util';
|
|
16
17
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -118,8 +119,21 @@ export default function IssuePassport({
|
|
|
118
119
|
children: roles.filter(d => showOwnerPassport || d.name !== 'owner').map(r => /*#__PURE__*/_jsx(MenuItem, {
|
|
119
120
|
value: r.name,
|
|
120
121
|
"data-cy": `issue-passport-select-option-${r.name}`,
|
|
121
|
-
children: /*#__PURE__*/
|
|
122
|
-
|
|
122
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
123
|
+
sx: {
|
|
124
|
+
display: 'flex',
|
|
125
|
+
flexDirection: 'column'
|
|
126
|
+
},
|
|
127
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
128
|
+
variant: "subtitle1",
|
|
129
|
+
children: r.title || r.name
|
|
130
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
131
|
+
variant: "caption",
|
|
132
|
+
sx: {
|
|
133
|
+
opacity: 0.7
|
|
134
|
+
},
|
|
135
|
+
children: r.description
|
|
136
|
+
})]
|
|
123
137
|
})
|
|
124
138
|
}, r.name))
|
|
125
139
|
})]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable react/no-unstable-nested-components */
|
|
2
|
-
import { useEffect } from 'react';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
5
|
import Toast from '@arcblock/ux/lib/Toast';
|
|
@@ -14,8 +14,10 @@ import ForbidLoginIcon from '@arcblock/icons/lib/ForbidLoginIcon';
|
|
|
14
14
|
import AllowLoginIcon from '@arcblock/icons/lib/AllowLoginIcon';
|
|
15
15
|
import { getTextColor } from '@abtnode/auth/lib/util/create-passport-svg';
|
|
16
16
|
import { useReactive } from 'ahooks';
|
|
17
|
+
import { Icon } from '@iconify/react';
|
|
17
18
|
import { USER_TYPE } from '@abtnode/constant';
|
|
18
19
|
import { LOGIN_PROVIDER, PROVIDER_NAME, TeamEvents } from '@blocklet/constant';
|
|
20
|
+
import { Button } from '@mui/material';
|
|
19
21
|
import Tag from '../../tag';
|
|
20
22
|
import DidAddress from '../../did-address';
|
|
21
23
|
import Permission from '../../permission';
|
|
@@ -26,6 +28,7 @@ import PassportIssuances from './passport-issuances';
|
|
|
26
28
|
import Passports from './passports';
|
|
27
29
|
import ToggleUserApproval from './toggle-user-approval';
|
|
28
30
|
import { parseAvatar } from './util';
|
|
31
|
+
import blockletSdk from '../../util/sdk';
|
|
29
32
|
import UserConnections from './connections';
|
|
30
33
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
34
|
function LinkUser({
|
|
@@ -75,6 +78,7 @@ export default function Member({
|
|
|
75
78
|
issuances: null,
|
|
76
79
|
tab: initTab || defaultTab
|
|
77
80
|
});
|
|
81
|
+
const [profileUrl, setProfileUrl] = useState('');
|
|
78
82
|
const getData = async (_teamDid, _userDid) => {
|
|
79
83
|
try {
|
|
80
84
|
const res = await api.doBatchQuery({
|
|
@@ -126,6 +130,12 @@ export default function Member({
|
|
|
126
130
|
}
|
|
127
131
|
}, [pageState.issuances]); // eslint-disable-line
|
|
128
132
|
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
blockletSdk.user.getProfileUrl({
|
|
135
|
+
did: pageState.user?.did,
|
|
136
|
+
locale
|
|
137
|
+
}).then(setProfileUrl);
|
|
138
|
+
}, [pageState.user?.did, locale]);
|
|
129
139
|
const handleChangeUser = async changedUser => {
|
|
130
140
|
await getData(teamDid, changedUser.did);
|
|
131
141
|
pageState.tab = defaultTab;
|
|
@@ -139,6 +149,9 @@ export default function Member({
|
|
|
139
149
|
}, {
|
|
140
150
|
name: t('common.email'),
|
|
141
151
|
value: pageState.user.email
|
|
152
|
+
}, {
|
|
153
|
+
name: t('common.phone'),
|
|
154
|
+
value: pageState.user.phone
|
|
142
155
|
}, {
|
|
143
156
|
name: t('team.member.source'),
|
|
144
157
|
value: /*#__PURE__*/_jsx(Box, {
|
|
@@ -298,29 +311,55 @@ export default function Member({
|
|
|
298
311
|
children: /*#__PURE__*/_jsx(Spinner, {})
|
|
299
312
|
}), pageState.user && /*#__PURE__*/_jsxs("div", {
|
|
300
313
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
314
|
+
sx: {
|
|
315
|
+
display: 'flex',
|
|
316
|
+
flexDirection: 'row',
|
|
317
|
+
alignItems: 'center',
|
|
318
|
+
justifyContent: 'space-between'
|
|
319
|
+
},
|
|
320
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
321
|
+
display: "flex",
|
|
322
|
+
alignItems: "center",
|
|
323
|
+
className: "info",
|
|
324
|
+
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
325
|
+
src: pageState.user.avatar,
|
|
326
|
+
style: {
|
|
327
|
+
width: 48,
|
|
328
|
+
height: 48,
|
|
329
|
+
backgroundColor: 'transparent',
|
|
330
|
+
marginRight: 16
|
|
331
|
+
}
|
|
332
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
333
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
334
|
+
className: "name",
|
|
335
|
+
children: pageState.user.fullName
|
|
336
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
337
|
+
className: "did",
|
|
338
|
+
mt: 1,
|
|
339
|
+
children: /*#__PURE__*/_jsx(DidAddress, {
|
|
340
|
+
compact: true,
|
|
341
|
+
responsive: false,
|
|
342
|
+
did: pageState.user.did,
|
|
343
|
+
showQrcode: true
|
|
344
|
+
})
|
|
345
|
+
})]
|
|
323
346
|
})]
|
|
347
|
+
}), !!inService && /*#__PURE__*/_jsx("a", {
|
|
348
|
+
href: profileUrl,
|
|
349
|
+
target: "_blank",
|
|
350
|
+
rel: "noreferrer",
|
|
351
|
+
children: /*#__PURE__*/_jsxs(Button, {
|
|
352
|
+
variant: "contained",
|
|
353
|
+
color: "primary",
|
|
354
|
+
"data-cy": "issue-passport",
|
|
355
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
356
|
+
icon: "majesticons:open-line",
|
|
357
|
+
style: {
|
|
358
|
+
fontSize: 16,
|
|
359
|
+
marginRight: 4
|
|
360
|
+
}
|
|
361
|
+
}), t('team.member.openProfile')]
|
|
362
|
+
})
|
|
324
363
|
})]
|
|
325
364
|
}), /*#__PURE__*/_jsx(Box, {
|
|
326
365
|
mx: 3,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.30-beta-958ae719",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -25,24 +25,24 @@
|
|
|
25
25
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@abtnode/auth": "1.16.
|
|
29
|
-
"@abtnode/constant": "1.16.
|
|
30
|
-
"@abtnode/util": "1.16.
|
|
28
|
+
"@abtnode/auth": "1.16.30-beta-958ae719",
|
|
29
|
+
"@abtnode/constant": "1.16.30-beta-958ae719",
|
|
30
|
+
"@abtnode/util": "1.16.30-beta-958ae719",
|
|
31
31
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
32
32
|
"@arcblock/did": "^1.18.128",
|
|
33
|
-
"@arcblock/did-connect": "^2.10.
|
|
33
|
+
"@arcblock/did-connect": "^2.10.14",
|
|
34
34
|
"@arcblock/did-motif": "^1.1.13",
|
|
35
|
-
"@arcblock/icons": "^2.10.
|
|
36
|
-
"@arcblock/nft-display": "2.10.
|
|
37
|
-
"@arcblock/react-hooks": "^2.10.
|
|
38
|
-
"@arcblock/terminal": "^2.10.
|
|
39
|
-
"@arcblock/ux": "^2.10.
|
|
40
|
-
"@blocklet/constant": "1.16.
|
|
41
|
-
"@blocklet/js-sdk": "1.16.
|
|
42
|
-
"@blocklet/launcher-layout": "2.3.
|
|
43
|
-
"@blocklet/list": "^0.13.
|
|
44
|
-
"@blocklet/meta": "1.16.
|
|
45
|
-
"@blocklet/ui-react": "^2.10.
|
|
35
|
+
"@arcblock/icons": "^2.10.14",
|
|
36
|
+
"@arcblock/nft-display": "2.10.14",
|
|
37
|
+
"@arcblock/react-hooks": "^2.10.14",
|
|
38
|
+
"@arcblock/terminal": "^2.10.14",
|
|
39
|
+
"@arcblock/ux": "^2.10.14",
|
|
40
|
+
"@blocklet/constant": "1.16.30-beta-958ae719",
|
|
41
|
+
"@blocklet/js-sdk": "1.16.30-beta-958ae719",
|
|
42
|
+
"@blocklet/launcher-layout": "2.3.40",
|
|
43
|
+
"@blocklet/list": "^0.13.14",
|
|
44
|
+
"@blocklet/meta": "1.16.30-beta-958ae719",
|
|
45
|
+
"@blocklet/ui-react": "^2.10.14",
|
|
46
46
|
"@blocklet/uploader": "0.1.20",
|
|
47
47
|
"@emotion/react": "^11.10.4",
|
|
48
48
|
"@emotion/styled": "^11.10.4",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"jest": "^29.7.0",
|
|
109
109
|
"jest-environment-jsdom": "^29.7.0"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "75590ff3be51e7fe2a070124541aebc203ed16dc"
|
|
112
112
|
}
|