@abtnode/ux 1.16.29-beta-1fedbcdd → 1.16.29-beta-a3a3b40e
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/blocklet-owner-info.js +35 -0
- package/lib/blocklet/component/component-info-dialog.js +7 -2
- package/lib/blocklet/install-from-url.js +9 -3
- package/lib/blocklet/publish/create-release/branding.js +13 -10
- package/lib/blocklet/publish/create-release/connect-store-button.js +11 -10
- package/lib/blocklet/publish/create-release/header.js +89 -56
- package/lib/blocklet/publish/create-release/index.js +1 -1
- package/lib/blocklet/publish/create-release/project-setting.js +177 -0
- package/lib/blocklet/publish/hooks/use-want-to-connect-store.js +1 -1
- package/lib/blocklet/publish/utils/get-studio-store-list.js +3 -0
- package/lib/blocklet/publish/utils/parse-resource-relate-components.js +1 -1
- package/lib/locales/ar.js +5 -1
- package/lib/locales/de.js +5 -1
- package/lib/locales/en.js +4 -0
- package/lib/locales/es.js +5 -1
- package/lib/locales/fr.js +5 -1
- package/lib/locales/hi.js +5 -1
- package/lib/locales/i18n.db +0 -0
- package/lib/locales/id.js +5 -1
- package/lib/locales/ja.js +5 -1
- package/lib/locales/ko.js +5 -1
- package/lib/locales/pt.js +5 -1
- package/lib/locales/ru.js +5 -1
- package/lib/locales/th.js +5 -1
- package/lib/locales/vi.js +5 -1
- package/lib/locales/zh-tw.js +5 -1
- package/lib/locales/zh.js +5 -1
- package/lib/util/index.js +0 -14
- package/package.json +16 -16
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Box } from '@mui/material';
|
|
2
|
+
import DID from '@arcblock/ux/lib/DID';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
export default function BlockletOwnerInfo({
|
|
6
|
+
owner,
|
|
7
|
+
locale
|
|
8
|
+
}) {
|
|
9
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
10
|
+
sx: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
gap: 1
|
|
14
|
+
},
|
|
15
|
+
children: [owner.fullName, owner.did ? /*#__PURE__*/_jsx(DID, {
|
|
16
|
+
sx: {
|
|
17
|
+
lineHeight: 'initial',
|
|
18
|
+
'&::before': {
|
|
19
|
+
content: '"("'
|
|
20
|
+
},
|
|
21
|
+
'&::after': {
|
|
22
|
+
content: '")"'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
did: owner.did,
|
|
26
|
+
compact: true,
|
|
27
|
+
size: 14,
|
|
28
|
+
locale: locale
|
|
29
|
+
}) : null]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
BlockletOwnerInfo.propTypes = {
|
|
33
|
+
owner: PropTypes.object.isRequired,
|
|
34
|
+
locale: PropTypes.string.isRequired
|
|
35
|
+
};
|
|
@@ -6,13 +6,15 @@ import { Badge, Box } from '@mui/material';
|
|
|
6
6
|
import InfoRow from '@arcblock/ux/lib/InfoRow';
|
|
7
7
|
import Dialog from '@arcblock/ux/lib/Dialog';
|
|
8
8
|
import { getDisplayName, hasStartEngine } from '@blocklet/meta/lib/util';
|
|
9
|
+
import { formatPerson } from '@blocklet/meta/lib/fix';
|
|
9
10
|
import { useDeletingBlockletContext } from '../../contexts/deleting-blocklets';
|
|
10
11
|
import Tag from '../../tag';
|
|
11
|
-
import {
|
|
12
|
+
import { formatToDatetime } from '../../util';
|
|
12
13
|
import DidAddress from '../../did-address';
|
|
13
14
|
import BlockletSource from '../blocklet-source';
|
|
14
15
|
import BlockletStatus from '../status';
|
|
15
16
|
import BlockletVersion from '../version';
|
|
17
|
+
import BlockletOwnerInfo from './blocklet-owner-info';
|
|
16
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
19
|
const isResource = component => !component?.meta?.group;
|
|
18
20
|
const getEngineRows = (engine, t) => {
|
|
@@ -171,7 +173,10 @@ export default function ComponentInfoDialog({
|
|
|
171
173
|
})
|
|
172
174
|
}, {
|
|
173
175
|
name: t('common.author'),
|
|
174
|
-
value:
|
|
176
|
+
value: componentInfo.meta.owner ? /*#__PURE__*/_jsx(BlockletOwnerInfo, {
|
|
177
|
+
owner: componentInfo.meta.owner,
|
|
178
|
+
locale: locale
|
|
179
|
+
}) : formatPerson(componentInfo.meta.author)
|
|
175
180
|
}, {
|
|
176
181
|
name: t('common.engine'),
|
|
177
182
|
value: getEngineRows(componentInfo.engine, t).map(({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { formatPerson } from '@blocklet/meta/lib/fix';
|
|
3
4
|
import Dialog from '@arcblock/ux/lib/Dialog';
|
|
4
5
|
import Spinner from '@mui/material/CircularProgress';
|
|
5
6
|
import DialogContentText from '@mui/material/DialogContentText';
|
|
@@ -16,9 +17,10 @@ import Alert from '@mui/material/Alert';
|
|
|
16
17
|
import { getDisplayName } from '@blocklet/meta/lib/util';
|
|
17
18
|
import { useNodeContext } from '../contexts/node';
|
|
18
19
|
import { useSessionContext } from '../contexts/session';
|
|
19
|
-
import { formatError
|
|
20
|
+
import { formatError } from '../util';
|
|
20
21
|
import { getWalletType } from './util';
|
|
21
22
|
import DidAddress from '../did-address';
|
|
23
|
+
import BlockletOwnerInfo from './component/blocklet-owner-info';
|
|
22
24
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
25
|
export default function InstallFromUrl({
|
|
24
26
|
defaultUrl,
|
|
@@ -37,7 +39,8 @@ export default function InstallFromUrl({
|
|
|
37
39
|
const [loading, setLoading] = useState(false);
|
|
38
40
|
const [error, setError] = useState('');
|
|
39
41
|
const {
|
|
40
|
-
t
|
|
42
|
+
t,
|
|
43
|
+
locale
|
|
41
44
|
} = useLocaleContext();
|
|
42
45
|
const initMeta = {
|
|
43
46
|
dist: {}
|
|
@@ -134,7 +137,10 @@ export default function InstallFromUrl({
|
|
|
134
137
|
})
|
|
135
138
|
}, {
|
|
136
139
|
name: t('common.author'),
|
|
137
|
-
value:
|
|
140
|
+
value: meta.owner ? /*#__PURE__*/_jsx(BlockletOwnerInfo, {
|
|
141
|
+
owner: meta.owner,
|
|
142
|
+
locale: locale
|
|
143
|
+
}) : formatPerson(meta.author)
|
|
138
144
|
}, {
|
|
139
145
|
name: t('blocklet.dist.downloadLink'),
|
|
140
146
|
value: meta.dist.tarball
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { UNOWNED_DID, WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
|
|
2
|
-
import { Box, InputAdornment, TextField, Typography, Avatar, IconButton } from '@mui/material';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import styled from '@emotion/styled';
|
|
5
2
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
6
3
|
import Toast from '@arcblock/ux/lib/Toast/index';
|
|
7
|
-
import
|
|
8
|
-
import { Suspense, lazy, useRef } from 'react';
|
|
4
|
+
import styled from '@emotion/styled';
|
|
9
5
|
import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
6
|
+
import { Avatar, Box, IconButton, InputAdornment, TextField, Typography } from '@mui/material';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { Suspense, lazy, useRef } from 'react';
|
|
9
|
+
import { useNavigate } from 'react-router-dom';
|
|
10
|
+
import { useNodeContext } from '../../../contexts/node';
|
|
11
|
+
import EmptySpinner from '../../../empty-spinner';
|
|
12
12
|
import usePromiseWindowOpen from '../../../hooks/use-promise-window-open';
|
|
13
13
|
import { formatError } from '../../../util';
|
|
14
|
-
import { useNodeContext } from '../../../contexts/node';
|
|
15
14
|
import useWantToConnectStore from '../hooks/use-want-to-connect-store';
|
|
16
|
-
import
|
|
15
|
+
import { createMessageId, waitGetConnectedByStudio } from '../utils/wait-connect';
|
|
16
|
+
import ConnectStoreButton from './connect-store-button';
|
|
17
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
18
|
const allowedFileExts = ['.webp', '.jpg', '.jpeg', '.png', '.gif', '.svg'];
|
|
19
19
|
const maxFileSize = 1024 * 1024 * 10; // 10 MB
|
|
@@ -72,7 +72,7 @@ function Branding({
|
|
|
72
72
|
Toast.error(t('blocklet.publish.errorTip.noTitle'));
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
if (!wantToConnectStore) {
|
|
75
|
+
if (!wantToConnectStore?.url) {
|
|
76
76
|
Toast.error('No store found');
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
@@ -348,6 +348,9 @@ function Branding({
|
|
|
348
348
|
});
|
|
349
349
|
uploaderScreenshotRef.current.close();
|
|
350
350
|
},
|
|
351
|
+
installerProps: {
|
|
352
|
+
disabled: true
|
|
353
|
+
},
|
|
351
354
|
plugins: ['ImageEditor'],
|
|
352
355
|
apiPathProps: {
|
|
353
356
|
uploader: uploadScreenshotPrefix,
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
2
|
+
import { Icon } from '@iconify/react';
|
|
2
3
|
import AddIcon from '@mui/icons-material/Add';
|
|
3
4
|
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
|
|
4
5
|
import { Box, Button, ButtonGroup, CircularProgress, ClickAwayListener, Divider, Grow, IconButton, MenuItem, MenuList, Paper, Popper, Typography } from '@mui/material';
|
|
5
6
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { Icon } from '@iconify/react';
|
|
7
7
|
import { useRef, useState } from 'react';
|
|
8
|
-
import Toast from '@arcblock/ux/lib/Toast';
|
|
9
8
|
import formatError from '@abtnode/util/lib/format-error';
|
|
10
|
-
import
|
|
11
|
-
import AddStore from '../../../store/add';
|
|
12
|
-
import { useNodeContext } from '../../../contexts/node';
|
|
9
|
+
import Toast from '@arcblock/ux/lib/Toast';
|
|
13
10
|
import ConfirmDialog from '../../../confirm';
|
|
14
11
|
import { useBlockletContext } from '../../../contexts/blocklet';
|
|
12
|
+
import { useNodeContext } from '../../../contexts/node';
|
|
13
|
+
import { useSessionContext } from '../../../contexts/session';
|
|
14
|
+
import AddStore from '../../../store/add';
|
|
15
15
|
import ShortenLabel from '../../component/shorten-label';
|
|
16
16
|
import canDeleteStore from '../utils/can-delete-store';
|
|
17
17
|
import getStudioStoreList from '../utils/get-studio-store-list';
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
19
|
export default function ConnectStoreButton({
|
|
20
20
|
blocklet,
|
|
21
|
-
store,
|
|
21
|
+
store = {},
|
|
22
22
|
onChangeStore,
|
|
23
23
|
onClick,
|
|
24
24
|
disabled,
|
|
@@ -104,7 +104,7 @@ export default function ConnectStoreButton({
|
|
|
104
104
|
sx: {
|
|
105
105
|
mr: 0.5
|
|
106
106
|
}
|
|
107
|
-
}), `${t('common.connect')} ${store
|
|
107
|
+
}), `${t('common.connect')} ${store.name || ''}`]
|
|
108
108
|
}), /*#__PURE__*/_jsx(Button, {
|
|
109
109
|
size: "small",
|
|
110
110
|
"aria-controls": open ? 'split-button-menu' : undefined,
|
|
@@ -139,10 +139,11 @@ export default function ConnectStoreButton({
|
|
|
139
139
|
autoFocusItem: true,
|
|
140
140
|
sx: {
|
|
141
141
|
maxHeight: 300,
|
|
142
|
-
overflowY: 'auto'
|
|
142
|
+
overflowY: 'auto',
|
|
143
|
+
zIndex: 10
|
|
143
144
|
},
|
|
144
|
-
children: [storeList
|
|
145
|
-
selected: option.id === store
|
|
145
|
+
children: [storeList?.map(option => /*#__PURE__*/_jsxs(MenuItem, {
|
|
146
|
+
selected: option.id === store?.id,
|
|
146
147
|
sx: {
|
|
147
148
|
height: 56
|
|
148
149
|
},
|
|
@@ -6,7 +6,7 @@ import { PROJECT } from '@blocklet/constant';
|
|
|
6
6
|
import styled from '@emotion/styled';
|
|
7
7
|
import { Icon } from '@iconify/react';
|
|
8
8
|
import CloudUploadRoundedIcon from '@mui/icons-material/CloudUploadRounded';
|
|
9
|
-
import { Box, Breadcrumbs, Button, IconButton, Dialog as MaterialDialog, Typography, useMediaQuery } from '@mui/material';
|
|
9
|
+
import { Box, Breadcrumbs, Button, ButtonGroup, IconButton, Dialog as MaterialDialog, Typography, useMediaQuery } from '@mui/material';
|
|
10
10
|
import Spinner from '@mui/material/CircularProgress';
|
|
11
11
|
import pick from 'lodash/pick';
|
|
12
12
|
import pAll from 'p-all';
|
|
@@ -24,6 +24,7 @@ import uploadImageToProject from '../utils/upload-image-to-project';
|
|
|
24
24
|
import { validateParams } from '../utils/validate-params';
|
|
25
25
|
import { waitGetConnectedStore } from '../utils/wait-connect';
|
|
26
26
|
import ConnectStoreList from './connect-store-list';
|
|
27
|
+
import ProjectSetting from './project-setting';
|
|
27
28
|
import { uploadResource } from './resource-select';
|
|
28
29
|
import UploadedToast from './uploaded-toast';
|
|
29
30
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -62,6 +63,7 @@ function Header({
|
|
|
62
63
|
} = useNodeContext();
|
|
63
64
|
const navigate = useNavigate();
|
|
64
65
|
const [showStoreDialog, setShowStoreDialog] = useState(false);
|
|
66
|
+
const [showSetting, setShowSetting] = useState(false);
|
|
65
67
|
const [installResourceTip, setInstallResourceTip] = useState();
|
|
66
68
|
const isMobile = useMediaQuery(theme => theme.breakpoints.down('md'));
|
|
67
69
|
const releaseType = params?.blockletComponents?.length > 0 ? 'pack' : 'resource';
|
|
@@ -198,35 +200,37 @@ function Header({
|
|
|
198
200
|
}
|
|
199
201
|
});
|
|
200
202
|
const newReleased = lastProject.project.lastReleaseId;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
203
|
+
if (params.autoUpload) {
|
|
204
|
+
await pAll(lastProject.project.connectedStores.map(store => {
|
|
205
|
+
return async () => {
|
|
206
|
+
try {
|
|
207
|
+
// eslint-disable-next-line no-await-in-loop
|
|
208
|
+
const res = await api.publishToStore({
|
|
209
|
+
input: {
|
|
210
|
+
did: blocklet.meta.did,
|
|
211
|
+
storeId: store.storeId,
|
|
212
|
+
storeName: store.storeName,
|
|
213
|
+
projectId,
|
|
214
|
+
releaseId: newReleased,
|
|
215
|
+
type: releaseType
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
Toast.success( /*#__PURE__*/_jsx(UploadedToast, {
|
|
209
219
|
storeName: store.storeName,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
Toast.error(formatError(err));
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
}), {
|
|
228
|
-
concurrency: 4
|
|
229
|
-
});
|
|
220
|
+
storeUrl: store.storeUrl,
|
|
221
|
+
developerDid: store.developerDid,
|
|
222
|
+
published: res.url === 'published'
|
|
223
|
+
}), {
|
|
224
|
+
duration: 10000
|
|
225
|
+
});
|
|
226
|
+
} catch (err) {
|
|
227
|
+
Toast.error(formatError(err));
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
}), {
|
|
231
|
+
concurrency: 1
|
|
232
|
+
});
|
|
233
|
+
}
|
|
230
234
|
onPublish?.();
|
|
231
235
|
navigate(`../${projectId}/view/${newReleased}`, {
|
|
232
236
|
replace: true
|
|
@@ -242,6 +246,9 @@ function Header({
|
|
|
242
246
|
await waitGetConnectedStore(api, param);
|
|
243
247
|
getData();
|
|
244
248
|
};
|
|
249
|
+
const handleShowSetting = () => {
|
|
250
|
+
setShowSetting(true);
|
|
251
|
+
};
|
|
245
252
|
let installButton = null;
|
|
246
253
|
if (isPublished && serverEndpoint) {
|
|
247
254
|
const blockletMetaUrl = joinURL(serverEndpoint, `/api/project/${blocklet.meta.did}/${projectId}/${releaseId}/release/blocklet.json`);
|
|
@@ -251,6 +258,7 @@ function Header({
|
|
|
251
258
|
url.searchParams.set('blocklet_meta_url', blockletMetaUrl);
|
|
252
259
|
installButton = isMobile ? /*#__PURE__*/_jsx(IconButton, {
|
|
253
260
|
component: "a",
|
|
261
|
+
disabled: loading,
|
|
254
262
|
href: url.href,
|
|
255
263
|
target: "_blank",
|
|
256
264
|
rel: "noreferrer",
|
|
@@ -264,6 +272,7 @@ function Header({
|
|
|
264
272
|
})
|
|
265
273
|
}) : /*#__PURE__*/_jsx(Button, {
|
|
266
274
|
href: url.href,
|
|
275
|
+
disabled: loading,
|
|
267
276
|
target: "_blank",
|
|
268
277
|
rel: "noreferrer",
|
|
269
278
|
variant: "outlined",
|
|
@@ -362,20 +371,27 @@ function Header({
|
|
|
362
371
|
})]
|
|
363
372
|
}), /*#__PURE__*/_jsx(Box, {
|
|
364
373
|
flex: "1"
|
|
365
|
-
}), !isPublished && /*#__PURE__*/_jsxs(
|
|
366
|
-
variant: "contained",
|
|
374
|
+
}), !isPublished && /*#__PURE__*/_jsxs(ButtonGroup, {
|
|
367
375
|
disabled: loading,
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
376
|
+
variant: "contained",
|
|
377
|
+
children: [/*#__PURE__*/_jsxs(Button, {
|
|
378
|
+
variant: "contained",
|
|
379
|
+
onClick: () => onRelease(PROJECT.RELEASE_STATUS.published),
|
|
380
|
+
children: [loading && /*#__PURE__*/_jsx(Spinner, {
|
|
381
|
+
size: 14,
|
|
382
|
+
sx: {
|
|
383
|
+
mr: 0.5
|
|
384
|
+
},
|
|
385
|
+
color: "inherit"
|
|
386
|
+
}), t('blocklet.publish.createRelease')]
|
|
387
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
388
|
+
variant: "contained",
|
|
389
|
+
onClick: handleShowSetting,
|
|
390
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
391
|
+
icon: "mage:settings-fill",
|
|
392
|
+
fontSize: "16px"
|
|
393
|
+
})
|
|
394
|
+
})]
|
|
379
395
|
}), isPublished && /*#__PURE__*/_jsxs(_Fragment, {
|
|
380
396
|
children: [installButton, isMobile ? null : /*#__PURE__*/_jsx(Button, {
|
|
381
397
|
component: "a",
|
|
@@ -386,22 +402,32 @@ function Header({
|
|
|
386
402
|
mr: 1
|
|
387
403
|
},
|
|
388
404
|
children: t('common.download')
|
|
389
|
-
}), /*#__PURE__*/_jsxs(
|
|
405
|
+
}), /*#__PURE__*/_jsxs(ButtonGroup, {
|
|
390
406
|
disabled: loading,
|
|
391
407
|
variant: "contained",
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
408
|
+
children: [/*#__PURE__*/_jsxs(Button, {
|
|
409
|
+
variant: "contained",
|
|
410
|
+
onClick: () => setShowStoreDialog(true),
|
|
411
|
+
children: [loading ? /*#__PURE__*/_jsx(Spinner, {
|
|
412
|
+
size: 14,
|
|
413
|
+
sx: {
|
|
414
|
+
mr: 1
|
|
415
|
+
},
|
|
416
|
+
color: "inherit"
|
|
417
|
+
}) : /*#__PURE__*/_jsx(CloudUploadRoundedIcon, {
|
|
418
|
+
sx: {
|
|
419
|
+
fontSize: '1.3em',
|
|
420
|
+
mr: 1
|
|
421
|
+
}
|
|
422
|
+
}), isMobile ? t('common.upload') : t('blocklet.publish.connectOrUpload')]
|
|
423
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
424
|
+
variant: "contained",
|
|
425
|
+
onClick: handleShowSetting,
|
|
426
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
427
|
+
icon: "mage:settings-fill",
|
|
428
|
+
fontSize: "16px"
|
|
429
|
+
})
|
|
430
|
+
})]
|
|
405
431
|
})]
|
|
406
432
|
})]
|
|
407
433
|
})
|
|
@@ -425,6 +451,13 @@ function Header({
|
|
|
425
451
|
connectedStores: params.connectedStores || [],
|
|
426
452
|
publishedStoreIds: release?.publishedStoreIds
|
|
427
453
|
})
|
|
454
|
+
}), /*#__PURE__*/_jsx(ProjectSetting, {
|
|
455
|
+
did: blocklet?.meta?.did,
|
|
456
|
+
params: params,
|
|
457
|
+
projectId: projectId,
|
|
458
|
+
open: showSetting,
|
|
459
|
+
getData: getData,
|
|
460
|
+
onClose: () => setShowSetting(false)
|
|
428
461
|
})]
|
|
429
462
|
});
|
|
430
463
|
}
|
|
@@ -54,7 +54,7 @@ const addComponentTabs = ({
|
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
56
|
const pickParams = (baseParams, app) => {
|
|
57
|
-
const params = pick(baseParams, ['blockletVersion', 'blockletTitle', 'blockletDescription', 'blockletLogo', 'blockletIntroduction', 'blockletScreenshots', 'connectedStores', 'blockletComponents', 'lastReleaseId', 'uploadedResource', 'note']);
|
|
57
|
+
const params = pick(baseParams, ['blockletVersion', 'blockletTitle', 'blockletDescription', 'blockletLogo', 'blockletIntroduction', 'blockletScreenshots', 'connectedStores', 'blockletComponents', 'lastReleaseId', 'uploadedResource', 'autoUpload', 'possibleSameStore', 'note']);
|
|
58
58
|
if (!params.blockletComponents) {
|
|
59
59
|
params.blockletComponents = (app.children || []).map(x => ({
|
|
60
60
|
did: x.meta.did,
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { UNOWNED_DID } from '@abtnode/constant';
|
|
2
|
+
import Dialog from '@arcblock/ux/lib/Dialog';
|
|
3
|
+
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
4
|
+
import IOSSwitch from '@arcblock/ux/lib/Switch';
|
|
5
|
+
import Toast from '@arcblock/ux/lib/Toast/index';
|
|
6
|
+
import { Icon } from '@iconify/react';
|
|
7
|
+
import { Box, Button, Typography } from '@mui/material';
|
|
8
|
+
import Spinner from '@mui/material/CircularProgress';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import { useEffect, useState } from 'react';
|
|
11
|
+
import { useNodeContext } from '../../../contexts/node';
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
function ProjectSetting({
|
|
14
|
+
did,
|
|
15
|
+
params,
|
|
16
|
+
projectId,
|
|
17
|
+
open,
|
|
18
|
+
onClose,
|
|
19
|
+
getData
|
|
20
|
+
}) {
|
|
21
|
+
const {
|
|
22
|
+
t
|
|
23
|
+
} = useLocaleContext();
|
|
24
|
+
const [loading, setLoading] = useState(false);
|
|
25
|
+
const {
|
|
26
|
+
api
|
|
27
|
+
} = useNodeContext();
|
|
28
|
+
const [autoUpload, setAutoUpload] = useState(false);
|
|
29
|
+
const [possibleSameStore, setPossibleSameStore] = useState(false);
|
|
30
|
+
const handleClose = () => {
|
|
31
|
+
setLoading(false);
|
|
32
|
+
onClose(false);
|
|
33
|
+
};
|
|
34
|
+
const handleSubmit = async () => {
|
|
35
|
+
setLoading(true);
|
|
36
|
+
try {
|
|
37
|
+
await api.updateProject({
|
|
38
|
+
input: {
|
|
39
|
+
did,
|
|
40
|
+
projectId,
|
|
41
|
+
blockletTitle: params.blockletTitle,
|
|
42
|
+
blockletDescription: params.blockletDescription,
|
|
43
|
+
blockletIntroduction: params.blockletIntroduction,
|
|
44
|
+
autoUpload: !!autoUpload,
|
|
45
|
+
possibleSameStore: !!possibleSameStore
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
await getData();
|
|
49
|
+
onClose(false);
|
|
50
|
+
} catch (err) {
|
|
51
|
+
Toast.error(err.message);
|
|
52
|
+
}
|
|
53
|
+
setLoading(false);
|
|
54
|
+
};
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
setAutoUpload(params.autoUpload);
|
|
57
|
+
setPossibleSameStore(params.possibleSameStore);
|
|
58
|
+
}, [params]);
|
|
59
|
+
const hasProject = !!(projectId && projectId !== UNOWNED_DID);
|
|
60
|
+
return /*#__PURE__*/_jsx(Dialog, {
|
|
61
|
+
title: t('blocklet.publish.projectSettings'),
|
|
62
|
+
disableEscapeKeyDown: true,
|
|
63
|
+
disablePortal: false,
|
|
64
|
+
fullWidth: true,
|
|
65
|
+
open: open,
|
|
66
|
+
onClose: handleClose,
|
|
67
|
+
actions: /*#__PURE__*/_jsxs(_Fragment, {
|
|
68
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
69
|
+
onClick: e => {
|
|
70
|
+
e.stopPropagation();
|
|
71
|
+
onClose();
|
|
72
|
+
},
|
|
73
|
+
color: "inherit",
|
|
74
|
+
children: t('common.cancel')
|
|
75
|
+
}), hasProject && /*#__PURE__*/_jsxs(Button, {
|
|
76
|
+
onClick: e => {
|
|
77
|
+
e.stopPropagation();
|
|
78
|
+
handleSubmit();
|
|
79
|
+
},
|
|
80
|
+
color: "primary",
|
|
81
|
+
"data-cy": "install-blocklet-next-step",
|
|
82
|
+
disabled: loading,
|
|
83
|
+
variant: "contained",
|
|
84
|
+
autoFocus: true,
|
|
85
|
+
children: [loading && /*#__PURE__*/_jsx(Spinner, {
|
|
86
|
+
size: 16
|
|
87
|
+
}), t('common.confirm')]
|
|
88
|
+
})]
|
|
89
|
+
}),
|
|
90
|
+
children: !hasProject ? /*#__PURE__*/_jsxs(Box, {
|
|
91
|
+
sx: {
|
|
92
|
+
display: 'flex',
|
|
93
|
+
flexDirection: 'column',
|
|
94
|
+
alignItems: 'center'
|
|
95
|
+
},
|
|
96
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
97
|
+
component: Icon,
|
|
98
|
+
icon: "ph:empty",
|
|
99
|
+
sx: {
|
|
100
|
+
fontSize: 40,
|
|
101
|
+
mb: 3,
|
|
102
|
+
opacity: 0.6
|
|
103
|
+
}
|
|
104
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
105
|
+
variant: "body1",
|
|
106
|
+
sx: {
|
|
107
|
+
flex: 1
|
|
108
|
+
},
|
|
109
|
+
children: t('blocklet.publish.needProjectId')
|
|
110
|
+
})]
|
|
111
|
+
}) : /*#__PURE__*/_jsxs(Box, {
|
|
112
|
+
component: "label",
|
|
113
|
+
sx: {
|
|
114
|
+
display: 'flex',
|
|
115
|
+
flexDirection: 'column',
|
|
116
|
+
gap: 2
|
|
117
|
+
},
|
|
118
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
119
|
+
sx: {
|
|
120
|
+
display: 'flex',
|
|
121
|
+
flexDirection: 'row',
|
|
122
|
+
alignItems: 'center'
|
|
123
|
+
},
|
|
124
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
125
|
+
component: Icon,
|
|
126
|
+
icon: "ph:upload",
|
|
127
|
+
sx: {
|
|
128
|
+
fontSize: 24,
|
|
129
|
+
mr: 2
|
|
130
|
+
}
|
|
131
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
132
|
+
variant: "body1",
|
|
133
|
+
sx: {
|
|
134
|
+
flex: 1
|
|
135
|
+
},
|
|
136
|
+
children: t('blocklet.publish.autoUploadTip')
|
|
137
|
+
}), /*#__PURE__*/_jsx(IOSSwitch, {
|
|
138
|
+
checked: autoUpload,
|
|
139
|
+
onChange: (_, x) => setAutoUpload(x)
|
|
140
|
+
})]
|
|
141
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
142
|
+
component: "label",
|
|
143
|
+
sx: {
|
|
144
|
+
display: 'flex',
|
|
145
|
+
flexDirection: 'row',
|
|
146
|
+
alignItems: 'center'
|
|
147
|
+
},
|
|
148
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
149
|
+
component: Icon,
|
|
150
|
+
icon: "fluent-mdl2:merge-duplicate",
|
|
151
|
+
sx: {
|
|
152
|
+
fontSize: 24,
|
|
153
|
+
mr: 2
|
|
154
|
+
}
|
|
155
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
156
|
+
variant: "body1",
|
|
157
|
+
sx: {
|
|
158
|
+
flex: 1
|
|
159
|
+
},
|
|
160
|
+
children: t('blocklet.publish.possibleSameStoreTip')
|
|
161
|
+
}), /*#__PURE__*/_jsx(IOSSwitch, {
|
|
162
|
+
checked: possibleSameStore,
|
|
163
|
+
onChange: (_, x) => setPossibleSameStore(x)
|
|
164
|
+
})]
|
|
165
|
+
})]
|
|
166
|
+
})
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
ProjectSetting.propTypes = {
|
|
170
|
+
did: PropTypes.string.isRequired,
|
|
171
|
+
params: PropTypes.object.isRequired,
|
|
172
|
+
open: PropTypes.bool.isRequired,
|
|
173
|
+
onClose: PropTypes.func.isRequired,
|
|
174
|
+
getData: PropTypes.func.isRequired,
|
|
175
|
+
projectId: PropTypes.string.isRequired
|
|
176
|
+
};
|
|
177
|
+
export default ProjectSetting;
|
|
@@ -27,7 +27,7 @@ function useWantToConnectStore(blocklet) {
|
|
|
27
27
|
return true;
|
|
28
28
|
});
|
|
29
29
|
}, [blocklet?.settings?.storeList, session?.user?.did]);
|
|
30
|
-
const wantToConnectStore = _wantToConnectStore || baseStore;
|
|
30
|
+
const wantToConnectStore = _wantToConnectStore || baseStore || {};
|
|
31
31
|
return [wantToConnectStore, setWantToConnectStore];
|
|
32
32
|
}
|
|
33
33
|
export default useWantToConnectStore;
|
|
@@ -6,6 +6,9 @@ const getStudioStoreList = ({
|
|
|
6
6
|
}) => {
|
|
7
7
|
const teamDid = fromBlocklet ? blocklet?.meta?.did : nodeInfo?.did;
|
|
8
8
|
let storeList = fromBlocklet ? blocklet?.settings?.storeList || [] : nodeInfo?.blockletRegistryList || [];
|
|
9
|
+
if (!Array.isArray(storeList)) {
|
|
10
|
+
storeList = [];
|
|
11
|
+
}
|
|
9
12
|
storeList = storeList.filter(x => x.protected || !x.scope || x.scope === 'studio' || x.scope === userDid);
|
|
10
13
|
return {
|
|
11
14
|
teamDid,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const parseResourceRelateComponents = (nowBlockletComponents, blocklet, resourceRelateComponents, disabledSelectComponents) => {
|
|
2
|
-
const blockletComponents = [...nowBlockletComponents];
|
|
2
|
+
const blockletComponents = nowBlockletComponents ? [...nowBlockletComponents] : [];
|
|
3
3
|
const componentMaps = (blocklet?.children || []).reduce((acc, curr) => {
|
|
4
4
|
acc[curr.meta.did] = true;
|
|
5
5
|
return acc;
|
package/lib/locales/ar.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: 'هل أنت متأكد أنك تريد إزالة {name} من قائمة متجر الاتصال؟',
|
|
739
739
|
disconnectStoreTip: 'سيتم حذف بلوكليت من المخزن بعد الفصل. هل أنت متأكد من أنك تريد الفصل؟',
|
|
740
740
|
connectOrUpload: 'الاتصال أو التحميل',
|
|
741
|
-
developerInfo: 'معلومات المطور'
|
|
741
|
+
developerInfo: 'معلومات المطور',
|
|
742
|
+
autoUploadTip: 'تحميل البلوكليت تلقائيًا إلى المتجر بعد الإصدار',
|
|
743
|
+
possibleSameStoreTip: 'حاول حل بلوكليتات الاعتماد في نفس متجر البلوكليت قبل كل تحميل إذا كان ذلك ممكنًا',
|
|
744
|
+
needProjectId: 'يرجى إنشاء مشروع أولاً',
|
|
745
|
+
projectSettings: 'إعدادات المشروع'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: 'يجب أن يكون طول العنوان على الأقل 3 أحرف',
|
|
744
748
|
descriptionValidationError: 'يجب أن تكون طول الوصف بين 3 و 160 حرفًا',
|
package/lib/locales/de.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: 'Möchten Sie {name} wirklich aus der Verbindungsliste des Stores entfernen?',
|
|
739
739
|
disconnectStoreTip: 'Das Blocklet wird nach dem Trennen aus dem Store entfernt. Möchten Sie wirklich trennen?',
|
|
740
740
|
connectOrUpload: 'Verbinden oder Hochladen',
|
|
741
|
-
developerInfo: 'Entwicklerinformation'
|
|
741
|
+
developerInfo: 'Entwicklerinformation',
|
|
742
|
+
autoUploadTip: 'Blocklet nach Erstellung automatisch im Store hochladen',
|
|
743
|
+
possibleSameStoreTip: 'Versuchen Sie, Abhängigkeits-Blocklets vor dem Hochladen, wenn möglich, im selben Blocklet-Store aufzulösen',
|
|
744
|
+
needProjectId: 'Bitte erstellen Sie zuerst ein Projekt',
|
|
745
|
+
projectSettings: 'Projekteinstellungen'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: 'Die Länge des Titels muss mindestens 3 Zeichen betragen',
|
|
744
748
|
descriptionValidationError: 'Die Beschreibungslänge muss zwischen 3 und 160 Zeichen liegen',
|
package/lib/locales/en.js
CHANGED
|
@@ -660,6 +660,10 @@ export default {
|
|
|
660
660
|
},
|
|
661
661
|
publish: {
|
|
662
662
|
connectOrUpload: 'Connect or Upload',
|
|
663
|
+
projectSettings: 'Project Settings',
|
|
664
|
+
autoUploadTip: 'Upload release to connected Blocklet Stores automatically after creation',
|
|
665
|
+
possibleSameStoreTip: 'Try resolving dependency blocklets to the same Blocklet Store before each uploading when possible',
|
|
666
|
+
needProjectId: 'Please create a project first',
|
|
663
667
|
developerInfo: 'Developer Information',
|
|
664
668
|
branding: 'Branding',
|
|
665
669
|
brandingHelp: 'More information about the blocklet will be displayed in the Store',
|
package/lib/locales/es.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: '¿Estás seguro de que quieres eliminar a {name} de la lista de la tienda Connect?',
|
|
739
739
|
disconnectStoreTip: 'Después de la desconexión, se eliminará el blocklet de la tienda. ¿Seguro que desea desconectar?',
|
|
740
740
|
connectOrUpload: 'Conectar o Subir',
|
|
741
|
-
developerInfo: 'Información del desarrollador'
|
|
741
|
+
developerInfo: 'Información del desarrollador',
|
|
742
|
+
autoUploadTip: 'Cargar automáticamente el blocklet en la tienda después de la versión de creación',
|
|
743
|
+
possibleSameStoreTip: 'Intenta resolver las dependencias de los blocklets en la misma tienda de blocklets antes de cada carga cuando sea posible',
|
|
744
|
+
needProjectId: 'Por favor, crea un proyecto primero',
|
|
745
|
+
projectSettings: 'Configuraciones del Proyecto'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: 'La longitud del título debe ser de al menos 3 caracteres',
|
|
744
748
|
descriptionValidationError: 'La longitud de la descripción debe estar entre 3 y 160 caracteres',
|
package/lib/locales/fr.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: 'Êtes-vous sûr de vouloir supprimer {name} de la liste du magasin Connect?',
|
|
739
739
|
disconnectStoreTip: 'Le bloclet sera supprimé du store après sa déconnexion. Êtes-vous sûr de vouloir le déconnecter ?',
|
|
740
740
|
connectOrUpload: 'Connecter ou Télécharger',
|
|
741
|
-
developerInfo: 'Informations sur le développeur'
|
|
741
|
+
developerInfo: 'Informations sur le développeur',
|
|
742
|
+
autoUploadTip: 'Uploader automatiquement le blocklet dans le Store après sa création',
|
|
743
|
+
possibleSameStoreTip: 'Essayez de résoudre les blocs de dépendance dans le même magasin de blocs avant chaque téléchargement si possible',
|
|
744
|
+
needProjectId: "Veuillez créer un projet d'abord",
|
|
745
|
+
projectSettings: 'Paramètres du projet'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: "La longueur du titre doit être d'au moins 3 caractères",
|
|
744
748
|
descriptionValidationError: 'La longueur de la description doit être comprise entre 3 et 160 caractères',
|
package/lib/locales/hi.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: 'क्या आप वाकई {name} को कनेक्ट स्टोर से हटाना चाहते हैं?',
|
|
739
739
|
disconnectStoreTip: 'ब्लॉकलेट को डिस्कनेक्ट करने के बाद उसे स्टोर से हटा दिया जाएगा। क्या आप वाकई में उसे डिस्कनेक्ट करना चाहते हैं?',
|
|
740
740
|
connectOrUpload: 'कनेक्ट करें या अपलोड करें',
|
|
741
|
-
developerInfo: 'डेवलपर सूचना'
|
|
741
|
+
developerInfo: 'डेवलपर सूचना',
|
|
742
|
+
autoUploadTip: 'निर्माण रिलीज़ के बाद ब्लॉकलेट को स्टोर पर स्वचालित रूप से अपलोड करें',
|
|
743
|
+
possibleSameStoreTip: 'पोस्ट करने से पहले संभावना होने पर उसी ब्लॉकलेट स्टोर में डिपेंडेंसी ब्लॉकलेट्स को हल करने की कोशिश करें',
|
|
744
|
+
needProjectId: 'कृपया पहले एक परियोजना बनाएं',
|
|
745
|
+
projectSettings: 'परियोजना सेटिंग्स'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: 'शीर्षक की लंबाई कम से कम 3 अक्षर होनी चाहिए',
|
|
744
748
|
descriptionValidationError: 'विवरण की लंबाई 3 और 160 वर्णों के बीच होनी चाहिए',
|
package/lib/locales/i18n.db
CHANGED
|
Binary file
|
package/lib/locales/id.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: 'Apakah Anda yakin ingin menghapus {name} dari daftar Toko Koneksi?',
|
|
739
739
|
disconnectStoreTip: 'Setelah terputus, blocklet akan dihapus dari toko. Apa Anda yakin untuk memutuskan?',
|
|
740
740
|
connectOrUpload: 'Hubungkan atau Unggah',
|
|
741
|
-
developerInfo: 'Informasi Pengembang'
|
|
741
|
+
developerInfo: 'Informasi Pengembang',
|
|
742
|
+
autoUploadTip: 'Mengunggah blocklet ke Store secara otomatis setelah rilis penciptaan',
|
|
743
|
+
possibleSameStoreTip: 'Coba selesaikan blocklet dependensi ke Toko Blocklet yang sama sebelum mengunggah setiap kali memungkinkan',
|
|
744
|
+
needProjectId: 'Silakan membuat proyek terlebih dahulu',
|
|
745
|
+
projectSettings: 'Pengaturan Proyek'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: 'Panjang judul harus setidaknya 3 karakter',
|
|
744
748
|
descriptionValidationError: 'Panjang deskripsi harus antara 3 dan 160 karakter.',
|
package/lib/locales/ja.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: '{name}を接続ストアリストから削除してもよろしいですか?',
|
|
739
739
|
disconnectStoreTip: 'ブロックレットの接続を解除すると、ブロックレットはストアから削除されます。接続を解除してもよろしいですか?',
|
|
740
740
|
connectOrUpload: '接続またはアップロード',
|
|
741
|
-
developerInfo: '開発者情報'
|
|
741
|
+
developerInfo: '開発者情報',
|
|
742
|
+
autoUploadTip: 'リリース後、Blockletを自動的にストアにアップロードします',
|
|
743
|
+
possibleSameStoreTip: '可能な限り、アップロード前に依存ブロックレットを同じ Blocklet ストアに解決してみてください',
|
|
744
|
+
needProjectId: '最初にプロジェクトを作成してください',
|
|
745
|
+
projectSettings: 'プロジェクトの設定'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: 'タイトルの長さは最低3文字以上である必要があります',
|
|
744
748
|
descriptionValidationError: '説明の長さは3から160文字の間でなければなりません',
|
package/lib/locales/ko.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: '{name}을(를) 연결 스토어 목록에서 제거하시겠습니까?',
|
|
739
739
|
disconnectStoreTip: '연결이 끊어지면 Blocklet이 스토어에서 제거됩니다. 연결을 끊으시겠습니까?',
|
|
740
740
|
connectOrUpload: '연결하거나 업로드',
|
|
741
|
-
developerInfo: '개발자 정보'
|
|
741
|
+
developerInfo: '개발자 정보',
|
|
742
|
+
autoUploadTip: '릴리스 후 블록릿을 자동으로 스토어에 업로드합니다',
|
|
743
|
+
possibleSameStoreTip: '가능한 경우 업로드하기 전에 종속성 블록렛을 동일한 블록렛 스토어에 해결하려고 시도하십시오',
|
|
744
|
+
needProjectId: '먼저 프로젝트를 만들어주세요',
|
|
745
|
+
projectSettings: '프로젝트 설정'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: '제목 길이는 최소 3자 이상이어야 합니다',
|
|
744
748
|
descriptionValidationError: '설명 길이는 3에서 160자 사이여야 합니다',
|
package/lib/locales/pt.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: 'Tem certeza de que deseja remover {name} da lista da Loja de Conexão?',
|
|
739
739
|
disconnectStoreTip: 'Após desconectado, o Blocklet será removido da loja. Você tem certeza que deseja desconectar?',
|
|
740
740
|
connectOrUpload: 'Conectar ou Enviar',
|
|
741
|
-
developerInfo: 'Informações do Desenvolvedor'
|
|
741
|
+
developerInfo: 'Informações do Desenvolvedor',
|
|
742
|
+
autoUploadTip: 'Enviar automaticamente o blocklet para a Loja após o lançamento da criação',
|
|
743
|
+
possibleSameStoreTip: 'Tente resolver blocklets de dependência na mesma Loja de Blocklets antes de fazer o upload sempre que possível',
|
|
744
|
+
needProjectId: 'Por favor, crie um projeto primeiro',
|
|
745
|
+
projectSettings: 'Configurações do Projeto'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: 'O comprimento do título deve ter pelo menos 3 caracteres',
|
|
744
748
|
descriptionValidationError: 'O comprimento da descrição deve estar entre 3 e 160 caracteres.',
|
package/lib/locales/ru.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: 'Вы уверены, что хотите удалить {name} из списка магазина Connect?',
|
|
739
739
|
disconnectStoreTip: 'Блоклет будет удален из магазина после отключения. Уверены, что хотите отключить?',
|
|
740
740
|
connectOrUpload: 'Подключиться или Загрузить',
|
|
741
|
-
developerInfo: 'Информация для разработчиков'
|
|
741
|
+
developerInfo: 'Информация для разработчиков',
|
|
742
|
+
autoUploadTip: 'Автоматически загрузить блоклет в магазин после выпуска',
|
|
743
|
+
possibleSameStoreTip: 'Попробуйте разрешить блоклеты зависимостей в том же хранилище блоклетов перед каждой загрузкой, если это возможно',
|
|
744
|
+
needProjectId: 'Пожалуйста, сначала создайте проект',
|
|
745
|
+
projectSettings: 'Настройки проекта'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: 'Длина заголовка должна быть не менее 3 символов',
|
|
744
748
|
descriptionValidationError: 'Длина описания должна быть от 3 до 160 символов',
|
package/lib/locales/th.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: 'คุณแน่ใจหรือว่าต้องการลบ {name} ออกจากรายการร้านค้าเชื่อมต่อหรือไม่?',
|
|
739
739
|
disconnectStoreTip: 'เมื่อยกเลิกการเชื่อมต่อแล้ว Blocklet จะถูกลบออกจากร้าน คุณแน่ใจไหมว่าต้องการยกเลิกการเชื่อมต่อหรือไม่',
|
|
740
740
|
connectOrUpload: 'เชื่อมต่อหรืออัปโหลด',
|
|
741
|
-
developerInfo: 'ข้อมูลนักพัฒนา'
|
|
741
|
+
developerInfo: 'ข้อมูลนักพัฒนา',
|
|
742
|
+
autoUploadTip: 'อัปโหลดบล็อกเล็ตไปยังร้านหลังจากการสร้างเสร็จ',
|
|
743
|
+
possibleSameStoreTip: 'ลองแก้ปัญหาบล็อกเล็ตที่ขึ้นอยู่ในร้านค้าเดียวกันก่อนทุกครั้งที่เป็นไปได้',
|
|
744
|
+
needProjectId: 'โปรดสร้างโปรเจกต์ก่อน',
|
|
745
|
+
projectSettings: 'การตั้งค่าโปรเจค'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: 'ความยาวของชื่อต้องมีอย่างน้อย 3 ตัวอักษร',
|
|
744
748
|
descriptionValidationError: 'ความยาวคำอธิบายต้องอยู่ระหว่าง 3 ถึง 160 ตัวอักษร.',
|
package/lib/locales/vi.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: 'Bạn có chắc chắn muốn xóa {name} khỏi danh sách Cửa hàng Kết nối không?',
|
|
739
739
|
disconnectStoreTip: 'Sau khi ngắt kết nối, Blocklet sẽ bị xóa khỏi cửa hàng. Bạn có chắc chắn muốn ngắt kết nối không?',
|
|
740
740
|
connectOrUpload: 'Kết nối hoặc Tải lên',
|
|
741
|
-
developerInfo: 'Thông tin nhà phát triển'
|
|
741
|
+
developerInfo: 'Thông tin nhà phát triển',
|
|
742
|
+
autoUploadTip: 'Tự động tải lên blocklet lên Cửa hàng sau khi phát hành',
|
|
743
|
+
possibleSameStoreTip: 'Hãy thử giải quyết các blocklet phụ thuộc trong cùng một Cửa hàng Blocklet trước mỗi khi tải lên khi có thể',
|
|
744
|
+
needProjectId: 'Vui lòng tạo dự án trước',
|
|
745
|
+
projectSettings: 'Cài đặt Dự án'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: 'Độ dài tiêu đề phải ít nhất 3 ký tự',
|
|
744
748
|
descriptionValidationError: 'Chiều dài mô tả phải từ 3 đến 160 ký tự.',
|
package/lib/locales/zh-tw.js
CHANGED
|
@@ -738,7 +738,11 @@ export default {
|
|
|
738
738
|
deleteStoreTip: '您確定要將{name}從連接商店列表中移除嗎?',
|
|
739
739
|
disconnectStoreTip: '斷開連線後,blocklet 將從商店中移除。您確定要斷開連線嗎?',
|
|
740
740
|
connectOrUpload: '連接或上傳',
|
|
741
|
-
developerInfo: '開發者資訊'
|
|
741
|
+
developerInfo: '開發者資訊',
|
|
742
|
+
possibleSameStoreTip: '在可能的情況下,請嘗試解析相依 blocklet 到相同的 Blocklet 商店之前每次上傳',
|
|
743
|
+
autoUploadTip: '創建發布後自動將 Blocklet 上傳到商店',
|
|
744
|
+
needProjectId: '請先創建一個專案',
|
|
745
|
+
projectSettings: '專案設定'
|
|
742
746
|
},
|
|
743
747
|
titleValidationError: '標題長度必須至少為3到40個字符',
|
|
744
748
|
descriptionValidationError: '描述長度必須介於3到160個字符之間',
|
package/lib/locales/zh.js
CHANGED
|
@@ -739,7 +739,11 @@ export default {
|
|
|
739
739
|
deleteStoreTip: '您确定要将{name}从连接商店列表中移除吗?',
|
|
740
740
|
disconnectStoreTip: '断开连接后,blocklet 将从商店中移除。您确定要断开连接吗?',
|
|
741
741
|
connectOrUpload: '连接或上传',
|
|
742
|
-
developerInfo: '开发者信息'
|
|
742
|
+
developerInfo: '开发者信息',
|
|
743
|
+
possibleSameStoreTip: '在可能的情况下,请尝试解决依赖关系块到相同的 Blocklet 存储器之前每次上传',
|
|
744
|
+
autoUploadTip: '创建发布后自动将 Blocklet 上传到商店',
|
|
745
|
+
needProjectId: '请先创建一个项目',
|
|
746
|
+
projectSettings: '项目设置'
|
|
743
747
|
},
|
|
744
748
|
titleValidationError: '标题长度必须至少为3到40个字符',
|
|
745
749
|
descriptionValidationError: '描述长度必须在3到160个字符之间'
|
package/lib/util/index.js
CHANGED
|
@@ -226,20 +226,6 @@ export const checkInputByType = (type, value) => {
|
|
|
226
226
|
return false;
|
|
227
227
|
};
|
|
228
228
|
export const formatUrl = url => humanizeUrl(url.split('?').shift());
|
|
229
|
-
export const formatPerson = person => {
|
|
230
|
-
if (!person) {
|
|
231
|
-
return '-';
|
|
232
|
-
}
|
|
233
|
-
if (typeof person === 'string') {
|
|
234
|
-
return person;
|
|
235
|
-
}
|
|
236
|
-
const name = person.name || '';
|
|
237
|
-
const u = person.url || person.web;
|
|
238
|
-
const url = u ? ` (${u})` : '';
|
|
239
|
-
const e = person.email || person.mail;
|
|
240
|
-
const email = e ? ` <${e}>` : '';
|
|
241
|
-
return name + email + url;
|
|
242
|
-
};
|
|
243
229
|
export const shouldCheckDomainStatus = domain => domain &&
|
|
244
230
|
// eslint-disable-line
|
|
245
231
|
![DOMAIN_FOR_IP_SITE, DOMAIN_FOR_IP_SITE_REGEXP, DOMAIN_FOR_DEFAULT_SITE, DOMAIN_FOR_INTERNAL_SITE].includes(domain);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.29-beta-
|
|
3
|
+
"version": "1.16.29-beta-a3a3b40e",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -25,25 +25,25 @@
|
|
|
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-beta-
|
|
29
|
-
"@abtnode/constant": "1.16.29-beta-
|
|
30
|
-
"@abtnode/util": "1.16.29-beta-
|
|
28
|
+
"@abtnode/auth": "1.16.29-beta-a3a3b40e",
|
|
29
|
+
"@abtnode/constant": "1.16.29-beta-a3a3b40e",
|
|
30
|
+
"@abtnode/util": "1.16.29-beta-a3a3b40e",
|
|
31
31
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
32
32
|
"@arcblock/did": "^1.18.126",
|
|
33
|
-
"@arcblock/did-connect": "^2.10.
|
|
33
|
+
"@arcblock/did-connect": "^2.10.8",
|
|
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.29-beta-
|
|
41
|
-
"@blocklet/js-sdk": "1.16.29-beta-
|
|
35
|
+
"@arcblock/icons": "^2.10.8",
|
|
36
|
+
"@arcblock/nft-display": "2.10.8",
|
|
37
|
+
"@arcblock/react-hooks": "^2.10.8",
|
|
38
|
+
"@arcblock/terminal": "^2.10.8",
|
|
39
|
+
"@arcblock/ux": "^2.10.8",
|
|
40
|
+
"@blocklet/constant": "1.16.29-beta-a3a3b40e",
|
|
41
|
+
"@blocklet/js-sdk": "1.16.29-beta-a3a3b40e",
|
|
42
42
|
"@blocklet/launcher-layout": "2.3.33",
|
|
43
43
|
"@blocklet/list": "^0.13.9",
|
|
44
|
-
"@blocklet/meta": "1.16.29-beta-
|
|
45
|
-
"@blocklet/ui-react": "^2.10.
|
|
46
|
-
"@blocklet/uploader": "0.1.
|
|
44
|
+
"@blocklet/meta": "1.16.29-beta-a3a3b40e",
|
|
45
|
+
"@blocklet/ui-react": "^2.10.8",
|
|
46
|
+
"@blocklet/uploader": "0.1.20",
|
|
47
47
|
"@emotion/react": "^11.10.4",
|
|
48
48
|
"@emotion/styled": "^11.10.4",
|
|
49
49
|
"@iconify-icons/logos": "^1.2.36",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"jest": "^29.7.0",
|
|
109
109
|
"jest-environment-jsdom": "^29.7.0"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "283c32d9bc91067b15b673a9c438802a6f916fc2"
|
|
112
112
|
}
|