@abtnode/ux 1.16.28-beta-b30865b3 → 1.16.28-next-5a717317
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/actions.js +6 -8
- package/lib/analytics/traffic.js +10 -4
- package/lib/blocklet/authentication/federated/federated-detail-dialog.js +2 -2
- package/lib/blocklet/blocklet-source.js +2 -2
- package/lib/blocklet/component/component-cell.js +84 -83
- package/lib/blocklet/component/configuration.js +36 -52
- package/lib/blocklet/component/did-space/connect-to.js +4 -4
- package/lib/blocklet/component/index.js +38 -29
- package/lib/blocklet/component/navigation/navigation-dialog.js +3 -2
- package/lib/blocklet/component/space-connector.js +3 -3
- package/lib/blocklet/component/space-selector.js +2 -2
- package/lib/blocklet/component/store-blocklet-list.js +3 -3
- package/lib/blocklet/logo-uploader.js +2 -2
- package/lib/blocklet/notification/push-kit.js +1 -1
- package/lib/blocklet/preferences/index.js +3 -3
- package/lib/blocklet/publish/create-release/resources.js +3 -4
- package/lib/blocklet/publish/release-list.js +4 -4
- package/lib/blocklet/purchase/component-purchase.js +2 -2
- package/lib/blocklet/router/action/add-rule.js +18 -31
- package/lib/blocklet/router/rule-actions.js +1 -8
- package/lib/blocklet/storage/connect-to.js +4 -4
- package/lib/blocklet/storage/item.js +3 -3
- package/lib/blocklet/util.js +4 -4
- package/lib/hooks/url-evaluation.js +2 -2
- package/lib/hooks/use-app-logo.js +4 -4
- package/lib/hooks/use-bundle-logo.js +4 -4
- package/lib/invitation/invitation-receive.js +1 -1
- package/lib/locales/ar.js +1 -5
- package/lib/locales/de.js +0 -4
- package/lib/locales/en.js +1 -5
- package/lib/locales/es.js +0 -4
- package/lib/locales/fr.js +0 -4
- package/lib/locales/hi.js +0 -4
- package/lib/locales/i18n.db +0 -0
- package/lib/locales/id.js +0 -4
- package/lib/locales/ja.js +0 -4
- package/lib/locales/ko.js +0 -4
- package/lib/locales/pt.js +0 -4
- package/lib/locales/ru.js +0 -4
- package/lib/locales/th.js +0 -4
- package/lib/locales/vi.js +0 -4
- package/lib/locales/zh-tw.js +1 -5
- package/lib/locales/zh.js +1 -5
- package/lib/store/connect-actions.js +2 -2
- package/lib/store/item.js +2 -2
- package/lib/team/members/util.js +3 -3
- package/lib/util/index.js +18 -18
- package/lib/util/join-url-keep-search.js +2 -2
- package/lib/util/spaces.js +2 -4
- package/package.json +20 -19
- package/lib/blocklet/component/component-cell-mount-poin.js +0 -164
- package/lib/blocklet/publish/create-release/keep-now-resources.js +0 -15
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import
|
|
6
|
+
import joinUrl from 'url-join';
|
|
7
7
|
import Link from '@mui/material/Link';
|
|
8
8
|
import { ErrorFallback } from '@arcblock/ux/lib/ErrorBoundary';
|
|
9
9
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
@@ -20,7 +20,7 @@ import { formatRegistryLogoPath } from '../../util';
|
|
|
20
20
|
import { useBlockletContext } from '../../contexts/blocklet';
|
|
21
21
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
const getStoreDetail = (meta, endpoint) => {
|
|
23
|
-
return
|
|
23
|
+
return joinUrl(endpoint, `/blocklets/${meta.did}`);
|
|
24
24
|
};
|
|
25
25
|
const displayAttributes = ({
|
|
26
26
|
blocklet,
|
|
@@ -42,7 +42,7 @@ function BlockletItem({
|
|
|
42
42
|
const {
|
|
43
43
|
t
|
|
44
44
|
} = useLocaleContext();
|
|
45
|
-
let logoUrl =
|
|
45
|
+
let logoUrl = joinUrl(endpoint, formatRegistryLogoPath(blocklet.did, blocklet.logo || ''));
|
|
46
46
|
try {
|
|
47
47
|
const tempURL = new URL(logoUrl);
|
|
48
48
|
tempURL.searchParams.set('v', blocklet.version || +new Date());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { lazy, useRef } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
3
|
+
import joinUrl from 'url-join';
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
5
|
import noop from 'lodash/noop';
|
|
6
6
|
import Box from '@mui/material/Box';
|
|
@@ -52,7 +52,7 @@ export default function LogoUploader({
|
|
|
52
52
|
disabled: true
|
|
53
53
|
},
|
|
54
54
|
apiPathProps: {
|
|
55
|
-
uploader:
|
|
55
|
+
uploader: joinUrl(prefix, uploadPrefix, type, did),
|
|
56
56
|
disableMediaKitPrefix: true
|
|
57
57
|
},
|
|
58
58
|
coreProps: {
|
|
@@ -85,7 +85,7 @@ function NotificationPushKit() {
|
|
|
85
85
|
await api.sendPush({
|
|
86
86
|
input: {
|
|
87
87
|
did,
|
|
88
|
-
receiver:
|
|
88
|
+
receiver: 'z1b9wxs47TXpA5s6VMoGFBk933tF7ujzFDt',
|
|
89
89
|
notification: JSON.stringify({
|
|
90
90
|
title: 'Test push-kit notification',
|
|
91
91
|
body: 'This is message from push-kit config test',
|
|
@@ -2,7 +2,7 @@ import React, { useState, useContext } from 'react';
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import Iframe from 'react-iframe';
|
|
5
|
-
import
|
|
5
|
+
import joinUrl from 'url-join';
|
|
6
6
|
import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
|
|
7
7
|
import { Grid, Box } from '@mui/material';
|
|
8
8
|
import GeneralIcon from '@mui/icons-material/TuneRounded';
|
|
@@ -236,9 +236,9 @@ export default function BlockletPreferences({
|
|
|
236
236
|
if (!inService) {
|
|
237
237
|
urlSearchParams.set('authKey', '__sst');
|
|
238
238
|
}
|
|
239
|
-
urlSearchParams.set('schemaKey',
|
|
239
|
+
urlSearchParams.set('schemaKey', joinUrl(window.location.origin, pathPrefix, `/api/preferences?id=${encodeURIComponent(current)}`));
|
|
240
240
|
content = /*#__PURE__*/_jsx(Iframe, {
|
|
241
|
-
url: `${
|
|
241
|
+
url: `${joinUrl(window.location.origin, pathPrefix, '/hosted/form-collector/')}?${urlSearchParams.toString()}`,
|
|
242
242
|
width: "100%",
|
|
243
243
|
height: "100%",
|
|
244
244
|
frameBorder: 0,
|
|
@@ -3,7 +3,7 @@ import classnames from 'classnames';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { useEffect, useRef } from 'react';
|
|
5
5
|
import useSetState from 'react-use/lib/useSetState';
|
|
6
|
-
import
|
|
6
|
+
import joinUrl from 'url-join';
|
|
7
7
|
import { Box } from '@mui/material';
|
|
8
8
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
9
9
|
import { hasStartEngine } from '@blocklet/meta/lib/engine';
|
|
@@ -14,7 +14,6 @@ import { useNodeContext } from '../../../contexts/node';
|
|
|
14
14
|
import { axios } from '../../../util/api';
|
|
15
15
|
import StopBox from './stop-box';
|
|
16
16
|
import Tree from './tree';
|
|
17
|
-
import keepNowResources from './keep-now-resources';
|
|
18
17
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
18
|
const fillParent = (nodes, parentId) => {
|
|
20
19
|
nodes.forEach(node => {
|
|
@@ -32,7 +31,7 @@ const parseUrl = (component, projectId, releaseId, locale, initUrl) => {
|
|
|
32
31
|
const {
|
|
33
32
|
exportApi = '/'
|
|
34
33
|
} = component?.meta.resource || {};
|
|
35
|
-
const urlObj = new URL(
|
|
34
|
+
const urlObj = new URL(joinUrl('http://127.0.0.1', component.mountPoint, exportApi || '/').replace(/\/+/g, '/'));
|
|
36
35
|
urlObj.searchParams.set('projectId', projectId);
|
|
37
36
|
urlObj.searchParams.set('releaseId', releaseId);
|
|
38
37
|
urlObj.searchParams.set('local', locale);
|
|
@@ -179,7 +178,7 @@ export default function Resources({
|
|
|
179
178
|
const list = res?.resources || [];
|
|
180
179
|
if (list?.length) {
|
|
181
180
|
setSelectedResourceIds({
|
|
182
|
-
[child.meta.did]:
|
|
181
|
+
[child.meta.did]: list
|
|
183
182
|
});
|
|
184
183
|
setSelectedComponentsMapByIds(child.meta.did, tree, list);
|
|
185
184
|
if (!readOnly) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React, { useState, useEffect } from 'react';
|
|
3
3
|
import { Link, useParams } from 'react-router-dom';
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
|
-
import
|
|
5
|
+
import joinUrl from 'url-join';
|
|
6
6
|
import upperFirst from 'lodash/upperFirst';
|
|
7
7
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
8
8
|
import { Box, useMediaQuery, IconButton, Typography, Tooltip, Breadcrumbs } from '@mui/material';
|
|
@@ -234,12 +234,12 @@ export default function ReleaseList() {
|
|
|
234
234
|
let downloadUrl = '';
|
|
235
235
|
const published = release.status === 'published';
|
|
236
236
|
if (published) {
|
|
237
|
-
const blockletMetaUrl =
|
|
237
|
+
const blockletMetaUrl = joinUrl(serverEndpoint, `/api/project/${blocklet.meta.did}/${project.id}/${project.lastReleaseId}/release/blocklet.json`);
|
|
238
238
|
const url = new URL(serverEndpoint);
|
|
239
|
-
url.pathname =
|
|
239
|
+
url.pathname = joinUrl(url.pathname, '/launch-blocklet/agreement');
|
|
240
240
|
url.searchParams.set('blocklet_meta_url', blockletMetaUrl);
|
|
241
241
|
installUrl = url.href;
|
|
242
|
-
downloadUrl =
|
|
242
|
+
downloadUrl = joinUrl(`${WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${blocklet.meta.did}/${project.id}/${project.lastReleaseId}/download/${(project.lastReleaseFiles || [])[0]}`);
|
|
243
243
|
}
|
|
244
244
|
return /*#__PURE__*/_jsxs(Box, {
|
|
245
245
|
display: "flex",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable react/jsx-one-expression-per-line */
|
|
2
2
|
import { useState, useEffect, useImperativeHandle, forwardRef } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import joinUrl from 'url-join';
|
|
4
4
|
import { getDisplayName } from '@blocklet/meta/lib/util';
|
|
5
5
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
6
6
|
import DidConnect from '@arcblock/did-connect/lib/Connect';
|
|
@@ -132,7 +132,7 @@ export function ComponentPurchase({
|
|
|
132
132
|
purchase: {
|
|
133
133
|
action: 'acquire-asset',
|
|
134
134
|
checkFn: axios.create({
|
|
135
|
-
baseURL:
|
|
135
|
+
baseURL: joinUrl(baseUrl, '/store')
|
|
136
136
|
}).get,
|
|
137
137
|
extraParams: {
|
|
138
138
|
factory: meta.nftFactory,
|
|
@@ -17,10 +17,7 @@ import ConfigRoutingRule from './config-routing-rule';
|
|
|
17
17
|
import { formatMountPoint } from '../../../util';
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
19
|
export default function AddRule({
|
|
20
|
-
children
|
|
21
|
-
hiddenChildren,
|
|
22
|
-
open,
|
|
23
|
-
onClose
|
|
20
|
+
children
|
|
24
21
|
}) {
|
|
25
22
|
const {
|
|
26
23
|
t
|
|
@@ -32,13 +29,12 @@ export default function AddRule({
|
|
|
32
29
|
blocklet
|
|
33
30
|
} = useBlockletContext();
|
|
34
31
|
const [loading, setLoading] = useState(false);
|
|
35
|
-
const [
|
|
32
|
+
const [confirmSetting, setConfirmSetting] = useState(null);
|
|
36
33
|
const teamDid = blocklet.meta.did;
|
|
37
34
|
const siteId = blocklet.site.id;
|
|
38
35
|
const onCancel = () => {
|
|
39
|
-
onClose?.();
|
|
40
36
|
setLoading(false);
|
|
41
|
-
|
|
37
|
+
setConfirmSetting(null);
|
|
42
38
|
};
|
|
43
39
|
const onConfirm = async params => {
|
|
44
40
|
try {
|
|
@@ -85,7 +81,7 @@ export default function AddRule({
|
|
|
85
81
|
Toast.error(error.message);
|
|
86
82
|
} finally {
|
|
87
83
|
setLoading(false);
|
|
88
|
-
|
|
84
|
+
setConfirmSetting(null);
|
|
89
85
|
}
|
|
90
86
|
};
|
|
91
87
|
const setting = {
|
|
@@ -189,11 +185,11 @@ export default function AddRule({
|
|
|
189
185
|
const onMenuItemClick = e => {
|
|
190
186
|
e.stopPropagation();
|
|
191
187
|
// eslint-disable-next-line no-unused-expressions
|
|
192
|
-
|
|
188
|
+
setConfirmSetting(setting);
|
|
193
189
|
};
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
190
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
191
|
+
children: [typeof children === 'function' ? children({
|
|
192
|
+
loading,
|
|
197
193
|
open: onMenuItemClick
|
|
198
194
|
}) : /*#__PURE__*/_jsxs(MenuItem, {
|
|
199
195
|
onClick: onMenuItemClick,
|
|
@@ -207,30 +203,21 @@ export default function AddRule({
|
|
|
207
203
|
marginRight: 5
|
|
208
204
|
}
|
|
209
205
|
}), t('router.rule.add.title')]
|
|
210
|
-
})
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
params: setting.params,
|
|
219
|
-
onConfirm: setting.onConfirm,
|
|
220
|
-
onCancel: setting.onCancel,
|
|
206
|
+
}), confirmSetting && /*#__PURE__*/_jsx(Confirm, {
|
|
207
|
+
title: confirmSetting.title,
|
|
208
|
+
description: confirmSetting.description,
|
|
209
|
+
confirm: confirmSetting.confirm,
|
|
210
|
+
cancel: confirmSetting.cancel,
|
|
211
|
+
params: confirmSetting.params,
|
|
212
|
+
onConfirm: confirmSetting.onConfirm,
|
|
213
|
+
onCancel: confirmSetting.onCancel,
|
|
221
214
|
color: "primary"
|
|
222
215
|
})]
|
|
223
216
|
});
|
|
224
217
|
}
|
|
225
218
|
AddRule.propTypes = {
|
|
226
|
-
children: PropTypes.any
|
|
227
|
-
onClose: PropTypes.func,
|
|
228
|
-
hiddenChildren: PropTypes.bool,
|
|
229
|
-
open: PropTypes.bool
|
|
219
|
+
children: PropTypes.any
|
|
230
220
|
};
|
|
231
221
|
AddRule.defaultProps = {
|
|
232
|
-
children: null
|
|
233
|
-
open: false,
|
|
234
|
-
onClose: null,
|
|
235
|
-
hiddenChildren: false
|
|
222
|
+
children: null
|
|
236
223
|
};
|
|
@@ -23,14 +23,7 @@ export default function RuleActions(rule) {
|
|
|
23
23
|
return /*#__PURE__*/_jsxs(Box, {
|
|
24
24
|
display: "flex",
|
|
25
25
|
alignItems: "center",
|
|
26
|
-
children: [/*#__PURE__*/_jsx(
|
|
27
|
-
component: "a",
|
|
28
|
-
sx: {
|
|
29
|
-
display: {
|
|
30
|
-
xs: 'flex',
|
|
31
|
-
md: 'none'
|
|
32
|
-
}
|
|
33
|
-
},
|
|
26
|
+
children: [/*#__PURE__*/_jsx("a", {
|
|
34
27
|
target: "_blank",
|
|
35
28
|
href: href,
|
|
36
29
|
rel: "noopener noreferrer",
|
|
@@ -3,7 +3,7 @@ import React, { useState } from 'react';
|
|
|
3
3
|
import Button from '@arcblock/ux/lib/Button';
|
|
4
4
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
5
5
|
import DidConnect from '@arcblock/did-connect/lib/Connect';
|
|
6
|
-
import
|
|
6
|
+
import joinUrl from 'url-join';
|
|
7
7
|
import toast from '@arcblock/ux/lib/Toast';
|
|
8
8
|
import SplitButton from '@arcblock/ux/lib/SplitButton';
|
|
9
9
|
import Dialog from '@arcblock/ux/lib/Dialog';
|
|
@@ -53,7 +53,7 @@ function ConnectTo({
|
|
|
53
53
|
action: 'connect-to-did-spaces',
|
|
54
54
|
checkTimeout: 1000 * 300,
|
|
55
55
|
checkFn: axios.create({
|
|
56
|
-
baseURL:
|
|
56
|
+
baseURL: joinUrl(window.location.origin, getPathPrefix())
|
|
57
57
|
}).get,
|
|
58
58
|
messages: {
|
|
59
59
|
title: t('storage.spaces.provideNFT.title', {
|
|
@@ -198,10 +198,10 @@ function ConnectTo({
|
|
|
198
198
|
setAuthorizeConnect(preValue => ({
|
|
199
199
|
...preValue,
|
|
200
200
|
open: true,
|
|
201
|
-
prefix:
|
|
201
|
+
prefix: joinUrl(didSpacesCoreUrl, 'space/api/did'),
|
|
202
202
|
baseUrl: new URL(didSpacesCoreUrl).origin,
|
|
203
203
|
checkFn: axios.create({
|
|
204
|
-
baseURL:
|
|
204
|
+
baseURL: joinUrl(didSpacesCoreUrl, 'space')
|
|
205
205
|
}).get,
|
|
206
206
|
extraParams: {
|
|
207
207
|
appDid: blockletInfo.appDid,
|
|
@@ -4,7 +4,7 @@ import Button from '@arcblock/ux/lib/Button';
|
|
|
4
4
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import Toast from '@arcblock/ux/lib/Toast';
|
|
7
|
-
import
|
|
7
|
+
import joinUrl from 'url-join';
|
|
8
8
|
import { BLOCKLET_CONFIGURABLE_KEY } from '@blocklet/constant';
|
|
9
9
|
import DidConnect from '@arcblock/did-connect/lib/Connect';
|
|
10
10
|
import { useRequest } from 'ahooks';
|
|
@@ -176,10 +176,10 @@ function SpaceItem({
|
|
|
176
176
|
setAuthorizeConnect(preValue => ({
|
|
177
177
|
...preValue,
|
|
178
178
|
open: true,
|
|
179
|
-
prefix:
|
|
179
|
+
prefix: joinUrl(spaceGateway.url, 'space/api/did'),
|
|
180
180
|
baseUrl: new URL(spaceGateway.url).origin,
|
|
181
181
|
checkFn: axios.create({
|
|
182
|
-
baseURL:
|
|
182
|
+
baseURL: joinUrl(spaceGateway.url, 'space')
|
|
183
183
|
}).get,
|
|
184
184
|
extraParams: {
|
|
185
185
|
appDid,
|
package/lib/blocklet/util.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import sortBy from 'lodash/sortBy';
|
|
2
|
-
import
|
|
2
|
+
import joinUrl from 'url-join';
|
|
3
3
|
import isEmpty from 'lodash/isEmpty';
|
|
4
4
|
import normalizePathPrefix from '@abtnode/util/lib/normalize-path-prefix';
|
|
5
5
|
import { forEachBlockletSync, replaceSlotToIp } from '@blocklet/meta/lib/util';
|
|
@@ -7,12 +7,12 @@ import { BLOCKLET_APP_SPACE_REQUIREMENT } from '@blocklet/constant';
|
|
|
7
7
|
import { SLOT_FOR_IP_DNS_SITE } from '@abtnode/constant';
|
|
8
8
|
export const getServerUrl = (info, encodeURI = false) => {
|
|
9
9
|
const adminPath = process.env.NODE_ENV === 'production' ? info.routing.adminPath : '';
|
|
10
|
-
return encodeURI ? encodeURIComponent(
|
|
10
|
+
return encodeURI ? encodeURIComponent(joinUrl(window.location.origin, adminPath)) : joinUrl(window.location.origin, adminPath);
|
|
11
11
|
};
|
|
12
12
|
export const getLaunchAgreementUrl = (meta, info, storeUrl) => {
|
|
13
13
|
const serverUrl = getServerUrl(info);
|
|
14
|
-
const metaUrl =
|
|
15
|
-
const url = new URL(
|
|
14
|
+
const metaUrl = joinUrl(storeUrl, `/api/blocklets/${meta.did}/blocklet.json`);
|
|
15
|
+
const url = new URL(joinUrl(serverUrl, '/launch-blocklet/agreement'));
|
|
16
16
|
url.searchParams.set('blocklet_meta_url', metaUrl);
|
|
17
17
|
url.searchParams.set('from', window.location.href);
|
|
18
18
|
return url.href;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect, useMemo, useRef, useContext } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import joinUrl from 'url-join';
|
|
3
3
|
import memoize from 'lodash/memoize';
|
|
4
4
|
import { WELLKNOWN_PING_PREFIX } from '@abtnode/constant';
|
|
5
5
|
import { evaluateURLs } from '@abtnode/util/lib/url-evaluation';
|
|
@@ -16,7 +16,7 @@ const ping = memoize(url => {
|
|
|
16
16
|
if (hostname === window.location.hostname) {
|
|
17
17
|
return true;
|
|
18
18
|
}
|
|
19
|
-
return defaultCheckAccessible(
|
|
19
|
+
return defaultCheckAccessible(joinUrl(origin, WELLKNOWN_PING_PREFIX));
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
// url <-> evaluation cache
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import joinUrl from 'url-join';
|
|
2
2
|
import { BLOCKLET_CONFIGURABLE_KEY } from '@blocklet/constant';
|
|
3
3
|
import { useNodeContext } from '../contexts/node';
|
|
4
4
|
import { isInstalling, getLogoHash } from '../util';
|
|
@@ -21,9 +21,9 @@ export default function useAppLogo({
|
|
|
21
21
|
const customRectLogo = (blocklet?.environments || []).find(x => x.key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT)?.value;
|
|
22
22
|
const customFavicon = (blocklet?.environments || []).find(x => x.key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON)?.value;
|
|
23
23
|
const prefix = window.env?.apiPrefix || '/';
|
|
24
|
-
const logoUrl =
|
|
25
|
-
const rectLogoUrl =
|
|
26
|
-
const faviconUrl =
|
|
24
|
+
const logoUrl = joinUrl(prefix, `/blocklet/logo/${inService ? '' : blocklet.meta.did}`, getSearch(blocklet, customLogo));
|
|
25
|
+
const rectLogoUrl = joinUrl(prefix, `/blocklet/logo-rect/${inService ? '' : blocklet.meta.did}`, getSearch(blocklet, customRectLogo));
|
|
26
|
+
const faviconUrl = joinUrl(prefix, `/blocklet/logo-favicon/${inService ? '' : blocklet.meta.did}`, getSearch(blocklet, customFavicon));
|
|
27
27
|
return {
|
|
28
28
|
logoUrl,
|
|
29
29
|
rectLogoUrl,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import joinUrl from 'url-join';
|
|
2
2
|
import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
|
|
3
3
|
import { useNodeContext } from '../contexts/node';
|
|
4
4
|
import { formatRegistryLogoPath, APP_PREFIX, isDownloading, isExtracting } from '../util';
|
|
@@ -12,14 +12,14 @@ export default function useAvatar({
|
|
|
12
12
|
} = node;
|
|
13
13
|
const pending = isDownloading(blocklet?.status) || isExtracting(blocklet?.status);
|
|
14
14
|
const search = `?v=${blocklet?.meta?.version}${pending ? '~' : ''}`;
|
|
15
|
-
let logoUrl = inService ?
|
|
15
|
+
let logoUrl = inService ? joinUrl(APP_PREFIX, WELLKNOWN_SERVICE_PATH_PREFIX, '/blocklet/logo-bundle', search) : joinUrl(node.imgPrefix, 'blocklet.png');
|
|
16
16
|
if (blocklet.source === 'registry' && blocklet.deployedFrom && blocklet.meta.logo) {
|
|
17
|
-
logoUrl =
|
|
17
|
+
logoUrl = joinUrl(blocklet.deployedFrom, formatRegistryLogoPath(blocklet.meta.bundleDid, blocklet.meta.logo), search);
|
|
18
18
|
} else {
|
|
19
19
|
const prefix = window.env.apiPrefix || '/';
|
|
20
20
|
const components = ancestors.concat(blocklet);
|
|
21
21
|
const list = inService ? components.slice(1) : components;
|
|
22
|
-
logoUrl =
|
|
22
|
+
logoUrl = joinUrl(prefix, `/blocklet/logo-bundle${list.map(x => `/${x.meta.did}`).join('')}`, search);
|
|
23
23
|
}
|
|
24
24
|
return {
|
|
25
25
|
logoUrl,
|
|
@@ -4,7 +4,7 @@ import styled from '@emotion/styled';
|
|
|
4
4
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
5
5
|
import DidButton from '@arcblock/did-connect/lib/Button';
|
|
6
6
|
import { AUTH_SERVICE_PREFIX, API_DID_PREFIX } from '@arcblock/did-connect/lib/constant';
|
|
7
|
-
import
|
|
7
|
+
import joinURL from 'url-join';
|
|
8
8
|
import { formatDateTime } from '../util';
|
|
9
9
|
import usePassportId from '../hooks/use-passport-id';
|
|
10
10
|
import { useSessionContext } from '../contexts/session';
|
package/lib/locales/ar.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: 'إرسال تنبيه عند تجاوز استخدام القرص (%)',
|
|
893
893
|
diskThresholdPlaceholder: 'يرجى تعيين حد التنبيه لاستخدام القرص'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: 'عزل نظام الملفات',
|
|
897
|
-
switchTips: 'بعد تعطيل هذا الخيار، فإن نظام ملفات البلوكليت لن يكون عزلًا بعد الآن، مما قد يشكل خطرًا من تلف النظام من قبل البرامج الخبيثة.'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
|
@@ -1508,7 +1504,7 @@ export default {
|
|
|
1508
1504
|
installedButStopped: 'تم تثبيت التطبيق بنجاح ، ولكن لا يمكن تشغيله. يمكنك بدء تشغيله يدويًا بعد حل مشكلة الحجب.',
|
|
1509
1505
|
installedButError: 'تم تثبيت التطبيق بنجاح ، ولكن فشل في البدء',
|
|
1510
1506
|
restoreFailed: 'فشل في استعادة التطبيق، يرجى المحاولة مرة أخرى',
|
|
1511
|
-
resourceBlocklet: 'لا يمكن تثبيت
|
|
1507
|
+
resourceBlocklet: 'لا يمكن تثبيت الكتلة كتطبيق، يمكنك إضافة هذه الكتلة إلى التطبيقات الحالية.'
|
|
1512
1508
|
},
|
|
1513
1509
|
steps: {
|
|
1514
1510
|
introduction: 'مقدمة',
|
package/lib/locales/de.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: 'Sende eine Warnung, wenn die Festplattenauslastung (%) überschritten wird',
|
|
893
893
|
diskThresholdPlaceholder: 'Bitte legen Sie die Schwelle für die Festplattenauslastungs-Warnung fest'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: 'Dateisystemisolierung',
|
|
897
|
-
switchTips: 'Nach Deaktivierung dieser Option befindet sich das Dateisystem des Blocklets nicht mehr in Isolation, was ein Risiko darstellen kann, dass bösartige Software das Dateisystem beschädigt.'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
package/lib/locales/en.js
CHANGED
|
@@ -833,10 +833,6 @@ export default {
|
|
|
833
833
|
welcome: {
|
|
834
834
|
switchLabel: 'Welcome Page'
|
|
835
835
|
},
|
|
836
|
-
security: {
|
|
837
|
-
switchLabel: 'File System Isolation',
|
|
838
|
-
switchTips: 'After disabling this option, the file system of the Blocklet will no longer be in isolation, which may pose a risk of malicious software damaging the file system.'
|
|
839
|
-
},
|
|
840
836
|
upgrade: {
|
|
841
837
|
title: 'Upgrade Blocklet Server to {version}',
|
|
842
838
|
description: 'During the upgrade, your Blocklet Server will enter maintenance mode for a few minutes while the update is completed.',
|
|
@@ -1497,7 +1493,7 @@ export default {
|
|
|
1497
1493
|
installedButStopped: 'The app is installed successfully, but cannot be started. You can start it manually after resolving blocking issues',
|
|
1498
1494
|
installedButError: 'The app is successfully installed, but failed to start',
|
|
1499
1495
|
restoreFailed: 'Failed to restore app, please try again',
|
|
1500
|
-
resourceBlocklet: ''
|
|
1496
|
+
resourceBlocklet: 'Blocklet cannot be installed as an application, you can add this blocklet into existing applications.'
|
|
1501
1497
|
},
|
|
1502
1498
|
steps: {
|
|
1503
1499
|
introduction: 'Introduction',
|
package/lib/locales/es.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: 'Enviar alerta cuando el uso del disco exceda (%)',
|
|
893
893
|
diskThresholdPlaceholder: 'Por favor, establezca el umbral de alerta para el uso del disco'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: 'Aislamiento del sistema de archivos',
|
|
897
|
-
switchTips: 'Después de deshabilitar esta opción, el sistema de archivos del Blocklet ya no estará aislado, lo que podría representar un riesgo de que software malicioso dañe el sistema de archivos.'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
package/lib/locales/fr.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: "Envoyer une alerte lorsque l'utilisation du disque dépasse (%)",
|
|
893
893
|
diskThresholdPlaceholder: "Veuillez définir le seuil d'alerte d'utilisation du disque"
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: 'Isolation du système de fichiers',
|
|
897
|
-
switchTips: 'Après avoir désactivé cette option, le système de fichiers du Blocklet ne sera plus isolé, ce qui pourrait présenter un risque de dommages causés par un logiciel malveillant au système de fichiers.'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
package/lib/locales/hi.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: 'जब डिस्क उपयोग (%) से अधिक हो जाए, तो चेतावनी भेजें',
|
|
893
893
|
diskThresholdPlaceholder: 'कृपया डिस्क उपयोग चेतावनी सीमा सेट करें'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: 'फ़ाइल सिस्टम विलगनन',
|
|
897
|
-
switchTips: 'इस विकल्प को निषेधित करने के बाद, ब्लॉकलेट का फ़ाइल सिस्टम अलग नहीं होगा, जिससे किसी हानिकारक सॉफ़्टवेयर को फ़ाइल सिस्टम को नुक़सान पहुँचाने का ख़तरा हो सकता है।'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
package/lib/locales/i18n.db
CHANGED
|
Binary file
|
package/lib/locales/id.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: 'Kirim peringatan ketika penggunaan disk melebihi (%)',
|
|
893
893
|
diskThresholdPlaceholder: 'Tolong atur ambang batas peringatan penggunaan disk'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: 'Pengasingan Sistem File',
|
|
897
|
-
switchTips: 'Setelah menonaktifkan opsi ini, sistem file dari Blocklet tidak akan lagi dalam isolasi, yang dapat menimbulkan risiko perangkat lunak berbahaya merusak sistem file.'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
package/lib/locales/ja.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: 'ディスク使用率が (%) を超えた場合にアラートを送信する',
|
|
893
893
|
diskThresholdPlaceholder: 'ディスク使用量のアラート閾値を設定してください'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: 'ファイルシステムの分離',
|
|
897
|
-
switchTips: 'このオプションを無効にした後、Blockletのファイルシステムはもはや隔離されず、悪意のあるソフトウェアによってファイルシステムが損傷される可能性があります。'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
package/lib/locales/ko.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: '디스크 사용량이 (%) 이상인 경우 경고 메시지 보내기',
|
|
893
893
|
diskThresholdPlaceholder: '디스크 사용량 경고 임계값을 설정해주세요'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: '파일 시스템 격리',
|
|
897
|
-
switchTips: '이 옵션을 사용 중지 한 후에는 더 이상 Blocklet의 파일 시스템이 격리되지 않아 악성 소프트웨어가 파일 시스템을 손상시킬 수있는 위험이 있습니다.'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
package/lib/locales/pt.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: 'Enviar alerta quando o uso do disco exceder (%)',
|
|
893
893
|
diskThresholdPlaceholder: 'Por favor, defina o limiar de alerta de uso de disco'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: 'Isolamento do Sistema de Arquivos',
|
|
897
|
-
switchTips: 'Após desativar esta opção, o sistema de arquivos do Blocklet não estará mais em isolamento, o que pode representar um risco de software malicioso danificar o sistema de arquivos.'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
package/lib/locales/ru.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: 'Отправить предупреждение, когда использование диска превышает (%)',
|
|
893
893
|
diskThresholdPlaceholder: 'Пожалуйста, установите порог оповещения об использовании диска'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: 'Изоляция файловой системы',
|
|
897
|
-
switchTips: 'После отключения этой опции файловая система блоклета больше не будет находиться в изоляции, что может повлечь за собой риск повреждения файловой системы вредоносным ПО.'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
package/lib/locales/th.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: 'ส่งการแจ้งเตือนเมื่อการใช้งานดิสก์เกิน (%)',
|
|
893
893
|
diskThresholdPlaceholder: 'กรุณาระบุเกณฑ์คำเตือนการใช้ดิสก์'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: 'การแยกฟิล์ซัสเต็ม',
|
|
897
|
-
switchTips: 'หลังจากที่ปิดตัวเลือกนี้ลง ไฟล์ระบบของ Blocklet จะไม่อยู่ในโหมดกักกันอีกต่อไป ซึ่งอาจเสี่ยงต่อซอฟต์แวร์ที่เป็นอันตรายทำให้ระบบไฟล์เสียหาย'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
package/lib/locales/vi.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: 'Gửi cảnh báo khi sử dụng đĩa vượt quá (%)',
|
|
893
893
|
diskThresholdPlaceholder: 'Vui lòng đặt ngưỡng cảnh báo việc sử dụng đĩa'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: 'Cách ly Hệ thống Tệp',
|
|
897
|
-
switchTips: 'Sau khi vô hiệu hóa tùy chọn này, hệ thống tệp của Blocklet sẽ không còn được cách ly nữa, điều này có thể tạo ra nguy cơ phần mềm độc hại làm hỏng hệ thống tệp.'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
package/lib/locales/zh-tw.js
CHANGED
|
@@ -891,10 +891,6 @@ export default {
|
|
|
891
891
|
monitor: {
|
|
892
892
|
diskThreshold: '當磁碟使用量超過 (%) 時發送警示',
|
|
893
893
|
diskThresholdPlaceholder: '請設置磁碟使用警示閾值'
|
|
894
|
-
},
|
|
895
|
-
security: {
|
|
896
|
-
switchLabel: '檔案系統隔離',
|
|
897
|
-
switchTips: '在停用此選項後,Blocklet的檔案系統將不再處於隔離狀態,這可能會導致惡意軟體損壞檔案系統。'
|
|
898
894
|
}
|
|
899
895
|
},
|
|
900
896
|
accessKey: {
|
|
@@ -984,7 +980,7 @@ export default {
|
|
|
984
980
|
testSend: '測試推播套件發送',
|
|
985
981
|
inputTestReceiver: '請輸入測試接收者 DID',
|
|
986
982
|
receiverRequired: '需要 PushKit 接收者 DID',
|
|
987
|
-
pushPath: '
|
|
983
|
+
pushPath: '推送套件的 API 路徑(預設 /api/push)',
|
|
988
984
|
did: 'PushKit Blocklet DID',
|
|
989
985
|
customOptions: '自訂選項'
|
|
990
986
|
}
|