@abtnode/ux 1.16.26-beta-351de484 → 1.16.26-beta-63f52a83
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/es/blocklet/app-avatar.js +7 -19
- package/es/blocklet/authentication/index.js +1 -3
- package/es/blocklet/authentication/oauth/apple.js +39 -15
- package/es/blocklet/authentication/oauth/auth0.js +18 -12
- package/es/blocklet/authentication/oauth/github.js +10 -9
- package/es/blocklet/authentication/oauth/google.js +10 -9
- package/es/blocklet/component/component-cell.js +201 -359
- package/es/blocklet/component/component-info-dialog.js +257 -0
- package/es/blocklet/component/index.js +14 -12
- package/es/blocklet/component/store-blocklet-list.js +3 -0
- package/es/blocklet/publish/connect-store-list.js +33 -4
- package/es/blocklet/publish/create-release.js +9 -4
- package/es/blocklet/status.js +13 -7
- package/es/locales/ar.js +19 -12
- package/es/locales/de.js +19 -12
- package/es/locales/en.js +18 -11
- package/es/locales/es.js +20 -13
- package/es/locales/fr.js +19 -12
- package/es/locales/hi.js +19 -12
- package/es/locales/i18n.db +0 -0
- package/es/locales/id.js +19 -12
- package/es/locales/ja.js +19 -12
- package/es/locales/ko.js +19 -12
- package/es/locales/pt.js +19 -12
- package/es/locales/ru.js +19 -12
- package/es/locales/th.js +19 -12
- package/es/locales/vi.js +19 -12
- package/es/locales/zh-tw.js +28 -21
- package/es/locales/zh.js +27 -20
- package/lib/blocklet/app-avatar.js +7 -20
- package/lib/blocklet/authentication/index.js +1 -3
- package/lib/blocklet/authentication/oauth/apple.js +51 -28
- package/lib/blocklet/authentication/oauth/auth0.js +18 -16
- package/lib/blocklet/authentication/oauth/github.js +10 -13
- package/lib/blocklet/authentication/oauth/google.js +10 -13
- package/lib/blocklet/component/component-cell.js +209 -370
- package/lib/blocklet/component/component-info-dialog.js +253 -0
- package/lib/blocklet/component/index.js +14 -12
- package/lib/blocklet/component/store-blocklet-list.js +3 -0
- package/lib/blocklet/publish/connect-store-list.js +32 -3
- package/lib/blocklet/publish/create-release.js +9 -4
- package/lib/blocklet/status.js +14 -8
- package/lib/locales/ar.js +19 -12
- package/lib/locales/de.js +19 -12
- package/lib/locales/en.js +18 -11
- package/lib/locales/es.js +20 -13
- package/lib/locales/fr.js +19 -12
- package/lib/locales/hi.js +19 -12
- package/lib/locales/i18n.db +0 -0
- package/lib/locales/id.js +19 -12
- package/lib/locales/ja.js +19 -12
- package/lib/locales/ko.js +19 -12
- package/lib/locales/pt.js +19 -12
- package/lib/locales/ru.js +19 -12
- package/lib/locales/th.js +19 -12
- package/lib/locales/vi.js +19 -12
- package/lib/locales/zh-tw.js +28 -21
- package/lib/locales/zh.js +27 -20
- package/package.json +17 -17
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { LocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
import styled from '@emotion/styled';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import Badge from '@mui/material/Badge';
|
|
6
|
+
import Dialog from '@mui/material/Dialog';
|
|
7
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
8
|
+
import DialogTitle from '@mui/material/DialogTitle';
|
|
9
|
+
import InfoRow from '@arcblock/ux/lib/InfoRow';
|
|
10
|
+
import Box from '@mui/material/Box';
|
|
11
|
+
import { getDisplayName, hasStartEngine } from '@blocklet/meta/lib/util';
|
|
12
|
+
import { useDeletingBlockletContext } from '../../contexts/deleting-blocklets';
|
|
13
|
+
import Tag from '../../tag';
|
|
14
|
+
import { formatPerson, formatToDatetime } from '../../util';
|
|
15
|
+
import DidAddress from '../../did-address';
|
|
16
|
+
import BlockletSource from '../blocklet-source';
|
|
17
|
+
import BlockletStatus from '../status';
|
|
18
|
+
import BlockletVersion from '../version';
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
const isResource = component => !component?.meta?.group;
|
|
21
|
+
const getEngineRows = (engine, t) => {
|
|
22
|
+
if (!engine) {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
return [{
|
|
26
|
+
name: t('common.name'),
|
|
27
|
+
value: engine.displayName
|
|
28
|
+
}, {
|
|
29
|
+
name: t('common.description'),
|
|
30
|
+
value: engine.description
|
|
31
|
+
}, {
|
|
32
|
+
name: t('common.version'),
|
|
33
|
+
value: /*#__PURE__*/_jsx(Tag, {
|
|
34
|
+
children: engine.version
|
|
35
|
+
})
|
|
36
|
+
}];
|
|
37
|
+
};
|
|
38
|
+
const getSourceInfo = blocklet => {
|
|
39
|
+
const {
|
|
40
|
+
source,
|
|
41
|
+
deployedFrom,
|
|
42
|
+
bundleSource
|
|
43
|
+
} = blocklet;
|
|
44
|
+
if (source) {
|
|
45
|
+
return {
|
|
46
|
+
source,
|
|
47
|
+
deployedFrom
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (!bundleSource) {
|
|
51
|
+
return {
|
|
52
|
+
source: 'upload',
|
|
53
|
+
deployedFrom
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (bundleSource.url) {
|
|
57
|
+
return {
|
|
58
|
+
source: 'url',
|
|
59
|
+
deployedFrom: deployedFrom || Array.isArray(bundleSource.url) ? bundleSource.url[0] : bundleSource.url
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
if (bundleSource.store) {
|
|
63
|
+
return {
|
|
64
|
+
source: 'registry',
|
|
65
|
+
deployedFrom: deployedFrom || Array.isArray(bundleSource.store) ? bundleSource.store[0] : bundleSource.store
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
return {};
|
|
69
|
+
};
|
|
70
|
+
const getComponentName = (componentId, app) => {
|
|
71
|
+
const ids = componentId.split('/').slice(1);
|
|
72
|
+
let parent = app;
|
|
73
|
+
let index = 0;
|
|
74
|
+
const names = [];
|
|
75
|
+
while (parent && index < ids.length) {
|
|
76
|
+
// eslint-disable-next-line no-loop-func
|
|
77
|
+
const component = parent.children.find(x => x.meta.did === ids[index]);
|
|
78
|
+
parent = component;
|
|
79
|
+
index++;
|
|
80
|
+
if (component) {
|
|
81
|
+
names.push(component.meta.title);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return names.join(' / ');
|
|
85
|
+
};
|
|
86
|
+
export default function ComponentInfoDialog({
|
|
87
|
+
blocklet,
|
|
88
|
+
depth,
|
|
89
|
+
componentInfo,
|
|
90
|
+
app,
|
|
91
|
+
onClose
|
|
92
|
+
}) {
|
|
93
|
+
const {
|
|
94
|
+
t,
|
|
95
|
+
locale
|
|
96
|
+
} = useContext(LocaleContext);
|
|
97
|
+
const {
|
|
98
|
+
deletingBlocklets: deletingComponents
|
|
99
|
+
} = useDeletingBlockletContext();
|
|
100
|
+
let {
|
|
101
|
+
status
|
|
102
|
+
} = blocklet;
|
|
103
|
+
if (depth === 1 && deletingComponents.includes(blocklet.meta.did)) {
|
|
104
|
+
status = 'deleting';
|
|
105
|
+
}
|
|
106
|
+
const mountPoint = `/${blocklet.mountPoint || '/'}`.replace(/\/+/g, '/');
|
|
107
|
+
const renderRows = rows => rows.map(row => {
|
|
108
|
+
if (row.name === t('common.did') || row.name === t('blocklet.appId')) {
|
|
109
|
+
return /*#__PURE__*/_jsx(InfoRow, {
|
|
110
|
+
valueComponent: "div",
|
|
111
|
+
nameWidth: 120,
|
|
112
|
+
name: row.name,
|
|
113
|
+
nameFormatter: () => row.name,
|
|
114
|
+
children: row.value
|
|
115
|
+
}, row.name);
|
|
116
|
+
}
|
|
117
|
+
return /*#__PURE__*/_jsx(InfoRow, {
|
|
118
|
+
valueComponent: "div",
|
|
119
|
+
nameWidth: 120,
|
|
120
|
+
name: row.name,
|
|
121
|
+
children: row.value
|
|
122
|
+
}, row.name);
|
|
123
|
+
});
|
|
124
|
+
const sourceInfo = componentInfo ? getSourceInfo(componentInfo) : {};
|
|
125
|
+
const componentRows = componentInfo ? [{
|
|
126
|
+
name: t('common.name'),
|
|
127
|
+
value: getDisplayName(componentInfo, true)
|
|
128
|
+
}, {
|
|
129
|
+
name: t('common.version'),
|
|
130
|
+
value: /*#__PURE__*/_jsx(BlockletVersion, {
|
|
131
|
+
blocklet: componentInfo,
|
|
132
|
+
checkUpgrade: false
|
|
133
|
+
})
|
|
134
|
+
}, {
|
|
135
|
+
name: t('common.status'),
|
|
136
|
+
value: /*#__PURE__*/_jsx(BlockletStatus, {
|
|
137
|
+
isResource: isResource(blocklet),
|
|
138
|
+
status: status,
|
|
139
|
+
source: componentInfo.source,
|
|
140
|
+
progress: blocklet.progress
|
|
141
|
+
})
|
|
142
|
+
}, blocklet.status === 'running' ? {
|
|
143
|
+
name: t('blocklet.startedAt'),
|
|
144
|
+
value: formatToDatetime(blocklet.startedAt, locale)
|
|
145
|
+
} : null, blocklet.status !== 'running' ? {
|
|
146
|
+
name: t('blocklet.stoppedAt'),
|
|
147
|
+
value: formatToDatetime(blocklet.stoppedAt, locale)
|
|
148
|
+
} : null, blocklet.installedAt ? {
|
|
149
|
+
name: t('blocklet.installedAt'),
|
|
150
|
+
value: formatToDatetime(blocklet.installedAt, locale)
|
|
151
|
+
} : null, hasStartEngine(blocklet.meta) ? {
|
|
152
|
+
name: t('common.mountPoint'),
|
|
153
|
+
value: mountPoint
|
|
154
|
+
} : null, componentInfo.meta.group ? {
|
|
155
|
+
name: t('common.group'),
|
|
156
|
+
value: /*#__PURE__*/_jsx(Tag, {
|
|
157
|
+
type: "success",
|
|
158
|
+
children: componentInfo.meta.group
|
|
159
|
+
})
|
|
160
|
+
} : null, {
|
|
161
|
+
name: t('blocklet.overview.source'),
|
|
162
|
+
value: /*#__PURE__*/_jsx(BlockletSource, {
|
|
163
|
+
sourceInfo: sourceInfo,
|
|
164
|
+
blocklet: blocklet
|
|
165
|
+
})
|
|
166
|
+
}, {
|
|
167
|
+
name: t('blocklet.overview.deployedFrom'),
|
|
168
|
+
value: sourceInfo.deployedFrom || '-'
|
|
169
|
+
}, {
|
|
170
|
+
name: t('common.did'),
|
|
171
|
+
value: /*#__PURE__*/_jsx(DidAddress, {
|
|
172
|
+
did: componentInfo.meta.did,
|
|
173
|
+
showQrcode: true
|
|
174
|
+
})
|
|
175
|
+
}, {
|
|
176
|
+
name: t('common.author'),
|
|
177
|
+
value: formatPerson(componentInfo.meta.author)
|
|
178
|
+
}, {
|
|
179
|
+
name: t('common.engine'),
|
|
180
|
+
value: getEngineRows(componentInfo.engine, t).map(({
|
|
181
|
+
name,
|
|
182
|
+
value
|
|
183
|
+
}) => /*#__PURE__*/_jsx(InfoRow, {
|
|
184
|
+
style: {
|
|
185
|
+
marginBottom: 4
|
|
186
|
+
},
|
|
187
|
+
nameWidth: 120,
|
|
188
|
+
name: name,
|
|
189
|
+
children: value
|
|
190
|
+
}, name))
|
|
191
|
+
}, blocklet.dependents?.length ? {
|
|
192
|
+
name: t('common.dependents'),
|
|
193
|
+
value: /*#__PURE__*/_jsx(Box, {
|
|
194
|
+
children: blocklet.dependents.map(x => /*#__PURE__*/_jsx(Box, {
|
|
195
|
+
children: `${getComponentName(x.id, app)} ${x.required ? `(${t('common.required')})` : ''}`
|
|
196
|
+
}, x.id))
|
|
197
|
+
})
|
|
198
|
+
} : null, blocklet.meta.resources?.length ? {
|
|
199
|
+
name: t('common.resource'),
|
|
200
|
+
value: blocklet.meta.resources.join(', ')
|
|
201
|
+
} : null].filter(Boolean) : [];
|
|
202
|
+
if (!componentInfo) {
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
return /*#__PURE__*/_jsx(Dialog, {
|
|
206
|
+
open: true,
|
|
207
|
+
fullWidth: true,
|
|
208
|
+
maxWidth: "md",
|
|
209
|
+
onClose: () => {
|
|
210
|
+
onClose(null);
|
|
211
|
+
},
|
|
212
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
213
|
+
paddingY: 1.5,
|
|
214
|
+
children: [/*#__PURE__*/_jsx(DialogTitle, {
|
|
215
|
+
children: t('common.componentBasicInfo')
|
|
216
|
+
}), /*#__PURE__*/_jsx(DialogContent, {
|
|
217
|
+
children: renderRows(componentRows)
|
|
218
|
+
})]
|
|
219
|
+
}, "dialog-wrapper")
|
|
220
|
+
}, "base-info-dialog");
|
|
221
|
+
}
|
|
222
|
+
ComponentInfoDialog.propTypes = {
|
|
223
|
+
blocklet: PropTypes.object.isRequired,
|
|
224
|
+
depth: PropTypes.number,
|
|
225
|
+
app: PropTypes.object,
|
|
226
|
+
componentInfo: PropTypes.object,
|
|
227
|
+
onClose: PropTypes.func.isRequired
|
|
228
|
+
};
|
|
229
|
+
ComponentInfoDialog.defaultProps = {
|
|
230
|
+
depth: 0,
|
|
231
|
+
app: null,
|
|
232
|
+
componentInfo: null
|
|
233
|
+
};
|
|
234
|
+
export const StyledBadge = styled(Badge)`
|
|
235
|
+
.BaseBadge-badge {
|
|
236
|
+
top: ${props => props.top * 8 || 6}px;
|
|
237
|
+
right: ${props => props.right * 8 || 6}px;
|
|
238
|
+
}
|
|
239
|
+
`;
|
|
240
|
+
export const StyledComponentRow = styled(Box)`
|
|
241
|
+
.component-header {
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
align-items: flex-end;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
}
|
|
247
|
+
.component-name {
|
|
248
|
+
color: #222;
|
|
249
|
+
font-size: 16px;
|
|
250
|
+
}
|
|
251
|
+
.component-version {
|
|
252
|
+
color: #999;
|
|
253
|
+
font-size: 12px;
|
|
254
|
+
margin-left: 4px;
|
|
255
|
+
transform: translateY(-1px);
|
|
256
|
+
}
|
|
257
|
+
`;
|
|
@@ -365,18 +365,20 @@ export default function BlockletComponent({
|
|
|
365
365
|
onReload: reloadComponent,
|
|
366
366
|
onRestart: restartComponent,
|
|
367
367
|
getComponentUrl: getComponentUrl
|
|
368
|
-
}, `0-${blocklet.meta.did}`), blocklet.children.map(component =>
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
368
|
+
}, `0-${blocklet.meta.did}`), blocklet.children.map(component => {
|
|
369
|
+
return /*#__PURE__*/_jsx(ComponentCell, {
|
|
370
|
+
depth: 1,
|
|
371
|
+
blocklet: component,
|
|
372
|
+
ancestors: [blocklet],
|
|
373
|
+
app: blocklet,
|
|
374
|
+
onRemove: removeComponent,
|
|
375
|
+
onStart: startComponent,
|
|
376
|
+
onStop: stopComponent,
|
|
377
|
+
onReload: reloadComponent,
|
|
378
|
+
onRestart: restartComponent,
|
|
379
|
+
getComponentUrl: getComponentUrl
|
|
380
|
+
}, `1-${component.meta.did}`);
|
|
381
|
+
})]
|
|
380
382
|
}, `top-blocklet-${blocklet.meta.did}`), blocklet.optionalComponents?.map(component => /*#__PURE__*/_jsx(StyledComponentRow, {
|
|
381
383
|
children: /*#__PURE__*/_jsx(OptionalComponentCell, {
|
|
382
384
|
setInstallComponentMeta: setInstallComponentMeta,
|
|
@@ -154,6 +154,7 @@ export default function BlockletList({
|
|
|
154
154
|
const endpoint = storeUrl;
|
|
155
155
|
useEffect(() => {
|
|
156
156
|
setFilters({
|
|
157
|
+
showResources: true,
|
|
157
158
|
resourceType,
|
|
158
159
|
resourceDid
|
|
159
160
|
});
|
|
@@ -161,6 +162,7 @@ export default function BlockletList({
|
|
|
161
162
|
useEffect(() => {
|
|
162
163
|
setInitialized(true);
|
|
163
164
|
setFilters({
|
|
165
|
+
showResources: true,
|
|
164
166
|
resourceType,
|
|
165
167
|
resourceDid
|
|
166
168
|
});
|
|
@@ -172,6 +174,7 @@ export default function BlockletList({
|
|
|
172
174
|
children: /*#__PURE__*/_jsx("div", {
|
|
173
175
|
...rest,
|
|
174
176
|
children: initialized && /*#__PURE__*/_jsx(InnerList, {
|
|
177
|
+
showResourcesSwitch: true,
|
|
175
178
|
blockletRender: blockletRenderProps => {
|
|
176
179
|
const defaultProps = {
|
|
177
180
|
...blockletRenderProps,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { List, ListItem, ListItemText } from '@mui/material';
|
|
3
|
+
import { Box, List, ListItem, ListItemText } from '@mui/material';
|
|
4
|
+
import Alert from '@arcblock/ux/lib/Alert';
|
|
5
|
+
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
6
|
+
import LaunchIcon from '@mui/icons-material/Launch';
|
|
7
|
+
import { blueGrey } from '@mui/material/colors';
|
|
4
8
|
import AddStore from '../../store/add';
|
|
5
9
|
import StoreItem from '../../store/item';
|
|
6
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -12,8 +16,12 @@ function ConnectStoreList({
|
|
|
12
16
|
releaseType,
|
|
13
17
|
publishedStoreIds,
|
|
14
18
|
onPublish,
|
|
15
|
-
onDelete
|
|
19
|
+
onDelete,
|
|
20
|
+
projectType
|
|
16
21
|
}) {
|
|
22
|
+
const {
|
|
23
|
+
t
|
|
24
|
+
} = useLocaleContext();
|
|
17
25
|
const storeList = blocklet?.settings?.storeList || [];
|
|
18
26
|
const connectedMap = useMemo(() => {
|
|
19
27
|
if (!connectedStores?.length) {
|
|
@@ -43,7 +51,26 @@ function ConnectStoreList({
|
|
|
43
51
|
onDelete: onDelete
|
|
44
52
|
})
|
|
45
53
|
})
|
|
46
|
-
}, x.url)), /*#__PURE__*/_jsx(
|
|
54
|
+
}, x.url)), !!storeList?.length && /*#__PURE__*/_jsx(Alert, {
|
|
55
|
+
type: "info",
|
|
56
|
+
style: {
|
|
57
|
+
width: '100%'
|
|
58
|
+
},
|
|
59
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
60
|
+
color: blueGrey[400],
|
|
61
|
+
component: "a",
|
|
62
|
+
href: projectType === 'pack' ? 'https://www.arcblock.io/docs/blocklet-developer/en/5PXToZve-5IXAN1bc8rkpxAc' : 'https://www.arcblock.io/docs/blocklet-developer/en/hB5VWLfg9VnbWsL1JGLuLUfW',
|
|
63
|
+
target: "_blank",
|
|
64
|
+
display: "flex",
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
rel: "noreferrer",
|
|
67
|
+
children: [projectType === 'pack' ? t('blocklet.publish.whyCantSeeInStore') : t('blocklet.publish.whyCantSeeResourceBlockletInStore'), /*#__PURE__*/_jsx(LaunchIcon, {
|
|
68
|
+
sx: {
|
|
69
|
+
marginLeft: 1
|
|
70
|
+
}
|
|
71
|
+
})]
|
|
72
|
+
})
|
|
73
|
+
}), /*#__PURE__*/_jsx(AddStore, {
|
|
47
74
|
onAdd: handleAddStore,
|
|
48
75
|
teamDid: did,
|
|
49
76
|
storeList: storeList
|
|
@@ -58,9 +85,11 @@ ConnectStoreList.propTypes = {
|
|
|
58
85
|
onPublish: PropTypes.func,
|
|
59
86
|
onDelete: PropTypes.func,
|
|
60
87
|
publishedStoreIds: PropTypes.arrayOf(PropTypes.string),
|
|
61
|
-
connectedStores: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
88
|
+
connectedStores: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
89
|
+
projectType: PropTypes.string
|
|
62
90
|
};
|
|
63
91
|
ConnectStoreList.defaultProps = {
|
|
92
|
+
projectType: '',
|
|
64
93
|
publishedStoreIds: [],
|
|
65
94
|
onPublish: () => {},
|
|
66
95
|
onDelete: () => {}
|
|
@@ -199,7 +199,7 @@ export default function CreateRelease({
|
|
|
199
199
|
const data = res.project || {};
|
|
200
200
|
if (!data.blockletVersion) {
|
|
201
201
|
data.blockletVersion = '1.0.0';
|
|
202
|
-
} else if (semver.valid(data.blockletVersion)) {
|
|
202
|
+
} else if (mode === 'create' && semver.valid(data.blockletVersion)) {
|
|
203
203
|
data.blockletVersion = semver.inc(data.blockletVersion, 'patch');
|
|
204
204
|
}
|
|
205
205
|
const theParams = pickParams(data, blocklet);
|
|
@@ -938,12 +938,17 @@ export default function CreateRelease({
|
|
|
938
938
|
onChange: handleChangeSelectedComponents
|
|
939
939
|
})
|
|
940
940
|
})]
|
|
941
|
-
}),
|
|
941
|
+
}), /*#__PURE__*/_jsx(Alert, {
|
|
942
942
|
type: "info",
|
|
943
943
|
style: {
|
|
944
944
|
width: '100%'
|
|
945
945
|
},
|
|
946
|
-
children:
|
|
946
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
947
|
+
display: "flex",
|
|
948
|
+
alignItems: "center",
|
|
949
|
+
rel: "noreferrer",
|
|
950
|
+
children: projectType === 'pack' ? t('blocklet.publish.packTip') : t('blocklet.publish.resourceTip')
|
|
951
|
+
})
|
|
947
952
|
})]
|
|
948
953
|
}), /*#__PURE__*/_jsx(Dialog, {
|
|
949
954
|
title: t('common.connectToStore'),
|
|
@@ -953,6 +958,7 @@ export default function CreateRelease({
|
|
|
953
958
|
open: showStoreDialog,
|
|
954
959
|
onClose: () => setShowStoreDialog(false),
|
|
955
960
|
children: /*#__PURE__*/_jsx(ConnectStoreList, {
|
|
961
|
+
projectType: projectType,
|
|
956
962
|
blocklet: blocklet,
|
|
957
963
|
releaseType: params.blockletComponents?.length > 0 ? 'pack' : 'resource',
|
|
958
964
|
projectId: projectId,
|
|
@@ -965,7 +971,6 @@ export default function CreateRelease({
|
|
|
965
971
|
})]
|
|
966
972
|
});
|
|
967
973
|
}
|
|
968
|
-
CreateRelease.propTypes = {};
|
|
969
974
|
CreateRelease.defaultProps = {};
|
|
970
975
|
const Main = styled.div`
|
|
971
976
|
.sticky-header {
|
package/es/blocklet/status.js
CHANGED
|
@@ -12,6 +12,7 @@ const colors = {
|
|
|
12
12
|
grey: '#888888'
|
|
13
13
|
};
|
|
14
14
|
export default function BlockletStatus({
|
|
15
|
+
isResource,
|
|
15
16
|
status,
|
|
16
17
|
variant,
|
|
17
18
|
source,
|
|
@@ -37,7 +38,8 @@ export default function BlockletStatus({
|
|
|
37
38
|
upgrading: 'warning',
|
|
38
39
|
restarting: 'warning',
|
|
39
40
|
corrupted: 'error',
|
|
40
|
-
deleting: 'warning'
|
|
41
|
+
deleting: 'warning',
|
|
42
|
+
resource: 'primary'
|
|
41
43
|
};
|
|
42
44
|
const colorMap = {
|
|
43
45
|
added: colors.grey,
|
|
@@ -55,23 +57,25 @@ export default function BlockletStatus({
|
|
|
55
57
|
upgrading: colors.yellow,
|
|
56
58
|
restarting: colors.yellow,
|
|
57
59
|
corrupted: 'error',
|
|
58
|
-
deleting: colors.yellow
|
|
60
|
+
deleting: colors.yellow,
|
|
61
|
+
resource: 'primary'
|
|
59
62
|
};
|
|
60
63
|
const inProgress = isInProgress(status);
|
|
61
|
-
const
|
|
64
|
+
const statusType = isResource && status === 'stopped' ? 'resource' : status;
|
|
65
|
+
const statusTxt = t(`blocklet.status.${statusType}`);
|
|
62
66
|
if (variant === 'dot') {
|
|
63
67
|
return /*#__PURE__*/_jsx(Tooltip, {
|
|
64
68
|
title: t('blocklet.statusTip', {
|
|
65
69
|
status: statusTxt
|
|
66
70
|
}),
|
|
67
71
|
children: /*#__PURE__*/_jsx(Dot, {
|
|
68
|
-
color: colorMap[
|
|
72
|
+
color: colorMap[statusType],
|
|
69
73
|
...rest
|
|
70
74
|
})
|
|
71
75
|
});
|
|
72
76
|
}
|
|
73
77
|
return /*#__PURE__*/_jsxs(Tag, {
|
|
74
|
-
type: map[
|
|
78
|
+
type: map[statusType],
|
|
75
79
|
...rest,
|
|
76
80
|
children: [inProgress && /*#__PURE__*/_jsx(Spinner, {
|
|
77
81
|
size: 12,
|
|
@@ -79,7 +83,7 @@ export default function BlockletStatus({
|
|
|
79
83
|
style: {
|
|
80
84
|
marginRight: 5
|
|
81
85
|
}
|
|
82
|
-
}), statusTxt,
|
|
86
|
+
}), statusTxt, statusType === 'downloading' && progress ? /*#__PURE__*/_jsx("div", {
|
|
83
87
|
style: {
|
|
84
88
|
marginLeft: 5
|
|
85
89
|
},
|
|
@@ -91,9 +95,11 @@ BlockletStatus.propTypes = {
|
|
|
91
95
|
status: PropTypes.string.isRequired,
|
|
92
96
|
variant: PropTypes.oneOf(['dot', 'tag']),
|
|
93
97
|
source: PropTypes.string,
|
|
94
|
-
progress: PropTypes.number
|
|
98
|
+
progress: PropTypes.number,
|
|
99
|
+
isResource: PropTypes.bool
|
|
95
100
|
};
|
|
96
101
|
BlockletStatus.defaultProps = {
|
|
102
|
+
isResource: false,
|
|
97
103
|
variant: 'tag',
|
|
98
104
|
source: '',
|
|
99
105
|
progress: 0
|
package/es/locales/ar.js
CHANGED
|
@@ -549,7 +549,8 @@ export default {
|
|
|
549
549
|
corrupted: 'فاسد',
|
|
550
550
|
purchasing: 'في انتظار الشراء',
|
|
551
551
|
purchased: 'مشترى',
|
|
552
|
-
verifying: 'التحقق من الشراء'
|
|
552
|
+
verifying: 'التحقق من الشراء',
|
|
553
|
+
resource: 'مورد'
|
|
553
554
|
},
|
|
554
555
|
list: {
|
|
555
556
|
download: 'تحميل',
|
|
@@ -712,7 +713,10 @@ export default {
|
|
|
712
713
|
tip2: 'لن تكون قادرًا بعد الآن على نشر إصدارات جديدة للبلوكليت المحذوف ، مما يعني أن البلوكليت لن يتم تحديثه في المتجر بعد الآن.',
|
|
713
714
|
tip3: 'سيؤدي حذف البلوكليت إلى ضرورة نشر الإصدار الحالي منه في المتجر.',
|
|
714
715
|
description: 'بعد حذف البلوكليت، ستواجه المشكلات التالية، هل أنت متأكد أنك تريد حذفه؟'
|
|
715
|
-
}
|
|
716
|
+
},
|
|
717
|
+
resourceTip: 'حاليًا ، كما هو الحال بوصفه كتلة مورد ، لا يمكن تثبيته مباشرة من المتجر.',
|
|
718
|
+
whyCantSeeInStore: 'لماذا لا أستطيع رؤية هذا البلوكليت في المتجر؟',
|
|
719
|
+
whyCantSeeResourceBlockletInStore: 'لماذا لا يمكنني رؤية بلوكليت الموارد هذا في المتجر؟'
|
|
716
720
|
},
|
|
717
721
|
titleValidationError: 'يجب أن يكون طول العنوان على الأقل 3 أحرف',
|
|
718
722
|
descriptionValidationError: 'يجب أن تكون طول الوصف بين 3 و 160 حرفًا'
|
|
@@ -1688,8 +1692,9 @@ export default {
|
|
|
1688
1692
|
domain: 'مجال',
|
|
1689
1693
|
domainDescription: 'مطلوب نطاق Auth0',
|
|
1690
1694
|
clientId: 'معرف العميل',
|
|
1691
|
-
|
|
1692
|
-
clientSecret: 'سر العميل'
|
|
1695
|
+
clientIdDescription: 'مطلوب معرف عميل Auth0',
|
|
1696
|
+
clientSecret: 'سر العميل',
|
|
1697
|
+
clientSecretDescription: 'مطلوب سر العميل لتطبيق المصادقة OAuth الخاص بـ Auth0'
|
|
1693
1698
|
},
|
|
1694
1699
|
comingSoon: 'تحت الإنشاء طرق تسجيل الدخول الأخرى.',
|
|
1695
1700
|
moreLogin: 'تسجيل الدخول المزيد',
|
|
@@ -1698,27 +1703,29 @@ export default {
|
|
|
1698
1703
|
github: {
|
|
1699
1704
|
enable: 'تمكين تسجيل الدخول على Github',
|
|
1700
1705
|
clientId: 'معرف العميل',
|
|
1701
|
-
|
|
1706
|
+
clientIdDescription: 'مطلوب معرف عميل (clientId) لتطبيق Github OAuth',
|
|
1702
1707
|
clientSecret: 'سر العميل',
|
|
1703
|
-
|
|
1708
|
+
clientSecretDescription: 'مطلوب clientSecret لتطبيق Github OAuth'
|
|
1704
1709
|
},
|
|
1705
1710
|
google: {
|
|
1706
1711
|
enable: 'تفعيل تسجيل الدخول في جوجل',
|
|
1707
1712
|
clientId: 'معرف العميل',
|
|
1708
|
-
|
|
1713
|
+
clientIdDescription: 'مطلوب معرف تطبيق Google OAuth',
|
|
1709
1714
|
clientSecret: 'سر العميل',
|
|
1710
|
-
|
|
1715
|
+
clientSecretDescription: 'مطلوب clientSecret لتطبيق Google OAuth'
|
|
1711
1716
|
},
|
|
1712
1717
|
apple: {
|
|
1713
1718
|
enable: 'تفعيل تسجيل الدخول الخاص بـ آبل',
|
|
1714
1719
|
teamId: 'رقم فريق',
|
|
1715
|
-
|
|
1720
|
+
teamIdDescription: 'مطلوب معرف فريق لتطبيق Apple OAuth',
|
|
1716
1721
|
serviceId: 'رقم الخدمة',
|
|
1717
|
-
|
|
1722
|
+
serviceIdDescription: 'مطلوب معرف خدمة لتطبيق Apple OAuth',
|
|
1718
1723
|
keyId: 'مفتاح ID',
|
|
1719
|
-
|
|
1724
|
+
keyIdDescription: 'مطلوب مفتاح تطبيق OAuth لأبل',
|
|
1720
1725
|
authKey: 'مفتاح Auth',
|
|
1721
|
-
|
|
1726
|
+
authKeyDescription: 'مفتاح المصادقة لتطبيق Apple OAuth مطلوب',
|
|
1727
|
+
bundleId: 'معرف الحزمة',
|
|
1728
|
+
bundleIdDescription: 'معرّف حزمة تطبيق Apple OAuth مطلوب'
|
|
1722
1729
|
},
|
|
1723
1730
|
oauth: 'تسجيل الدخول من طرف ثالث'
|
|
1724
1731
|
},
|
package/es/locales/de.js
CHANGED
|
@@ -549,7 +549,8 @@ export default {
|
|
|
549
549
|
corrupted: 'Korrupt',
|
|
550
550
|
purchasing: 'Warten auf den Kauf',
|
|
551
551
|
purchased: 'Gekauft',
|
|
552
|
-
verifying: 'Kauf überprüfen'
|
|
552
|
+
verifying: 'Kauf überprüfen',
|
|
553
|
+
resource: 'Ressource'
|
|
553
554
|
},
|
|
554
555
|
list: {
|
|
555
556
|
download: 'Herunterladen',
|
|
@@ -712,7 +713,10 @@ export default {
|
|
|
712
713
|
tip2: 'Sie können keine neuen Versionen mehr für den gelöschten Blocklet veröffentlichen, was bedeutet, dass das Blocklet nicht mehr im Store aktualisiert wird.',
|
|
713
714
|
tip3: 'Das Löschen des Blocklets hat keine Auswirkungen auf seine derzeit veröffentlichte Version im Store.',
|
|
714
715
|
description: 'Nach dem Löschen der Blocklet werden Sie auf die folgenden Probleme stoßen. Sind Sie sicher, dass Sie es löschen möchten?'
|
|
715
|
-
}
|
|
716
|
+
},
|
|
717
|
+
resourceTip: 'Zurzeit kann es als Ressourcen-Blocklet nicht direkt aus dem Store installiert werden.',
|
|
718
|
+
whyCantSeeInStore: 'Warum kann ich dieses Blocklet nicht im Store sehen?',
|
|
719
|
+
whyCantSeeResourceBlockletInStore: 'Warum kann ich diesen Ressourcen-Blocklet nicht im Store sehen?'
|
|
716
720
|
},
|
|
717
721
|
titleValidationError: 'Die Länge des Titels muss mindestens 3 Zeichen betragen',
|
|
718
722
|
descriptionValidationError: 'Die Beschreibungslänge muss zwischen 3 und 160 Zeichen liegen'
|
|
@@ -1688,8 +1692,9 @@ export default {
|
|
|
1688
1692
|
domain: 'Domain',
|
|
1689
1693
|
domainDescription: 'Die Domäne von Auth0 ist erforderlich',
|
|
1690
1694
|
clientId: 'Kunden-ID',
|
|
1691
|
-
|
|
1692
|
-
clientSecret: 'Geheimclient'
|
|
1695
|
+
clientIdDescription: 'Die clientId von Auth0 ist erforderlich',
|
|
1696
|
+
clientSecret: 'Geheimclient',
|
|
1697
|
+
clientSecretDescription: 'Auth0-OAuth-Anwendung Der geheime Clientschlüssel ist erforderlich'
|
|
1693
1698
|
},
|
|
1694
1699
|
comingSoon: 'Es werden weitere Anmeldeverfahren entwickelt.',
|
|
1695
1700
|
moreLogin: 'Mehr Anmeldung',
|
|
@@ -1698,27 +1703,29 @@ export default {
|
|
|
1698
1703
|
github: {
|
|
1699
1704
|
enable: 'Aktiviere Github-Anmeldung',
|
|
1700
1705
|
clientId: 'Client ID',
|
|
1701
|
-
|
|
1706
|
+
clientIdDescription: 'Für die Github OAuth-Anwendung ist eine clientId erforderlich',
|
|
1702
1707
|
clientSecret: 'Client Secret',
|
|
1703
|
-
|
|
1708
|
+
clientSecretDescription: 'Für die Github OAuth-Anwendung ist ein clientSecret erforderlich'
|
|
1704
1709
|
},
|
|
1705
1710
|
google: {
|
|
1706
1711
|
enable: 'Google-Anmeldung aktivieren',
|
|
1707
1712
|
clientId: 'Client ID',
|
|
1708
|
-
|
|
1713
|
+
clientIdDescription: 'Für die Google OAuth-Anwendung ist die Client-ID erforderlich',
|
|
1709
1714
|
clientSecret: 'Geheimnis des Kunden',
|
|
1710
|
-
|
|
1715
|
+
clientSecretDescription: 'Für die Google OAuth-Anwendung ist ein clientSecret erforderlich'
|
|
1711
1716
|
},
|
|
1712
1717
|
apple: {
|
|
1713
1718
|
enable: 'Anmeldung mit Apple aktivieren',
|
|
1714
1719
|
teamId: 'Team-ID',
|
|
1715
|
-
|
|
1720
|
+
teamIdDescription: 'Für die Apple OAuth-Anwendung ist eine Team-ID erforderlich',
|
|
1716
1721
|
serviceId: 'Service-ID',
|
|
1717
|
-
|
|
1722
|
+
serviceIdDescription: 'Für die Apple OAuth-Anwendung ist eine Dienst-ID erforderlich',
|
|
1718
1723
|
keyId: 'Schlüssel-ID',
|
|
1719
|
-
|
|
1724
|
+
keyIdDescription: 'Für Apple OAuth ist eine Anwendungsschlüssel-ID erforderlich',
|
|
1720
1725
|
authKey: 'Auth Schlüssel',
|
|
1721
|
-
|
|
1726
|
+
authKeyDescription: 'Authentifizierungsschlüssel für Apple OAuth-Anwendung erforderlich',
|
|
1727
|
+
bundleId: 'Bundle-ID',
|
|
1728
|
+
bundleIdDescription: 'Die Apple OAuth Anwendungs-Bundle-ID ist erforderlich'
|
|
1722
1729
|
},
|
|
1723
1730
|
oauth: 'Drittanbieter-Anmeldung'
|
|
1724
1731
|
},
|