@abtnode/ux 1.16.27-beta-4022dde0 → 1.16.27-beta-d27e19fa
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/publish/create-release/branding.js +109 -89
- package/lib/blocklet/publish/create-release/index.js +1 -0
- package/lib/blocklet/router/action/add-domain-alias.js +2 -46
- package/lib/blocklet/router/add-domain.js +203 -67
- package/lib/contexts/domain.js +1 -22
- package/lib/locales/ar.js +4 -2
- package/lib/locales/de.js +4 -2
- package/lib/locales/en.js +1 -1
- package/lib/locales/es.js +4 -2
- package/lib/locales/fr.js +4 -2
- package/lib/locales/hi.js +4 -2
- package/lib/locales/i18n.db +0 -0
- package/lib/locales/id.js +4 -2
- package/lib/locales/ja.js +4 -2
- package/lib/locales/ko.js +4 -2
- package/lib/locales/pt.js +4 -2
- package/lib/locales/ru.js +4 -2
- package/lib/locales/th.js +4 -2
- package/lib/locales/vi.js +4 -2
- package/lib/locales/zh-tw.js +4 -2
- package/lib/locales/zh.js +3 -1
- package/package.json +8 -7
|
@@ -113,8 +113,104 @@ function Branding({
|
|
|
113
113
|
const uploadScreenshotPrefix = `${WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${blocklet.meta.did}/${projectId}/screenshot/upload`;
|
|
114
114
|
const logoUrl = params?.blockletLogo ? `${uploadLogoPrefix}/${params.blockletLogo}` : `${WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`;
|
|
115
115
|
const screenshotUrls = (params?.blockletScreenshots || []).filter(Boolean).map(x => `${uploadScreenshotPrefix}/${x}`);
|
|
116
|
+
const checkCanUpload = () => {
|
|
117
|
+
if (readOnly) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
if (!projectId || projectId === UNOWNED_DID) {
|
|
121
|
+
Toast.error(t('blocklet.publish.errorTip.noFirstDid'));
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
};
|
|
116
126
|
return /*#__PURE__*/_jsxs(Content, {
|
|
117
|
-
children: [/*#__PURE__*/
|
|
127
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
128
|
+
display: "flex",
|
|
129
|
+
className: "section",
|
|
130
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
131
|
+
sx: {
|
|
132
|
+
flex: 1
|
|
133
|
+
},
|
|
134
|
+
children: [/*#__PURE__*/_jsx(TextField, {
|
|
135
|
+
disabled: loading || readOnly,
|
|
136
|
+
label: `Blocklet ${t('common.title')}`,
|
|
137
|
+
placeholder: `Blocklet ${t('common.title')}`,
|
|
138
|
+
InputProps: {
|
|
139
|
+
'data-cy': 'blocklet-title',
|
|
140
|
+
readOnly
|
|
141
|
+
},
|
|
142
|
+
autoComplete: "off",
|
|
143
|
+
variant: "outlined",
|
|
144
|
+
fullWidth: true,
|
|
145
|
+
required: true,
|
|
146
|
+
value: params.blockletTitle || '',
|
|
147
|
+
onChange: e => {
|
|
148
|
+
setParamsErrTip({
|
|
149
|
+
blockletTitle: ''
|
|
150
|
+
});
|
|
151
|
+
setParams({
|
|
152
|
+
blockletTitle: e.target.value
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
error: !!paramsErrTip.blockletTitle,
|
|
156
|
+
helperText: paramsErrTip.blockletTitle || ''
|
|
157
|
+
}), /*#__PURE__*/_jsx(TextField, {
|
|
158
|
+
required: true,
|
|
159
|
+
label: "Blocklet DID",
|
|
160
|
+
fullWidth: true,
|
|
161
|
+
readonly: true,
|
|
162
|
+
disabled: true,
|
|
163
|
+
autoComplete: "off",
|
|
164
|
+
variant: "outlined",
|
|
165
|
+
InputProps: {
|
|
166
|
+
'data-cy': 'export-blocklet-did',
|
|
167
|
+
endAdornment: projectId === UNOWNED_DID && /*#__PURE__*/_jsx(InputAdornment, {
|
|
168
|
+
position: "end",
|
|
169
|
+
children: /*#__PURE__*/_jsx(ConnectStoreButton, {
|
|
170
|
+
blocklet: blocklet,
|
|
171
|
+
store: wantToConnectStore,
|
|
172
|
+
onChangeStore: setWantToConnectStore,
|
|
173
|
+
disabled: !params.blockletTitle || readOnly || loading,
|
|
174
|
+
loading: loading,
|
|
175
|
+
onClick: handleConnectByStudio
|
|
176
|
+
})
|
|
177
|
+
})
|
|
178
|
+
},
|
|
179
|
+
error: !!paramsErrTip.projectId,
|
|
180
|
+
helperText: paramsErrTip.projectId || '',
|
|
181
|
+
value: projectId === UNOWNED_DID ? '' : projectId,
|
|
182
|
+
sx: {
|
|
183
|
+
mt: 3
|
|
184
|
+
}
|
|
185
|
+
}), /*#__PURE__*/_jsx(TextField, {
|
|
186
|
+
disabled: loading || readOnly,
|
|
187
|
+
label: `Blocklet ${t('common.description')}`,
|
|
188
|
+
placeholder: `Blocklet ${t('common.description')}`,
|
|
189
|
+
InputProps: {
|
|
190
|
+
'data-cy': 'blocklet-description',
|
|
191
|
+
readOnly
|
|
192
|
+
},
|
|
193
|
+
required: true,
|
|
194
|
+
autoComplete: "off",
|
|
195
|
+
variant: "outlined",
|
|
196
|
+
fullWidth: true,
|
|
197
|
+
value: params.blockletDescription || '',
|
|
198
|
+
onChange: e => {
|
|
199
|
+
setParamsErrTip({
|
|
200
|
+
blockletDescription: ''
|
|
201
|
+
});
|
|
202
|
+
setParams({
|
|
203
|
+
blockletDescription: e.target.value
|
|
204
|
+
});
|
|
205
|
+
},
|
|
206
|
+
error: !!paramsErrTip.blockletDescription,
|
|
207
|
+
helperText: paramsErrTip.blockletDescription || '',
|
|
208
|
+
sx: {
|
|
209
|
+
mt: 3
|
|
210
|
+
}
|
|
211
|
+
})]
|
|
212
|
+
})
|
|
213
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
118
214
|
display: "flex",
|
|
119
215
|
mt: 3,
|
|
120
216
|
className: "section full-width",
|
|
@@ -143,7 +239,12 @@ function Branding({
|
|
|
143
239
|
},
|
|
144
240
|
alt: "Blocklet Logo",
|
|
145
241
|
src: initLogoUrl || logoUrl,
|
|
146
|
-
onClick: () =>
|
|
242
|
+
onClick: () => {
|
|
243
|
+
if (!checkCanUpload()) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
uploaderLogoRef.current.open();
|
|
247
|
+
}
|
|
147
248
|
})
|
|
148
249
|
})]
|
|
149
250
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
@@ -191,7 +292,12 @@ function Branding({
|
|
|
191
292
|
justifyContent: "center",
|
|
192
293
|
alignItems: "center",
|
|
193
294
|
fontSize: 40,
|
|
194
|
-
onClick: () =>
|
|
295
|
+
onClick: () => {
|
|
296
|
+
if (!checkCanUpload()) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
uploaderScreenshotRef.current.open();
|
|
300
|
+
},
|
|
195
301
|
children: "+"
|
|
196
302
|
})]
|
|
197
303
|
})]
|
|
@@ -251,92 +357,6 @@ function Branding({
|
|
|
251
357
|
}
|
|
252
358
|
}, "uploader-screenshot")
|
|
253
359
|
})]
|
|
254
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
255
|
-
display: "flex",
|
|
256
|
-
className: "section",
|
|
257
|
-
children: /*#__PURE__*/_jsxs(Box, {
|
|
258
|
-
sx: {
|
|
259
|
-
flex: 1
|
|
260
|
-
},
|
|
261
|
-
children: [/*#__PURE__*/_jsx(TextField, {
|
|
262
|
-
disabled: loading || readOnly,
|
|
263
|
-
label: `Blocklet ${t('common.title')}`,
|
|
264
|
-
placeholder: `Blocklet ${t('common.title')}`,
|
|
265
|
-
InputProps: {
|
|
266
|
-
'data-cy': 'blocklet-title',
|
|
267
|
-
readOnly
|
|
268
|
-
},
|
|
269
|
-
autoComplete: "off",
|
|
270
|
-
variant: "outlined",
|
|
271
|
-
fullWidth: true,
|
|
272
|
-
required: true,
|
|
273
|
-
value: params.blockletTitle || '',
|
|
274
|
-
onChange: e => {
|
|
275
|
-
setParamsErrTip({
|
|
276
|
-
blockletTitle: ''
|
|
277
|
-
});
|
|
278
|
-
setParams({
|
|
279
|
-
blockletTitle: e.target.value
|
|
280
|
-
});
|
|
281
|
-
},
|
|
282
|
-
error: !!paramsErrTip.blockletTitle,
|
|
283
|
-
helperText: paramsErrTip.blockletTitle || ''
|
|
284
|
-
}), /*#__PURE__*/_jsx(TextField, {
|
|
285
|
-
required: true,
|
|
286
|
-
label: "Blocklet DID",
|
|
287
|
-
fullWidth: true,
|
|
288
|
-
readonly: true,
|
|
289
|
-
disabled: true,
|
|
290
|
-
autoComplete: "off",
|
|
291
|
-
variant: "outlined",
|
|
292
|
-
InputProps: {
|
|
293
|
-
'data-cy': 'export-blocklet-did',
|
|
294
|
-
endAdornment: projectId === UNOWNED_DID && /*#__PURE__*/_jsx(InputAdornment, {
|
|
295
|
-
position: "end",
|
|
296
|
-
children: /*#__PURE__*/_jsx(ConnectStoreButton, {
|
|
297
|
-
blocklet: blocklet,
|
|
298
|
-
store: wantToConnectStore,
|
|
299
|
-
onChangeStore: setWantToConnectStore,
|
|
300
|
-
disabled: !params.blockletTitle || readOnly || loading,
|
|
301
|
-
loading: loading,
|
|
302
|
-
onClick: handleConnectByStudio
|
|
303
|
-
})
|
|
304
|
-
})
|
|
305
|
-
},
|
|
306
|
-
error: !!paramsErrTip.projectId,
|
|
307
|
-
helperText: paramsErrTip.projectId || '',
|
|
308
|
-
value: projectId === UNOWNED_DID ? '' : projectId,
|
|
309
|
-
sx: {
|
|
310
|
-
mt: 3
|
|
311
|
-
}
|
|
312
|
-
}), /*#__PURE__*/_jsx(TextField, {
|
|
313
|
-
disabled: loading || readOnly,
|
|
314
|
-
label: `Blocklet ${t('common.description')}`,
|
|
315
|
-
placeholder: `Blocklet ${t('common.description')}`,
|
|
316
|
-
InputProps: {
|
|
317
|
-
'data-cy': 'blocklet-description',
|
|
318
|
-
readOnly
|
|
319
|
-
},
|
|
320
|
-
required: true,
|
|
321
|
-
autoComplete: "off",
|
|
322
|
-
variant: "outlined",
|
|
323
|
-
fullWidth: true,
|
|
324
|
-
value: params.blockletDescription || '',
|
|
325
|
-
onChange: e => {
|
|
326
|
-
setParamsErrTip({
|
|
327
|
-
blockletDescription: ''
|
|
328
|
-
});
|
|
329
|
-
setParams({
|
|
330
|
-
blockletDescription: e.target.value
|
|
331
|
-
});
|
|
332
|
-
},
|
|
333
|
-
error: !!paramsErrTip.blockletDescription,
|
|
334
|
-
helperText: paramsErrTip.blockletDescription || '',
|
|
335
|
-
sx: {
|
|
336
|
-
mt: 3
|
|
337
|
-
}
|
|
338
|
-
})]
|
|
339
|
-
})
|
|
340
360
|
})]
|
|
341
361
|
});
|
|
342
362
|
}
|
|
@@ -6,11 +6,8 @@ import MenuItem from '@mui/material/MenuItem';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import useSetState from 'react-use/lib/useSetState';
|
|
8
8
|
import Confirm from '../../../confirm';
|
|
9
|
-
import { DomainProvider
|
|
10
|
-
import { useNodeContext } from '../../../contexts/node';
|
|
11
|
-
import { sleep } from '../../../util';
|
|
9
|
+
import { DomainProvider } from '../../../contexts/domain';
|
|
12
10
|
import AddDomain from '../add-domain';
|
|
13
|
-
import { parseDomainFromURL } from '../util';
|
|
14
11
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
12
|
function AddDomainAliasComponent({
|
|
16
13
|
id,
|
|
@@ -24,56 +21,17 @@ function AddDomainAliasComponent({
|
|
|
24
21
|
const {
|
|
25
22
|
t
|
|
26
23
|
} = useLocaleContext();
|
|
27
|
-
const {
|
|
28
|
-
api
|
|
29
|
-
} = useNodeContext();
|
|
30
24
|
const [state, setState] = useSetState({
|
|
31
25
|
loading: false,
|
|
32
26
|
confirmSetting: null
|
|
33
27
|
});
|
|
34
28
|
const cnameDomain = systemDomains.find(item => isDidDomain(item));
|
|
35
|
-
const domainContext = useDomainContext();
|
|
36
29
|
const onCancel = () => {
|
|
37
30
|
setState({
|
|
38
31
|
loading: false,
|
|
39
32
|
confirmSetting: null
|
|
40
33
|
});
|
|
41
34
|
};
|
|
42
|
-
const onConfirm = async params => {
|
|
43
|
-
if (state.loading) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
setState({
|
|
47
|
-
loading: true
|
|
48
|
-
});
|
|
49
|
-
try {
|
|
50
|
-
const domain = parseDomainFromURL(params.domain);
|
|
51
|
-
const validateResult = await domainContext.validateDomain(domain, params.type);
|
|
52
|
-
if (!validateResult) {
|
|
53
|
-
// eslint-disable-next-line consistent-return
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
await api.addDomainAlias({
|
|
57
|
-
input: {
|
|
58
|
-
id,
|
|
59
|
-
domainAlias: domain,
|
|
60
|
-
teamDid
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
await sleep(2000);
|
|
64
|
-
setState({
|
|
65
|
-
confirmSetting: null
|
|
66
|
-
});
|
|
67
|
-
} catch (error) {
|
|
68
|
-
domainContext.setError(error.message);
|
|
69
|
-
// eslint-disable-next-line consistent-return
|
|
70
|
-
return false; // 防止 Dialog 关闭
|
|
71
|
-
} finally {
|
|
72
|
-
setState({
|
|
73
|
-
loading: false
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
35
|
const setting = {
|
|
78
36
|
title: title || t('router.domainAlias.add.title'),
|
|
79
37
|
// eslint-disable-next-line react/no-unstable-nested-components
|
|
@@ -108,7 +66,6 @@ function AddDomainAliasComponent({
|
|
|
108
66
|
domain: '',
|
|
109
67
|
__disableConfirm: true
|
|
110
68
|
},
|
|
111
|
-
onConfirm,
|
|
112
69
|
onCancel
|
|
113
70
|
};
|
|
114
71
|
const onMenuItemClick = e => {
|
|
@@ -139,14 +96,13 @@ function AddDomainAliasComponent({
|
|
|
139
96
|
confirm: state.confirmSetting.confirm,
|
|
140
97
|
cancel: state.confirmSetting.cancel,
|
|
141
98
|
params: state.confirmSetting.params,
|
|
142
|
-
onConfirm: state.confirmSetting.onConfirm,
|
|
143
99
|
onCancel: state.confirmSetting.onCancel,
|
|
144
100
|
showConfirm: false,
|
|
145
101
|
showCancel: true,
|
|
146
102
|
displayError: false,
|
|
147
103
|
color: "primary",
|
|
148
104
|
loading: state.loading,
|
|
149
|
-
maxWidth: "
|
|
105
|
+
maxWidth: "sm"
|
|
150
106
|
})]
|
|
151
107
|
});
|
|
152
108
|
}
|
|
@@ -15,15 +15,17 @@ import Typography from '@mui/material/Typography';
|
|
|
15
15
|
import useTheme from '@mui/material/styles/useTheme';
|
|
16
16
|
import noop from 'lodash/noop';
|
|
17
17
|
import trim from 'lodash/trim';
|
|
18
|
+
import pRetry from 'p-retry';
|
|
18
19
|
import PropTypes from 'prop-types';
|
|
19
20
|
import useAsync from 'react-use/lib/useAsync';
|
|
20
21
|
import useSetState from 'react-use/lib/useSetState';
|
|
21
22
|
import { useDomainContext } from '../../contexts/domain';
|
|
22
23
|
import { useNodeContext } from '../../contexts/node';
|
|
23
|
-
import {
|
|
24
|
+
import { validateDomain } from '../../util';
|
|
24
25
|
import { axios } from '../../util/api';
|
|
25
26
|
import DNSTip from './dns-tip';
|
|
26
27
|
import { parseDomainFromURL } from './util';
|
|
28
|
+
import ConfirmDialog from '../../../lib/confirm';
|
|
27
29
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
30
|
export default function AddDomain({
|
|
29
31
|
siteId,
|
|
@@ -34,9 +36,14 @@ export default function AddDomain({
|
|
|
34
36
|
appId,
|
|
35
37
|
appPk,
|
|
36
38
|
onSuccess,
|
|
39
|
+
onError,
|
|
37
40
|
disabled,
|
|
38
41
|
autoFocus,
|
|
39
42
|
inBlockletSetup,
|
|
43
|
+
shouldCheckDomain,
|
|
44
|
+
onStateChange,
|
|
45
|
+
currentIp,
|
|
46
|
+
resolveDomain,
|
|
40
47
|
...props
|
|
41
48
|
}) {
|
|
42
49
|
const {
|
|
@@ -53,7 +60,7 @@ export default function AddDomain({
|
|
|
53
60
|
key: 'sm'
|
|
54
61
|
});
|
|
55
62
|
const [state, setState] = useSetState({
|
|
56
|
-
|
|
63
|
+
submittingDomain: false,
|
|
57
64
|
domain: defaultCustomDomain,
|
|
58
65
|
error: null,
|
|
59
66
|
type: info?.nftDomainUrl ? 'nftDomain' : 'inputDomain',
|
|
@@ -80,6 +87,151 @@ export default function AddDomain({
|
|
|
80
87
|
});
|
|
81
88
|
}
|
|
82
89
|
const nftDomainService = nftDomainURLState.value;
|
|
90
|
+
const resetState = () => {
|
|
91
|
+
setState({
|
|
92
|
+
invalidDNSDomain: null
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
const addDomain = async domain => {
|
|
96
|
+
onStateChange(t('setup.domain.addingDomain'));
|
|
97
|
+
await api.addDomainAlias({
|
|
98
|
+
input: {
|
|
99
|
+
id: siteId,
|
|
100
|
+
domainAlias: domain,
|
|
101
|
+
teamDid,
|
|
102
|
+
inBlockletSetup: true
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
setState({
|
|
106
|
+
submittingDomain: false
|
|
107
|
+
});
|
|
108
|
+
onSuccess({
|
|
109
|
+
domain,
|
|
110
|
+
type: 'inputDomain'
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
const submitDomain = async ({
|
|
114
|
+
domain,
|
|
115
|
+
type,
|
|
116
|
+
nftDid,
|
|
117
|
+
chainHost
|
|
118
|
+
}) => {
|
|
119
|
+
try {
|
|
120
|
+
if (!shouldCheckDomain) {
|
|
121
|
+
if (type === 'inputDomain') {
|
|
122
|
+
await addDomain(domain);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
onSuccess({
|
|
126
|
+
domain,
|
|
127
|
+
type,
|
|
128
|
+
nftDid,
|
|
129
|
+
chainHost
|
|
130
|
+
});
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
onStateChange({
|
|
134
|
+
text: t('setup.domain.checkingResolvable')
|
|
135
|
+
});
|
|
136
|
+
let counter = 30;
|
|
137
|
+
const timeout = 3000;
|
|
138
|
+
const retries = import.meta.env?.PROD || process?.env?.NODE_ENV === 'production' ? counter * 1000 / timeout : 0; // 重试 10 * 3000 = 30s 左右
|
|
139
|
+
|
|
140
|
+
const timer = setInterval(() => {
|
|
141
|
+
if (counter <= 0) {
|
|
142
|
+
clearInterval(timer);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
onStateChange({
|
|
146
|
+
text: `${t('setup.domain.checkingResolvable')} (${counter--}s)`
|
|
147
|
+
});
|
|
148
|
+
}, 1000);
|
|
149
|
+
const address = await pRetry(async () => {
|
|
150
|
+
const {
|
|
151
|
+
data
|
|
152
|
+
} = await resolveDomain(domain);
|
|
153
|
+
if (!data.address) {
|
|
154
|
+
throw new Error('Cannot resolve domain');
|
|
155
|
+
}
|
|
156
|
+
return data.address;
|
|
157
|
+
}, {
|
|
158
|
+
retries,
|
|
159
|
+
minTimeout: timeout,
|
|
160
|
+
maxTimeout: timeout,
|
|
161
|
+
onFailedAttempt: console.error
|
|
162
|
+
}).catch(console.error);
|
|
163
|
+
clearInterval(timer);
|
|
164
|
+
if (!address) {
|
|
165
|
+
const err = t('setup.domain.cannotResolve', {
|
|
166
|
+
domain
|
|
167
|
+
});
|
|
168
|
+
if (type === 'nftDomain') {
|
|
169
|
+
Toast.error(err);
|
|
170
|
+
onSuccess({
|
|
171
|
+
domain,
|
|
172
|
+
type: 'nftDomain'
|
|
173
|
+
});
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
onStateChange({
|
|
177
|
+
text: ''
|
|
178
|
+
});
|
|
179
|
+
setState({
|
|
180
|
+
invalidDNSDomain: {
|
|
181
|
+
domain,
|
|
182
|
+
error: err
|
|
183
|
+
},
|
|
184
|
+
domain,
|
|
185
|
+
type,
|
|
186
|
+
submittingDomain: false
|
|
187
|
+
});
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (address !== currentIp) {
|
|
191
|
+
const err = t('setup.domain.resolvedAddressError', {
|
|
192
|
+
domain,
|
|
193
|
+
curDomain: window.location.hostname
|
|
194
|
+
});
|
|
195
|
+
if (type === 'nftDomain') {
|
|
196
|
+
Toast.error(err);
|
|
197
|
+
onSuccess({
|
|
198
|
+
domain,
|
|
199
|
+
type: 'nftDomain'
|
|
200
|
+
});
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
onStateChange({
|
|
204
|
+
text: ''
|
|
205
|
+
});
|
|
206
|
+
setState({
|
|
207
|
+
invalidDNSDomain: {
|
|
208
|
+
domain,
|
|
209
|
+
error: err
|
|
210
|
+
},
|
|
211
|
+
domain,
|
|
212
|
+
type,
|
|
213
|
+
submittingDomain: false
|
|
214
|
+
});
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
if (type === 'nftDomain') {
|
|
218
|
+
onSuccess({
|
|
219
|
+
domain,
|
|
220
|
+
type: 'nftDomain'
|
|
221
|
+
});
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
await addDomain(domain);
|
|
225
|
+
} catch (err) {
|
|
226
|
+
Toast.error(err.message);
|
|
227
|
+
onStateChange({
|
|
228
|
+
text: ''
|
|
229
|
+
});
|
|
230
|
+
setState({
|
|
231
|
+
submittingDomain: false
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
};
|
|
83
235
|
const handleAuthSuccess = async ({
|
|
84
236
|
domain,
|
|
85
237
|
nftDid,
|
|
@@ -87,6 +239,9 @@ export default function AddDomain({
|
|
|
87
239
|
}) => {
|
|
88
240
|
try {
|
|
89
241
|
const tmpDomain = parseDomainFromURL(domain);
|
|
242
|
+
setState({
|
|
243
|
+
submittingDomain: true
|
|
244
|
+
});
|
|
90
245
|
await api.addDomainAlias({
|
|
91
246
|
input: {
|
|
92
247
|
id: siteId,
|
|
@@ -98,14 +253,14 @@ export default function AddDomain({
|
|
|
98
253
|
inBlockletSetup
|
|
99
254
|
}
|
|
100
255
|
});
|
|
101
|
-
|
|
256
|
+
const type = 'nftDomain';
|
|
102
257
|
setState({
|
|
103
258
|
showNFTDomainAuth: false,
|
|
104
|
-
type
|
|
259
|
+
type
|
|
105
260
|
});
|
|
106
|
-
|
|
261
|
+
await submitDomain({
|
|
107
262
|
domain: tmpDomain,
|
|
108
|
-
type
|
|
263
|
+
type,
|
|
109
264
|
nftDid,
|
|
110
265
|
chainHost
|
|
111
266
|
});
|
|
@@ -113,14 +268,15 @@ export default function AddDomain({
|
|
|
113
268
|
Toast.error(error.message);
|
|
114
269
|
} finally {
|
|
115
270
|
setState({
|
|
116
|
-
showNFTDomainAuth: false
|
|
271
|
+
showNFTDomainAuth: false,
|
|
272
|
+
submittingDomain: false
|
|
117
273
|
});
|
|
118
274
|
}
|
|
119
275
|
};
|
|
120
276
|
const handleAdd = async () => {
|
|
121
277
|
try {
|
|
122
278
|
setState({
|
|
123
|
-
|
|
279
|
+
submittingDomain: true
|
|
124
280
|
});
|
|
125
281
|
const domain = parseDomainFromURL(state.domain);
|
|
126
282
|
if (info.nftDomainUrl && nftDomainService) {
|
|
@@ -136,35 +292,29 @@ export default function AddDomain({
|
|
|
136
292
|
return;
|
|
137
293
|
}
|
|
138
294
|
}
|
|
139
|
-
await
|
|
140
|
-
input: {
|
|
141
|
-
id: siteId,
|
|
142
|
-
domainAlias: domain,
|
|
143
|
-
teamDid
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
await sleep(2000);
|
|
147
|
-
setState({
|
|
148
|
-
loading: false,
|
|
149
|
-
domain: ''
|
|
150
|
-
});
|
|
151
|
-
onSuccess({
|
|
295
|
+
await submitDomain({
|
|
152
296
|
domain,
|
|
153
297
|
type: state.type
|
|
154
298
|
});
|
|
155
299
|
} catch (error) {
|
|
156
|
-
domainContext.setError(error.message);
|
|
157
300
|
setState({
|
|
158
|
-
|
|
301
|
+
submittingDomain: false
|
|
159
302
|
});
|
|
303
|
+
domainContext.setError(error.message);
|
|
160
304
|
}
|
|
161
305
|
};
|
|
162
306
|
const error = domainContext.error || state.error; // TODO: state error 可能不需要了
|
|
163
307
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
308
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
309
|
+
...props,
|
|
310
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
311
|
+
sx: {
|
|
312
|
+
display: 'flex',
|
|
313
|
+
flexDirection: 'column',
|
|
314
|
+
justifyContent: 'flex-start',
|
|
315
|
+
gap: '1em'
|
|
316
|
+
},
|
|
317
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
168
318
|
sx: {
|
|
169
319
|
display: 'flex',
|
|
170
320
|
flexDirection: 'column',
|
|
@@ -172,7 +322,6 @@ export default function AddDomain({
|
|
|
172
322
|
},
|
|
173
323
|
children: [info.nftDomainUrl && nftDomainService && /*#__PURE__*/_jsxs(Box, {
|
|
174
324
|
sx: {
|
|
175
|
-
maxWidth: '640px',
|
|
176
325
|
color: theme.palette.text.primary
|
|
177
326
|
},
|
|
178
327
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
@@ -195,7 +344,8 @@ export default function AddDomain({
|
|
|
195
344
|
})]
|
|
196
345
|
}), /*#__PURE__*/_jsx(TextField, {
|
|
197
346
|
sx: {
|
|
198
|
-
display: 'block'
|
|
347
|
+
display: 'block',
|
|
348
|
+
marginTop: '8px'
|
|
199
349
|
},
|
|
200
350
|
label: t('router.domainAlias.add.domainDescription'),
|
|
201
351
|
helperText: state.type === 'inputDomain' && error || t('router.domainAlias.add.helperText'),
|
|
@@ -242,7 +392,7 @@ export default function AddDomain({
|
|
|
242
392
|
"data-cy": "confirm-add-domain",
|
|
243
393
|
fullWidth: isMobile,
|
|
244
394
|
variant: "contained",
|
|
245
|
-
loading: state.
|
|
395
|
+
loading: state.submittingDomain,
|
|
246
396
|
onClick: handleAdd,
|
|
247
397
|
children: t('common.add')
|
|
248
398
|
})
|
|
@@ -269,40 +419,16 @@ export default function AddDomain({
|
|
|
269
419
|
marginTop: '4px'
|
|
270
420
|
}
|
|
271
421
|
})]
|
|
272
|
-
})
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
});
|
|
283
|
-
return /*#__PURE__*/_jsx(Box, {
|
|
284
|
-
...props,
|
|
285
|
-
children: /*#__PURE__*/_jsxs(Box, {
|
|
286
|
-
sx: {
|
|
287
|
-
display: 'flex',
|
|
288
|
-
flexDirection: 'column',
|
|
289
|
-
justifyContent: 'flex-start',
|
|
290
|
-
gap: '1em'
|
|
291
|
-
},
|
|
292
|
-
children: [inputDomainTypes.map((type, index) => /*#__PURE__*/_jsxs(Box, {
|
|
293
|
-
children: [inputDomainTypes.length > 1 && /*#__PURE__*/_jsx(Box, {
|
|
294
|
-
sx: {
|
|
295
|
-
fontWeight: 700,
|
|
296
|
-
color: theme.palette.text.primary
|
|
297
|
-
},
|
|
298
|
-
children: `${t(`optionsOrder.${index + 1}`)}: ${domainTypes[type]?.name}`
|
|
299
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
300
|
-
sx: {
|
|
301
|
-
marginTop: '8px'
|
|
302
|
-
},
|
|
303
|
-
children: domainTypes[type]?.component
|
|
304
|
-
})]
|
|
305
|
-
}, type)), nftDomainService && /*#__PURE__*/_jsx(Connect, {
|
|
422
|
+
}), state.invalidDNSDomain && /*#__PURE__*/_jsx(ConfirmDialog, {
|
|
423
|
+
title: t('common.reminder'),
|
|
424
|
+
description: t('setup.domain.invalidDNSReminder', {
|
|
425
|
+
error: state.invalidDNSDomain.error
|
|
426
|
+
}),
|
|
427
|
+
color: "primary",
|
|
428
|
+
confirm: t('setup.domain.continueAdd'),
|
|
429
|
+
onConfirm: () => addDomain(state.invalidDNSDomain.domain, state.type),
|
|
430
|
+
onCancel: resetState
|
|
431
|
+
}), nftDomainService && /*#__PURE__*/_jsx(Connect, {
|
|
306
432
|
open: state.showNFTDomainAuth,
|
|
307
433
|
popup: true,
|
|
308
434
|
useSocket: false,
|
|
@@ -319,7 +445,7 @@ export default function AddDomain({
|
|
|
319
445
|
onSuccess: handleAuthSuccess,
|
|
320
446
|
onClose: () => setState({
|
|
321
447
|
showNFTDomainAuth: false,
|
|
322
|
-
|
|
448
|
+
submittingDomain: false
|
|
323
449
|
}),
|
|
324
450
|
checkTimeout: 60 * 5000,
|
|
325
451
|
showDownload: false,
|
|
@@ -335,6 +461,7 @@ export default function AddDomain({
|
|
|
335
461
|
}
|
|
336
462
|
AddDomain.propTypes = {
|
|
337
463
|
siteId: PropTypes.string.isRequired,
|
|
464
|
+
currentIp: PropTypes.string,
|
|
338
465
|
teamDid: PropTypes.string.isRequired,
|
|
339
466
|
cnameDomain: PropTypes.string.isRequired,
|
|
340
467
|
defaultCustomDomain: PropTypes.string,
|
|
@@ -344,15 +471,24 @@ AddDomain.propTypes = {
|
|
|
344
471
|
appPk: PropTypes.string,
|
|
345
472
|
disabled: PropTypes.bool,
|
|
346
473
|
autoFocus: PropTypes.bool,
|
|
347
|
-
inBlockletSetup: PropTypes.bool
|
|
474
|
+
inBlockletSetup: PropTypes.bool,
|
|
475
|
+
shouldCheckDomain: PropTypes.bool,
|
|
476
|
+
onStateChange: PropTypes.func,
|
|
477
|
+
resolveDomain: PropTypes.func,
|
|
478
|
+
onError: PropTypes.func
|
|
348
479
|
};
|
|
349
480
|
AddDomain.defaultProps = {
|
|
350
481
|
defaultCustomDomain: '',
|
|
482
|
+
currentIp: '',
|
|
351
483
|
onInputDomain: noop,
|
|
352
484
|
onSuccess: noop,
|
|
353
485
|
appId: '',
|
|
354
486
|
appPk: '',
|
|
355
487
|
disabled: false,
|
|
356
488
|
autoFocus: true,
|
|
357
|
-
inBlockletSetup: false
|
|
489
|
+
inBlockletSetup: false,
|
|
490
|
+
shouldCheckDomain: false,
|
|
491
|
+
onStateChange: () => {},
|
|
492
|
+
resolveDomain: () => {},
|
|
493
|
+
onError: () => {}
|
|
358
494
|
};
|
package/lib/contexts/domain.js
CHANGED
|
@@ -3,7 +3,6 @@ import trim from 'lodash/trim';
|
|
|
3
3
|
import { createContext, useContext } from 'react';
|
|
4
4
|
import useSetState from 'react-use/lib/useSetState';
|
|
5
5
|
import { validateDomain } from '../util';
|
|
6
|
-
import { useNodeContext } from './node';
|
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
7
|
const DomainContext = /*#__PURE__*/createContext({});
|
|
9
8
|
const {
|
|
@@ -20,12 +19,8 @@ function DomainProvider({
|
|
|
20
19
|
error: null
|
|
21
20
|
});
|
|
22
21
|
const {
|
|
23
|
-
locale
|
|
24
|
-
t
|
|
22
|
+
locale
|
|
25
23
|
} = useLocaleContext();
|
|
26
|
-
const {
|
|
27
|
-
api
|
|
28
|
-
} = useNodeContext();
|
|
29
24
|
const value = {
|
|
30
25
|
error: state.error,
|
|
31
26
|
domain: state.domain,
|
|
@@ -41,22 +36,6 @@ function DomainProvider({
|
|
|
41
36
|
domain: tmpDomain,
|
|
42
37
|
error: errMessage
|
|
43
38
|
});
|
|
44
|
-
},
|
|
45
|
-
validateDomain: async (domain, type) => {
|
|
46
|
-
if (!state.error && type && type !== 'nftDomain') {
|
|
47
|
-
const result = await api.isDidDomain({
|
|
48
|
-
input: {
|
|
49
|
-
domain
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
if (result.value === true) {
|
|
53
|
-
setState({
|
|
54
|
-
error: t('router.domainAlias.add.isDidDomainError')
|
|
55
|
-
});
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return true;
|
|
60
39
|
}
|
|
61
40
|
};
|
|
62
41
|
return /*#__PURE__*/_jsx(Provider, {
|
package/lib/locales/ar.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'الوصف المطلوب للكتلة',
|
|
696
696
|
noNote: 'ملاحظة الإصدار مطلوبة',
|
|
697
697
|
inValidVersion: 'نسخة الوحدة غير صالحة',
|
|
698
|
-
noResource: 'يرجى اختيار المورد المراد ربطه'
|
|
698
|
+
noResource: 'يرجى اختيار المورد المراد ربطه',
|
|
699
|
+
noFirstDid: 'يرجى إنشاء بلوكليت ديد أولاً'
|
|
699
700
|
},
|
|
700
701
|
packTip: 'حالياً ، يمكن تثبيت البلوكليتس مباشرة كتطبيقات. سيتم تضمين المكونات وتكوينات التطبيق تلقائيًا في البلوكليت.',
|
|
701
702
|
resourceChangedWarning: 'لقد قمت بتعديل المورد، يرجى حفظه في الوقت المناسب',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: 'الرجاء تحديد الموارد التي يجب ربطها معالبلوكليت الحالي ، حيث ستتم تثبيت هذه الموارد جنباً إلى جنب مع البلوكليت.',
|
|
738
739
|
blocklets: 'حدد العناصر النمطية لتكون مرتبطة.',
|
|
739
740
|
version: 'ضع رقم إصدار النسخة والملاحظة.',
|
|
740
|
-
introduction: 'يمكن أن يسلط مقدمة واضحة الضوء بشكل فعال على Blocklet الخاص بك. يمكنك استخدام بناء Markdown لكتابته ومعاينته.'
|
|
741
|
+
introduction: 'يمكن أن يسلط مقدمة واضحة الضوء بشكل فعال على Blocklet الخاص بك. يمكنك استخدام بناء Markdown لكتابته ومعاينته.',
|
|
742
|
+
branding: 'صف معلوماتك الأساسية للبلوكليت الخاص بك. ستُعرض هذه المعلومات للمستخدمين في المتجر.'
|
|
741
743
|
},
|
|
742
744
|
branding: 'العلامة التجارية',
|
|
743
745
|
brandingHelp: 'سيتم عرض مزيد من المعلومات حول البلوكلت في المتجر'
|
package/lib/locales/de.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'Blocklet-Beschreibung ist erforderlich',
|
|
696
696
|
noNote: 'Versionshinweis wird benötigt',
|
|
697
697
|
inValidVersion: 'Ungültige Blocklet-Version',
|
|
698
|
-
noResource: 'Bitte wählen Sie die Ressource aus, die zugeordnet werden soll'
|
|
698
|
+
noResource: 'Bitte wählen Sie die Ressource aus, die zugeordnet werden soll',
|
|
699
|
+
noFirstDid: 'Bitte erstellen Sie zuerst eine Blocklet-DID'
|
|
699
700
|
},
|
|
700
701
|
packTip: 'Derzeit können Blocklets direkt als Anwendungen installiert werden. Komponenten und Anwendungskonfigurationen werden automatisch in das Blocklet aufgenommen.',
|
|
701
702
|
resourceChangedWarning: 'Sie haben die Ressource geändert, bitte rechtzeitig speichern',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: 'Bitte wählen Sie die Ressourcen aus, die mit dem aktuellen Blocklet verbunden werden sollen, da diese Ressourcen zusammen mit dem Blocklet installiert werden sollen.',
|
|
738
739
|
blocklets: 'Wählen Sie die zu verknüpfenden Blocklets aus.',
|
|
739
740
|
version: 'Setze die Versionsnummer der Veröffentlichung und die Notiz.',
|
|
740
|
-
introduction: 'Eine klare Einführung kann Ihren Blocklet effektiv hervorheben. Sie können Markdown-Syntax verwenden, um es zu schreiben und eine Vorschau anzuzeigen.'
|
|
741
|
+
introduction: 'Eine klare Einführung kann Ihren Blocklet effektiv hervorheben. Sie können Markdown-Syntax verwenden, um es zu schreiben und eine Vorschau anzuzeigen.',
|
|
742
|
+
branding: 'Beschreiben Sie die grundlegenden Informationen Ihres Blocklets. Diese Informationen werden den Benutzern im Store angezeigt.'
|
|
741
743
|
},
|
|
742
744
|
branding: 'Branding',
|
|
743
745
|
brandingHelp: 'Weitere Informationen über den Blocklet werden im Store angezeigt'
|
package/lib/locales/en.js
CHANGED
|
@@ -723,6 +723,7 @@ export default {
|
|
|
723
723
|
releaseNote: 'Release Note',
|
|
724
724
|
errorTip: {
|
|
725
725
|
noDid: 'Blocklet DID is required',
|
|
726
|
+
noFirstDid: 'Please create Blocklet DID first',
|
|
726
727
|
noTitle: 'Blocklet Title is required',
|
|
727
728
|
noVersion: 'Blocklet Version is required',
|
|
728
729
|
inValidVersion: 'Invalid Blocklet Version',
|
|
@@ -1037,7 +1038,6 @@ export default {
|
|
|
1037
1038
|
}
|
|
1038
1039
|
},
|
|
1039
1040
|
domainAlias: {
|
|
1040
|
-
inputDomain: 'Manually config domain',
|
|
1041
1041
|
nftDomain: 'Automatic config with DID Domain',
|
|
1042
1042
|
showTipHint: 'How do I configure domain name resolution?',
|
|
1043
1043
|
add: {
|
package/lib/locales/es.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'La descripción de Blocklet es requerida',
|
|
696
696
|
noNote: 'Se requiere la Nota de Lanzamiento',
|
|
697
697
|
inValidVersion: 'Versión de Blocklet no válida',
|
|
698
|
-
noResource: 'Por favor, selecciona el recurso a asociar'
|
|
698
|
+
noResource: 'Por favor, selecciona el recurso a asociar',
|
|
699
|
+
noFirstDid: 'Por favor, crea Blocklet DID primero'
|
|
699
700
|
},
|
|
700
701
|
packTip: 'Actualmente, los blocklets se pueden instalar directamente como aplicaciones. Los componentes y las configuraciones de la aplicación se incluirán automáticamente en el Blocklet',
|
|
701
702
|
resourceChangedWarning: 'Ha modificado el recurso, por favor guárdelo a tiempo',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: 'Por favor selecciona los recursos que necesitan ser asociados con el Blocklet actual, ya que estos recursos se instalarán junto con el Blocklet.',
|
|
738
739
|
blocklets: 'Selecciona los blocklets a asociar.',
|
|
739
740
|
version: 'Establezca el número de versión de lanzamiento y la nota.',
|
|
740
|
-
introduction: 'Una introducción clara puede resaltar eficazmente tu Blocklet. Puedes usar la sintaxis de Markdown para escribir y previsualizarlo.'
|
|
741
|
+
introduction: 'Una introducción clara puede resaltar eficazmente tu Blocklet. Puedes usar la sintaxis de Markdown para escribir y previsualizarlo.',
|
|
742
|
+
branding: 'Describe la información básica de tu Blocklet. Esta información se presentará a los usuarios en la tienda.'
|
|
741
743
|
},
|
|
742
744
|
branding: 'Branding',
|
|
743
745
|
brandingHelp: 'Se mostrará más información sobre el blocklet en la tienda'
|
package/lib/locales/fr.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'La description du Blocklet est requise',
|
|
696
696
|
noNote: 'La note de version est requise',
|
|
697
697
|
inValidVersion: 'Version de Blocklet invalide',
|
|
698
|
-
noResource: 'Veuillez sélectionner la ressource à associer'
|
|
698
|
+
noResource: 'Veuillez sélectionner la ressource à associer',
|
|
699
|
+
noFirstDid: "Veuillez créer d'abord un DID de Blocklet"
|
|
699
700
|
},
|
|
700
701
|
packTip: "Actuellement, les bloclets peuvent être installés directement en tant qu'applications. Les composants et les configurations d'application seront automatiquement inclus dans le bloclet.",
|
|
701
702
|
resourceChangedWarning: "Vous avez modifié la ressource, veuillez l'enregistrer à temps",
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: 'Veuillez sélectionner les ressources qui doivent être associées à le Blocklet actuel, car ces ressources seront installées avec le Blocklet.',
|
|
738
739
|
blocklets: 'Sélectionnez les bloclets à associer.',
|
|
739
740
|
version: 'Définissez le numéro de version de la publication et la note.',
|
|
740
|
-
introduction: "Une introduction claire peut mettre en valeur efficacement votre Blocklet. Vous pouvez utiliser la syntaxe Markdown pour l'écrire et le prévisualiser."
|
|
741
|
+
introduction: "Une introduction claire peut mettre en valeur efficacement votre Blocklet. Vous pouvez utiliser la syntaxe Markdown pour l'écrire et le prévisualiser.",
|
|
742
|
+
branding: 'Décrivez les informations de base de votre Blocklet. Ces informations seront présentées aux utilisateurs dans le magasin.'
|
|
741
743
|
},
|
|
742
744
|
branding: 'Branding',
|
|
743
745
|
brandingHelp: "Plus d'informations sur le blocklet seront affichées dans le magasin"
|
package/lib/locales/hi.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'ब्लॉकलेट विवरण आवश्यक है',
|
|
696
696
|
noNote: 'रिलीज़ नोट आवश्यक है',
|
|
697
697
|
inValidVersion: 'अमान्य ब्लॉकलेट संस्करण',
|
|
698
|
-
noResource: 'कृपया उस संसाधन का चयन करें जिससे संबंधित किया जाना है'
|
|
698
|
+
noResource: 'कृपया उस संसाधन का चयन करें जिससे संबंधित किया जाना है',
|
|
699
|
+
noFirstDid: 'कृपया पहले ब्लॉकलेट डीआईडी बनाएं'
|
|
699
700
|
},
|
|
700
701
|
packTip: 'वर्तमान में ब्लॉकलेट सीधे अनुप्रयोग के रूप में स्थापित किए जा सकते हैं। कंपोनेंट और अनुप्रयोग कॉन्फ़िगरेशन स्वचालित रूप से ब्लॉकलेट में शामिल किए जाएंगे।',
|
|
701
702
|
resourceChangedWarning: 'आपने संसाधन को संशोधित किया है, कृपया समय पर इसे सहेजें',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: 'कृपया चुनें कि वर्तमान ब्लॉकलेट के साथ संबद्ध करने वाले संसाधनों का चयन करें, क्योंकि इन संसाधनों को ब्लॉकलेट के साथ स्थापित किया जाएगा।',
|
|
738
739
|
blocklets: 'संबद्ध किए जाने वाले ब्लॉकलेट का चयन करें।',
|
|
739
740
|
version: 'रिलीज़ संस्करण नंबर और नोट सेट करें।',
|
|
740
|
-
introduction: 'एक स्पष्ट परिचय आपके ब्लॉकलेट को प्रभावी रूप से हाइलाइट कर सकता है। आप मार्कडाउन सिंटेक्स का उपयोग करके इसे लिखें और पूर्वावलोकन करें सकते हैं।'
|
|
741
|
+
introduction: 'एक स्पष्ट परिचय आपके ब्लॉकलेट को प्रभावी रूप से हाइलाइट कर सकता है। आप मार्कडाउन सिंटेक्स का उपयोग करके इसे लिखें और पूर्वावलोकन करें सकते हैं।',
|
|
742
|
+
branding: 'अपने ब्लॉकलेट की मूलभूत जानकारी वर्णित करें। यह जानकारी स्टोर में उपयोगकर्ताओं को प्रस्तुत की जाएगी।'
|
|
741
743
|
},
|
|
742
744
|
branding: 'ब्रांडिंग',
|
|
743
745
|
brandingHelp: 'स्टोर में ब्लॉकलेट के बारे में अधिक जानकारी दी जाएगी'
|
package/lib/locales/i18n.db
CHANGED
|
Binary file
|
package/lib/locales/id.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'Deskripsi Blocklet diperlukan',
|
|
696
696
|
noNote: 'Catatan Rilis diperlukan',
|
|
697
697
|
inValidVersion: 'Versi Blok Tidak Valid',
|
|
698
|
-
noResource: 'Silakan pilih sumber daya yang akan dihubungkan'
|
|
698
|
+
noResource: 'Silakan pilih sumber daya yang akan dihubungkan',
|
|
699
|
+
noFirstDid: 'Silakan buat DID Blocklet terlebih dahulu'
|
|
699
700
|
},
|
|
700
701
|
packTip: 'Saat ini, blok dapat diinstal langsung sebagai aplikasi. Komponen dan konfigurasi aplikasi akan secara otomatis disertakan dalam Blocklet.',
|
|
701
702
|
resourceChangedWarning: 'Anda telah mengubah sumber daya, harap simpan tepat waktu',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: 'Silakan pilih sumber daya yang perlu dikaitkan dengan Blocklet saat ini, karena sumber daya ini akan diinstal bersama dengan Blocklet.',
|
|
738
739
|
blocklets: 'Pilih blocklet yang ingin dikaitkan.',
|
|
739
740
|
version: 'Tetapkan nomor versi rilis dan catatan.',
|
|
740
|
-
introduction: 'Pengenalan yang jelas dapat efektif dalam menyoroti Blocklet Anda. Anda dapat menggunakan sintaks Markdown untuk menulis dan melihat pratinjau.'
|
|
741
|
+
introduction: 'Pengenalan yang jelas dapat efektif dalam menyoroti Blocklet Anda. Anda dapat menggunakan sintaks Markdown untuk menulis dan melihat pratinjau.',
|
|
742
|
+
branding: 'Deskripsikan informasi dasar tentang Blocklet Anda. Informasi ini akan ditampilkan kepada pengguna di toko.'
|
|
741
743
|
},
|
|
742
744
|
branding: 'Branding',
|
|
743
745
|
brandingHelp: 'Informasi lebih lanjut tentang blocklet akan ditampilkan di Toko'
|
package/lib/locales/ja.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'Blockletの説明が必要です',
|
|
696
696
|
noNote: 'リリースノートが必要です',
|
|
697
697
|
inValidVersion: '無効な Blocklet バージョン',
|
|
698
|
-
noResource: '関連付けるリソースを選択してください'
|
|
698
|
+
noResource: '関連付けるリソースを選択してください',
|
|
699
|
+
noFirstDid: '最初にBlocklet DIDを作成してください'
|
|
699
700
|
},
|
|
700
701
|
packTip: '現在、Blockletとしてブロックを直接アプリケーションとしてインストールすることができます。コンポーネントとアプリケーションの設定は自動的にBlockletに含まれます',
|
|
701
702
|
resourceChangedWarning: 'リソースを変更しましたので、時間内に保存してください',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: '現在の Blocklet と関連付ける必要があるリソースを選択してください。これらのリソースは、Blocklet と共にインストールされます。',
|
|
738
739
|
blocklets: '関連付けるブロックレットを選択してください。',
|
|
739
740
|
version: 'リリースバージョン番号とノートを設定してください。',
|
|
740
|
-
introduction: '明確な紹介はあなたのBlockletを効果的に強調することができます。Markdownの構文を使用して書き、プレビューすることができます。'
|
|
741
|
+
introduction: '明確な紹介はあなたのBlockletを効果的に強調することができます。Markdownの構文を使用して書き、プレビューすることができます。',
|
|
742
|
+
branding: 'ブロックレットの基本情報を説明してください。この情報はストアのユーザーに表示されます。'
|
|
741
743
|
},
|
|
742
744
|
branding: 'ブランディング',
|
|
743
745
|
brandingHelp: 'ストアにブロックレットの詳細情報が表示されます'
|
package/lib/locales/ko.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'Blocklet 설명이 필요합니다',
|
|
696
696
|
noNote: '릴리즈 노트가 필요합니다',
|
|
697
697
|
inValidVersion: '잘못된 블록릿 버전',
|
|
698
|
-
noResource: '연관된 자원을 선택해주세요'
|
|
698
|
+
noResource: '연관된 자원을 선택해주세요',
|
|
699
|
+
noFirstDid: '먼저 Blocklet DID를 생성하세요'
|
|
699
700
|
},
|
|
700
701
|
packTip: '현재 블록렛은 직접 애플리케이션으로 설치할 수 있습니다. 컴포넌트와 애플리케이션 구성은 자동으로 블록렛에 포함됩니다',
|
|
701
702
|
resourceChangedWarning: '리소스를 수정하였으니 시간 안에 저장하세요',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: '현재 Blocklet과 관련된 리소스를 선택해주세요. 이 리소스들은 Blocklet과 함께 설치될 것입니다.',
|
|
738
739
|
blocklets: '관련된 블록렛을 선택하세요.',
|
|
739
740
|
version: '릴리스 버전 번호와 노트를 설정하세요.',
|
|
740
|
-
introduction: '명확한 소개는 당신의 블록릿을 효과적으로 강조할 수 있습니다. 마크다운 구문을 사용하여 작성하고 미리 보기할 수 있습니다.'
|
|
741
|
+
introduction: '명확한 소개는 당신의 블록릿을 효과적으로 강조할 수 있습니다. 마크다운 구문을 사용하여 작성하고 미리 보기할 수 있습니다.',
|
|
742
|
+
branding: 'Blocklet의 기본 정보를 설명하세요. 이 정보는 상점에 사용자에게 제공됩니다.'
|
|
741
743
|
},
|
|
742
744
|
branding: '브랜딩',
|
|
743
745
|
brandingHelp: '블록릿에 대한 자세한 정보가 스토어에 표시됩니다'
|
package/lib/locales/pt.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'A descrição do Blocklet é obrigatória',
|
|
696
696
|
noNote: 'Nota de lançamento é obrigatória',
|
|
697
697
|
inValidVersion: 'Versão de Bloco Inválida',
|
|
698
|
-
noResource: 'Por favor, selecione o recurso a ser associado'
|
|
698
|
+
noResource: 'Por favor, selecione o recurso a ser associado',
|
|
699
|
+
noFirstDid: 'Por favor, crie um DID do Blocklet primeiro'
|
|
699
700
|
},
|
|
700
701
|
packTip: 'Atualmente, os blocos podem ser instalados diretamente como aplicativos. Componentes e configurações de aplicativos serão automaticamente incluídos no Blocklet.',
|
|
701
702
|
resourceChangedWarning: 'Você modificou o recurso, por favor salve-o a tempo',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: 'Por favor, selecione os recursos que precisam ser associados ao Blocklet atual, pois esses recursos serão instalados juntamente com o Blocklet.',
|
|
738
739
|
blocklets: 'Selecione os blocos a serem associados.',
|
|
739
740
|
version: 'Defina o número da versão de lançamento e a nota.',
|
|
740
|
-
introduction: 'Uma introdução clara pode destacar efetivamente o seu Blocklet. Você pode usar a sintaxe Markdown para escrevê-lo e visualizá-lo.'
|
|
741
|
+
introduction: 'Uma introdução clara pode destacar efetivamente o seu Blocklet. Você pode usar a sintaxe Markdown para escrevê-lo e visualizá-lo.',
|
|
742
|
+
branding: 'Descreva as informações básicas do seu Blocklet. Essas informações serão apresentadas aos usuários na loja.'
|
|
741
743
|
},
|
|
742
744
|
branding: 'Marca',
|
|
743
745
|
brandingHelp: 'Mais informações sobre o blocklet serão exibidas na Loja'
|
package/lib/locales/ru.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'Требуется описание блокировки',
|
|
696
696
|
noNote: 'Требуется версия примечания',
|
|
697
697
|
inValidVersion: 'Неверная версия блоклета',
|
|
698
|
-
noResource: 'Пожалуйста, выберите ресурс для ассоциации'
|
|
698
|
+
noResource: 'Пожалуйста, выберите ресурс для ассоциации',
|
|
699
|
+
noFirstDid: 'Пожалуйста, создайте сначала Blocklet DID'
|
|
699
700
|
},
|
|
700
701
|
packTip: 'В настоящее время блоклеты могут быть установлены непосредственно в качестве приложений. Компоненты и конфигурации приложений будут автоматически включены в блоклет.',
|
|
701
702
|
resourceChangedWarning: 'Вы изменили ресурс, пожалуйста, сохраните его вовремя',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: 'Пожалуйста, выберите ресурсы, которые необходимо связать с текущим блоклетом, поскольку эти ресурсы будут установлены вместе с блоклетом.',
|
|
738
739
|
blocklets: 'Выберите блоклеты, которые будут связаны.',
|
|
739
740
|
version: 'Установите номер версии выпуска и примечание.',
|
|
740
|
-
introduction: 'Четкое введение может эффективно подчеркнуть ваш Blocklet. Можно использовать синтаксис Markdown для написания и предварительного просмотра.'
|
|
741
|
+
introduction: 'Четкое введение может эффективно подчеркнуть ваш Blocklet. Можно использовать синтаксис Markdown для написания и предварительного просмотра.',
|
|
742
|
+
branding: 'Опишите основную информацию о вашем блоклете. Эта информация будет представлена пользователям в магазине.'
|
|
741
743
|
},
|
|
742
744
|
branding: 'Брендинг',
|
|
743
745
|
brandingHelp: 'Больше информации о блоклете будет отображаться в магазине'
|
package/lib/locales/th.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'คำอธิบาย Blocklet จำเป็น',
|
|
696
696
|
noNote: 'ต้องใช้หมายเหตุรุ่น',
|
|
697
697
|
inValidVersion: 'รุ่นบล็อกที่ไม่ถูกต้อง',
|
|
698
|
-
noResource: 'โปรดเลือกทรัพยากรที่จะเชื่อมโยง'
|
|
698
|
+
noResource: 'โปรดเลือกทรัพยากรที่จะเชื่อมโยง',
|
|
699
|
+
noFirstDid: 'โปรดสร้าง Blocklet DID ก่อน'
|
|
699
700
|
},
|
|
700
701
|
packTip: 'ปัจจุบัน บล็อกเล็ตสามารถติดตั้งเป็นแอปพลิเคชันโดยตรงได้ เราจะรวมองค์ประกอบและการกำหนดค่าแอปพลิเคชันโดยอัตโนมัติใน Blocklet',
|
|
701
702
|
resourceChangedWarning: 'คุณได้แก้ไขทรัพยากร โปรดบันทึกเวลาทันที',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: 'โปรดเลือกทรัพยากรที่ต้องการเชื่อมโยงกับ Blocklet ปัจจุบัน เนื่องจากทรัพยากรเหล่านี้จะถูกติดตั้งพร้อมกับ Blocklet.',
|
|
738
739
|
blocklets: 'เลือกบล็อกเล็ตที่ต้องการเชื่อมโยง',
|
|
739
740
|
version: 'ตั้งค่าหมายเลขเวอร์ชันเปิดตัวและบันทึก',
|
|
740
|
-
introduction: 'การแนะนำที่ชัดเจนสามารถเน้นความสำคัญของ Blocklet ของคุณได้อย่างมีประสิทธิภาพ คุณสามารถใช้ไวยากรณ์ Markdown เพื่อเขียนและดูตัวอย่างได้'
|
|
741
|
+
introduction: 'การแนะนำที่ชัดเจนสามารถเน้นความสำคัญของ Blocklet ของคุณได้อย่างมีประสิทธิภาพ คุณสามารถใช้ไวยากรณ์ Markdown เพื่อเขียนและดูตัวอย่างได้',
|
|
742
|
+
branding: 'อธิบายข้อมูลพื้นฐานของ Blocklet ของคุณ ข้อมูลเหล่านี้จะถูกนำเสนอให้ผู้ใช้ในร้านค้า'
|
|
741
743
|
},
|
|
742
744
|
branding: 'การติดตามแบรนด์',
|
|
743
745
|
brandingHelp: 'ข้อมูลเพิ่มเติมเกี่ยวกับ blocklet จะแสดงในร้านค้า'
|
package/lib/locales/vi.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: 'Yêu cầu miêu tả Blocklet',
|
|
696
696
|
noNote: 'Cần có Ghi chú phát hành',
|
|
697
697
|
inValidVersion: 'Phiên bản Blocklet không hợp lệ',
|
|
698
|
-
noResource: 'Vui lòng chọn tài nguyên để liên kết'
|
|
698
|
+
noResource: 'Vui lòng chọn tài nguyên để liên kết',
|
|
699
|
+
noFirstDid: 'Vui lòng tạo Blocklet DID trước'
|
|
699
700
|
},
|
|
700
701
|
packTip: 'Hiện tại, blocklet có thể được cài đặt trực tiếp như các ứng dụng. Các thành phần và cấu hình ứng dụng sẽ được tự động bao gồm trong Blocklet.',
|
|
701
702
|
resourceChangedWarning: 'Bạn đã chỉnh sửa nguồn tài nguyên, vui lòng lưu lại đúng giờ',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: 'Vui lòng chọn các tài nguyên cần được liên kết với Blocklet hiện tại, vì các tài nguyên này sẽ được cài đặt cùng với Blocklet.',
|
|
738
739
|
blocklets: 'Chọn các khối để kết hợp.',
|
|
739
740
|
version: 'Đặt số phiên bản phát hành và ghi chú.',
|
|
740
|
-
introduction: 'Một phần giới thiệu rõ ràng có thể làm nổi bật hiệu quả Blocklet của bạn. Bạn có thể sử dụng cú pháp Markdown để viết và xem trước nó.'
|
|
741
|
+
introduction: 'Một phần giới thiệu rõ ràng có thể làm nổi bật hiệu quả Blocklet của bạn. Bạn có thể sử dụng cú pháp Markdown để viết và xem trước nó.',
|
|
742
|
+
branding: 'Mô tả thông tin cơ bản về Blocklet của bạn. Thông tin này sẽ được trình bày cho người dùng trong cửa hàng.'
|
|
741
743
|
},
|
|
742
744
|
branding: 'Thương hiệu',
|
|
743
745
|
brandingHelp: 'Thông tin chi tiết về blocklet sẽ được hiển thị trên Cửa hàng'
|
package/lib/locales/zh-tw.js
CHANGED
|
@@ -695,7 +695,8 @@ export default {
|
|
|
695
695
|
noDescription: '需要提供 Blocklet 描述',
|
|
696
696
|
noNote: '需要提供發佈說明',
|
|
697
697
|
inValidVersion: '無效的 Blocklet 版本',
|
|
698
|
-
noResource: '請選擇要關聯的資源'
|
|
698
|
+
noResource: '請選擇要關聯的資源',
|
|
699
|
+
noFirstDid: '請先建立Blocklet DID'
|
|
699
700
|
},
|
|
700
701
|
packTip: '目前,blocklet可以直接安裝為應用程序。組件和應用程序配置將自動包含在blocklet中',
|
|
701
702
|
resourceChangedWarning: '您已修改資源,請儘速保存',
|
|
@@ -737,7 +738,8 @@ export default {
|
|
|
737
738
|
resources: '請選擇需要與當前的 Blocklet 關聯的資源,因為這些資源將與 Blocklet 一起安裝。',
|
|
738
739
|
blocklets: '請選擇要關聯的blocklets。',
|
|
739
740
|
version: '設置發佈版本號和備註。',
|
|
740
|
-
introduction: '清晰的介紹可以有效地突出你的Blocklet。你可以使用Markdown語法來編寫和預覽。'
|
|
741
|
+
introduction: '清晰的介紹可以有效地突出你的Blocklet。你可以使用Markdown語法來編寫和預覽。',
|
|
742
|
+
branding: '描述您的 Blocklet 的基本資訊。此資訊將呈現給商店使用者。'
|
|
741
743
|
},
|
|
742
744
|
branding: '品牌行銷',
|
|
743
745
|
brandingHelp: '將在商店中顯示有關區塊的更多信息'
|
package/lib/locales/zh.js
CHANGED
|
@@ -702,6 +702,7 @@ export default {
|
|
|
702
702
|
releaseNote: '发布说明',
|
|
703
703
|
errorTip: {
|
|
704
704
|
noDid: '请填写 Blocklet DID',
|
|
705
|
+
noFirstDid: '请先填写 Blocklet DID',
|
|
705
706
|
noTitle: '请填写 Blocklet 名称',
|
|
706
707
|
noVersion: '请填写 Blocklet 版本号',
|
|
707
708
|
noResource: '请选择需要关联的资源',
|
|
@@ -740,7 +741,8 @@ export default {
|
|
|
740
741
|
resources: '请选择需要与当前的 Blocklet 关联的资源,这些资源将与 Blocklet 一起安装。',
|
|
741
742
|
blocklets: '请选择当前 Blocklet 安装时, 需要关联安装的 Blocklets。',
|
|
742
743
|
version: '设置发布版本号和备注。',
|
|
743
|
-
introduction: '清晰的介绍可以有效地突出你的Blocklet。你可以使用Markdown语法来编写和预览。'
|
|
744
|
+
introduction: '清晰的介绍可以有效地突出你的Blocklet。你可以使用Markdown语法来编写和预览。',
|
|
745
|
+
branding: '描述您的区块链应用的基本信息。此信息将在商店向用户展示。'
|
|
744
746
|
},
|
|
745
747
|
branding: '品牌营销',
|
|
746
748
|
brandingHelp: '将在商店中显示有关区块链的更多信息'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.27-beta-
|
|
3
|
+
"version": "1.16.27-beta-d27e19fa",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@abtnode/auth": "1.16.27-beta-
|
|
30
|
-
"@abtnode/constant": "1.16.27-beta-
|
|
31
|
-
"@abtnode/util": "1.16.27-beta-
|
|
29
|
+
"@abtnode/auth": "1.16.27-beta-d27e19fa",
|
|
30
|
+
"@abtnode/constant": "1.16.27-beta-d27e19fa",
|
|
31
|
+
"@abtnode/util": "1.16.27-beta-d27e19fa",
|
|
32
32
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
33
33
|
"@arcblock/did": "^1.18.123",
|
|
34
34
|
"@arcblock/did-connect": "^2.9.90",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"@arcblock/react-hooks": "^2.9.90",
|
|
39
39
|
"@arcblock/terminal": "^2.9.90",
|
|
40
40
|
"@arcblock/ux": "^2.9.90",
|
|
41
|
-
"@blocklet/constant": "1.16.27-beta-
|
|
41
|
+
"@blocklet/constant": "1.16.27-beta-d27e19fa",
|
|
42
42
|
"@blocklet/launcher-layout": "2.3.21",
|
|
43
43
|
"@blocklet/list": "^0.12.111",
|
|
44
|
-
"@blocklet/meta": "1.16.27-beta-
|
|
44
|
+
"@blocklet/meta": "1.16.27-beta-d27e19fa",
|
|
45
45
|
"@blocklet/ui-react": "^2.9.90",
|
|
46
46
|
"@blocklet/uploader": "^0.1.6",
|
|
47
47
|
"@emotion/react": "^11.10.4",
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"mui-daterange-picker": "^1.0.5",
|
|
76
76
|
"notistack": "^2.0.8",
|
|
77
77
|
"p-all": "^5.0.0",
|
|
78
|
+
"p-retry": "4.6.1",
|
|
78
79
|
"p-wait-for": "^4.1.0",
|
|
79
80
|
"pretty-ms-i18n": "^1.0.3",
|
|
80
81
|
"prop-types": "^15.8.1",
|
|
@@ -108,5 +109,5 @@
|
|
|
108
109
|
"jest": "^29.7.0",
|
|
109
110
|
"jest-environment-jsdom": "^29.7.0"
|
|
110
111
|
},
|
|
111
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "7a83c248c1e5738e6d95e54fc26699f865479dab"
|
|
112
113
|
}
|