@abtnode/ux 1.16.14-beta-c308dc3b → 1.16.14-beta-963cb583
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/actions.js +97 -0
- package/es/analytics/card.js +92 -0
- package/es/analytics/chart.js +96 -0
- package/es/analytics/cpu.js +36 -0
- package/es/analytics/disk.js +111 -0
- package/es/analytics/memory.js +72 -0
- package/es/analytics/runtime.js +173 -0
- package/es/analytics/traffic.js +259 -0
- package/es/blocklet/access/config-access.js +307 -0
- package/es/blocklet/access/index.js +216 -0
- package/es/blocklet/actions.js +474 -0
- package/es/blocklet/add-cert.js +177 -0
- package/es/blocklet/agreement-app.js +21 -0
- package/es/blocklet/agreement.js +127 -0
- package/es/blocklet/app-avatar.js +57 -0
- package/es/blocklet/audit-logs.js +259 -0
- package/es/blocklet/blocklet-source.js +48 -0
- package/es/blocklet/bundle-avatar.js +64 -0
- package/es/blocklet/component/add.js +1313 -0
- package/es/blocklet/component/configuration.js +122 -0
- package/es/blocklet/component/delete.js +134 -0
- package/es/blocklet/component/environment.js +370 -0
- package/es/blocklet/component/index.js +975 -0
- package/es/blocklet/component/line.js +20 -0
- package/es/blocklet/component/navigation/locale-tabs.js +225 -0
- package/es/blocklet/component/navigation/navigation-actions.js +112 -0
- package/es/blocklet/component/navigation/navigation-dialog.js +607 -0
- package/es/blocklet/component/navigation/navigation-preview.js +101 -0
- package/es/blocklet/component/navigation/simple-select.js +124 -0
- package/es/blocklet/component/select-store.js +155 -0
- package/es/blocklet/component/selected/index.js +94 -0
- package/es/blocklet/component/setting.js +109 -0
- package/es/blocklet/component/sortable-tree.js +126 -0
- package/es/blocklet/component/space-connector.js +199 -0
- package/es/blocklet/component/space-selector.js +178 -0
- package/es/blocklet/component/start.js +101 -0
- package/es/blocklet/component/store-blocklet-list.js +200 -0
- package/es/blocklet/component/switch-control.js +57 -0
- package/es/blocklet/config-navigation.js +331 -0
- package/es/blocklet/configuration.js +603 -0
- package/es/blocklet/disk-info.js +75 -0
- package/es/blocklet/icons.js +18 -0
- package/es/blocklet/install-from-url.js +337 -0
- package/es/blocklet/log.js +90 -0
- package/es/blocklet/migration.js +149 -0
- package/es/blocklet/mode.js +19 -0
- package/es/blocklet/notification/email.js +257 -0
- package/es/blocklet/notification/index.js +49 -0
- package/es/blocklet/oauth/auth0.js +145 -0
- package/es/blocklet/oauth/common-settings.js +133 -0
- package/es/blocklet/oauth/federated-detail-dialog.js +175 -0
- package/es/blocklet/oauth/federated-invite-dialog.js +83 -0
- package/es/blocklet/oauth/federated-join-dialog.js +111 -0
- package/es/blocklet/oauth/federated-site-list.js +338 -0
- package/es/blocklet/oauth/federated.js +81 -0
- package/es/blocklet/oauth/index.js +69 -0
- package/es/blocklet/overview.js +293 -0
- package/es/blocklet/page-group.js +19 -0
- package/es/blocklet/preferences/app-sk.js +142 -0
- package/es/blocklet/preferences/index.js +305 -0
- package/es/blocklet/purchase/common.js +95 -0
- package/es/blocklet/purchase/component-purchase.js +237 -0
- package/es/blocklet/purchase/index.js +4 -0
- package/es/blocklet/router/action/add-domain-alias.js +167 -0
- package/es/blocklet/router/action/add-rule.js +211 -0
- package/es/blocklet/router/action/config-routing-rule.js +232 -0
- package/es/blocklet/router/action/delete-domain-alias.js +99 -0
- package/es/blocklet/router/action/delete-rule.js +108 -0
- package/es/blocklet/router/action/update-rule.js +209 -0
- package/es/blocklet/router/domain-actions.js +64 -0
- package/es/blocklet/router/domain-status.js +88 -0
- package/es/blocklet/router/rule-actions.js +66 -0
- package/es/blocklet/router/rule-list.js +190 -0
- package/es/blocklet/router/util.js +131 -0
- package/es/blocklet/runtime-info.js +68 -0
- package/es/blocklet/status.js +91 -0
- package/es/blocklet/storage/action.js +134 -0
- package/es/blocklet/storage/backups.js +241 -0
- package/es/blocklet/storage/connect-to.js +372 -0
- package/es/blocklet/storage/connected.js +198 -0
- package/es/blocklet/storage/delete.js +113 -0
- package/es/blocklet/storage/disconnect.js +243 -0
- package/es/blocklet/storage/index.js +19 -0
- package/es/blocklet/storage/item.js +558 -0
- package/es/blocklet/storage/preview-nft.js +286 -0
- package/es/blocklet/transfer-owner.js +198 -0
- package/es/blocklet/types.js +18 -0
- package/es/blocklet/util.js +145 -0
- package/es/blocklet/version.js +141 -0
- package/es/card-selector.js +134 -0
- package/es/certificate.js +105 -0
- package/es/chain.js +13 -0
- package/es/click-to-copy.js +22 -0
- package/es/confirm.js +149 -0
- package/es/contexts/audit-log.js +152 -0
- package/es/contexts/blocklet.js +10 -0
- package/es/contexts/deleting-blocklets.js +70 -0
- package/es/contexts/node.js +17 -0
- package/es/contexts/session.js +8 -0
- package/es/contexts/team.js +10 -0
- package/es/delete-confirm.js +121 -0
- package/es/did-address.js +46 -0
- package/es/dot.js +14 -0
- package/es/exchange-passport.js +102 -0
- package/es/form/form-select-input.js +184 -0
- package/es/form/form-text-input.js +178 -0
- package/es/form/form-wrapper.js +88 -0
- package/es/form/input-triggers.js +98 -0
- package/es/form/required.js +8 -0
- package/es/hooks/blocklet.js +229 -0
- package/es/hooks/confirm.js +90 -0
- package/es/hooks/mobile-width.js +11 -0
- package/es/hooks/url-evaluation.js +155 -0
- package/es/hooks/use-app-logo.js +16 -0
- package/es/hooks/use-backup-progress.js +31 -0
- package/es/hooks/use-blocklet-info-for-connect-did-spaces.js +50 -0
- package/es/hooks/use-bundle-logo.js +27 -0
- package/es/hooks/use-navigation.js +347 -0
- package/es/hooks/use-passport-id.js +14 -0
- package/es/hooks/use-subscription.js +22 -0
- package/es/icons/empty-space-nft.svg +59 -0
- package/es/icons/empty-spaces-nft.svg +58 -0
- package/es/icons/long-arrow.svg +5 -0
- package/es/icons/space-connected.svg +3 -0
- package/es/icons/space-disconnect.svg +3 -0
- package/es/index.js +3 -0
- package/es/invitation/invitation-app.js +58 -0
- package/es/invitation/invitation-login.js +68 -0
- package/es/invitation/invitation-passport.js +146 -0
- package/es/invitation/invitation-receive.js +138 -0
- package/es/invitation/invitation-success.js +93 -0
- package/es/invitation/invitation-user.js +90 -0
- package/es/invitation/invitation.js +90 -0
- package/es/issue-passport.js +142 -0
- package/es/launch-blocklet/content-layout.js +58 -0
- package/es/launch-blocklet/page-header.js +43 -0
- package/es/layout/addon.js +114 -0
- package/es/layout/feedback.js +55 -0
- package/es/locales/en.js +1541 -0
- package/es/locales/index.js +9 -0
- package/es/locales/zh.js +1544 -0
- package/es/logs/clock.js +11 -0
- package/es/logs/download.js +132 -0
- package/es/logs/log-terminal.js +253 -0
- package/es/lost-passport.js +452 -0
- package/es/nav-logo.js +219 -0
- package/es/passport-tag.js +43 -0
- package/es/permission.js +57 -0
- package/es/relative-time.js +53 -0
- package/es/result-message.js +11 -0
- package/es/schema-form/color-input.js +98 -0
- package/es/schema-form/common-prop-types.js +13 -0
- package/es/schema-form/index.js +215 -0
- package/es/schema-form/passport-input.js +55 -0
- package/es/schema-form/text-input.js +57 -0
- package/es/store/add.js +179 -0
- package/es/store/delete.js +96 -0
- package/es/store/item.js +76 -0
- package/es/subscription.js +144 -0
- package/es/table-icons.js +34 -0
- package/es/table.js +52 -0
- package/es/tag.js +21 -0
- package/es/team/members/actions.js +89 -0
- package/es/team/members/index.js +636 -0
- package/es/team/members/invitations.js +188 -0
- package/es/team/members/invite-member.js +208 -0
- package/es/team/members/issue-passport.js +152 -0
- package/es/team/members/member.js +408 -0
- package/es/team/members/passport-issuances.js +155 -0
- package/es/team/members/passports.js +364 -0
- package/es/team/members/toggle-user-approval.js +122 -0
- package/es/team/members/transfer-node.js +256 -0
- package/es/team/members/util.js +14 -0
- package/es/team/passports/color.js +127 -0
- package/es/team/passports/detail.js +312 -0
- package/es/team/passports/index.js +282 -0
- package/es/team/passports/mutate-role.js +198 -0
- package/es/team/passports/trusted-factories.js +221 -0
- package/es/team/passports/trusted-factory.js +343 -0
- package/es/team/passports/trusted-issuer.js +296 -0
- package/es/team/passports/trusted-issuers.js +226 -0
- package/es/team/search-input.js +46 -0
- package/es/team/styles/dialog.js +72 -0
- package/es/team/styles/list-header.js +31 -0
- package/es/util/api.js +6 -0
- package/es/util/constants.js +2 -0
- package/es/util/index.js +598 -0
- package/es/util/mode.js +4 -0
- package/es/util/space-gateway.js +51 -0
- package/es/util/spaces.js +160 -0
- package/es/who-can-access/config.js +38 -0
- package/es/wrap-locale.js +15 -0
- package/lib/blocklet/component/add.js +5 -0
- package/lib/blocklet/component/selected/index.js +47 -0
- package/lib/blocklet/component/space-connector.js +1 -1
- package/lib/blocklet/component/space-selector.js +1 -1
- package/lib/blocklet/storage/backups.js +1 -1
- package/lib/blocklet/storage/connect-to.js +6 -7
- package/lib/blocklet/storage/connected.js +1 -1
- package/lib/blocklet/storage/disconnect.js +1 -1
- package/lib/blocklet/storage/index.js +1 -1
- package/lib/blocklet/storage/item.js +1 -1
- package/lib/card-selector.js +14 -14
- package/lib/invitation/invitation-passport.js +7 -6
- package/lib/invitation/invitation-receive.js +1 -1
- package/lib/locales/en.js +12 -5
- package/lib/locales/zh.js +10 -3
- package/lib/lost-passport.js +2 -2
- package/lib/schema-form/passport-input.js +12 -11
- package/lib/team/passports/color.js +14 -14
- package/lib/team/passports/trusted-factory.js +1 -1
- package/lib/util/spaces.js +13 -1
- package/package.json +88 -21
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import isUrl from 'is-url';
|
|
2
|
+
import { BLOCKLET_CONFIGURABLE_KEY } from '@blocklet/constant';
|
|
3
|
+
import { isObject } from 'lodash';
|
|
4
|
+
import { api } from './api';
|
|
5
|
+
|
|
6
|
+
/* eslint-disable import/prefer-default-export */
|
|
7
|
+
const joinUrl = require('url-join');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @FIXME 希望之后放在 sdk 中 @jianchao
|
|
11
|
+
* @description
|
|
12
|
+
* @param {string} endpoint
|
|
13
|
+
* @returns {string}
|
|
14
|
+
*/
|
|
15
|
+
export function getBackupFilesUrlFromEndpoint(endpoint) {
|
|
16
|
+
const prefix = endpoint.replace(/\/api\/space\/.+/, '');
|
|
17
|
+
const strArray = endpoint.replace(/\/$/, '').split('/');
|
|
18
|
+
const spaceDid = strArray.at(-4);
|
|
19
|
+
const appDid = strArray.at(-2);
|
|
20
|
+
return joinUrl(prefix, 'space', spaceDid, 'apps', appDid, 'explorer', `?key=/apps/${appDid}/.did-objects/${appDid}/`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @FIXME 希望之后放在 sdk 中 @jianchao
|
|
25
|
+
* @description
|
|
26
|
+
* @param {string} endpoint
|
|
27
|
+
* @returns {string}
|
|
28
|
+
*/
|
|
29
|
+
export function getDIDSpaceUrlFromEndpoint(endpoint) {
|
|
30
|
+
const prefix = endpoint.replace(/\/api\/space\/.+/, '');
|
|
31
|
+
const strArray = endpoint.replace(/\/$/, '').split('/');
|
|
32
|
+
const spaceDid = strArray.at(-4);
|
|
33
|
+
return joinUrl(prefix, 'space', spaceDid);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @FIXME 希望之后放在 sdk 中 @jianchao
|
|
38
|
+
* @description
|
|
39
|
+
* @param {string} endpoint
|
|
40
|
+
* @returns {string}
|
|
41
|
+
*/
|
|
42
|
+
export function getDIDSpaceDidFromEndpoint(endpoint) {
|
|
43
|
+
const strArray = endpoint.replace(/\/$/, '').split('/');
|
|
44
|
+
const spaceDid = strArray.at(-4);
|
|
45
|
+
return spaceDid;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @description
|
|
50
|
+
* @export
|
|
51
|
+
* @param {string} endpoint
|
|
52
|
+
* @return {Promise<boolean>}
|
|
53
|
+
*/
|
|
54
|
+
export async function hasPermissionByEndpoint(endpoint) {
|
|
55
|
+
try {
|
|
56
|
+
if (!isUrl(endpoint)) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
const {
|
|
60
|
+
headers
|
|
61
|
+
} = await api.head(endpoint, {
|
|
62
|
+
timeout: 5000
|
|
63
|
+
});
|
|
64
|
+
return headers['x-listable'] === 'true' && headers['x-readable'] === 'true' && headers['x-writeable'] === 'true';
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.error(error);
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @description
|
|
73
|
+
* @export
|
|
74
|
+
* @param {import('@abtnode/client').ConfigEntry[]} environments
|
|
75
|
+
* @return {string}
|
|
76
|
+
*/
|
|
77
|
+
export function getSpaceBackupEndpoint(environments) {
|
|
78
|
+
return environments?.find(e => e.key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT)?.value || '';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @description
|
|
83
|
+
* @export
|
|
84
|
+
* @param {string} endpoint
|
|
85
|
+
* @return {boolean}
|
|
86
|
+
*/
|
|
87
|
+
export function getSpaceGatewayFromEndpoint(endpoint) {
|
|
88
|
+
return endpoint?.replace(/\/api\/space\/.+/, '');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @description
|
|
93
|
+
* @export
|
|
94
|
+
* @param {string} spaceGatewayUrl
|
|
95
|
+
* @return {Promise<boolean>}
|
|
96
|
+
*/
|
|
97
|
+
export async function isValidSpaceGatewayUrl(spaceGatewayUrl) {
|
|
98
|
+
try {
|
|
99
|
+
if (!isUrl(spaceGatewayUrl)) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
const didConnectTokenUrl = joinUrl(spaceGatewayUrl, 'space/api/did/one-click-authorization/token');
|
|
103
|
+
const {
|
|
104
|
+
status,
|
|
105
|
+
data
|
|
106
|
+
} = await api.get(didConnectTokenUrl, {
|
|
107
|
+
timeout: 5000
|
|
108
|
+
});
|
|
109
|
+
// note: data 必定返回一个对象才行,如果 data 返回了一个非对象,说明失败了,此时可能返回了前端的 404 页面的 html
|
|
110
|
+
return status === 200 && isObject(data);
|
|
111
|
+
} catch (error) {
|
|
112
|
+
console.error(error);
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @description
|
|
119
|
+
* @export
|
|
120
|
+
* @param {string} endpoint
|
|
121
|
+
* @return {Promise<string >}
|
|
122
|
+
*/
|
|
123
|
+
export async function getSpaceNameByEndpoint(endpoint) {
|
|
124
|
+
try {
|
|
125
|
+
if (!isUrl(endpoint)) {
|
|
126
|
+
return '';
|
|
127
|
+
}
|
|
128
|
+
const {
|
|
129
|
+
headers
|
|
130
|
+
} = await api.head(endpoint, {
|
|
131
|
+
timeout: 3000
|
|
132
|
+
});
|
|
133
|
+
const spaceName = headers['x-space-name'];
|
|
134
|
+
return spaceName ? decodeURIComponent(spaceName) : '';
|
|
135
|
+
} catch (error) {
|
|
136
|
+
console.error(error);
|
|
137
|
+
return '';
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* @description
|
|
142
|
+
* @export
|
|
143
|
+
* @param {string} endpoint
|
|
144
|
+
* @return {string}
|
|
145
|
+
*/
|
|
146
|
+
export function getSpaceNftDisplayUrlFromEndpoint(endpoint) {
|
|
147
|
+
const prefix = endpoint.replace(/\/api\/space\/.+/, '');
|
|
148
|
+
const strArray = endpoint.replace(/\/$/, '').split('/');
|
|
149
|
+
const spaceDid = strArray.at(-4);
|
|
150
|
+
return joinUrl(prefix, `/api/space/nft/display?spaceDid=${spaceDid}`);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @description
|
|
155
|
+
* @param {import('@abtnode/client').BlockletState} blocklet
|
|
156
|
+
* @return {string}
|
|
157
|
+
*/
|
|
158
|
+
export const getDIDSpaceEndpoint = blocklet => {
|
|
159
|
+
return blocklet?.configs?.find(item => item.key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)?.value || null;
|
|
160
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import LockIcon from '@mui/icons-material/Lock';
|
|
2
|
+
import ContactMailIcon from '@mui/icons-material/ContactMail';
|
|
3
|
+
import PublicIcon from '@mui/icons-material/Public';
|
|
4
|
+
import { WHO_CAN_ACCESS } from '@abtnode/constant';
|
|
5
|
+
export default [{
|
|
6
|
+
value: WHO_CAN_ACCESS.ALL,
|
|
7
|
+
icon: PublicIcon,
|
|
8
|
+
title: {
|
|
9
|
+
zh: '所有人可访问',
|
|
10
|
+
en: 'Accessible to all'
|
|
11
|
+
},
|
|
12
|
+
description: {
|
|
13
|
+
zh: '向所有人开放,无需通行证即可访问应用',
|
|
14
|
+
en: 'Open to the world anyone can access without passport'
|
|
15
|
+
}
|
|
16
|
+
}, {
|
|
17
|
+
value: WHO_CAN_ACCESS.INVITED,
|
|
18
|
+
icon: ContactMailIcon,
|
|
19
|
+
title: {
|
|
20
|
+
zh: '只有被邀请的人可以访问',
|
|
21
|
+
en: 'Only invited people can access'
|
|
22
|
+
},
|
|
23
|
+
description: {
|
|
24
|
+
zh: '稍后您可以在管理页面中邀请成员',
|
|
25
|
+
en: 'You can invite members later in the admin page'
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
value: WHO_CAN_ACCESS.OWNER,
|
|
29
|
+
icon: LockIcon,
|
|
30
|
+
title: {
|
|
31
|
+
zh: '只有应用所有者可以访问',
|
|
32
|
+
en: 'Only Owner of the blocklet can access'
|
|
33
|
+
},
|
|
34
|
+
description: {
|
|
35
|
+
zh: '必须提供所有者通行证才能访问应用',
|
|
36
|
+
en: 'You must provide owner passport to access this application'
|
|
37
|
+
}
|
|
38
|
+
}];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-props-no-spreading */
|
|
2
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
|
+
import { LocaleProvider } from '@arcblock/ux/lib/Locale/context';
|
|
4
|
+
import { translations } from './locales';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export default function wrapLocale(Component) {
|
|
7
|
+
return function LocaleWrapper(props) {
|
|
8
|
+
return /*#__PURE__*/_jsx(LocaleProvider, {
|
|
9
|
+
translations: translations,
|
|
10
|
+
children: /*#__PURE__*/_jsx(Component, {
|
|
11
|
+
...props
|
|
12
|
+
})
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -64,6 +64,11 @@ const getDIDSpaceCapability = meta => {
|
|
|
64
64
|
var _meta$capabilities;
|
|
65
65
|
return meta === null || meta === void 0 ? void 0 : (_meta$capabilities = meta.capabilities) === null || _meta$capabilities === void 0 ? void 0 : _meta$capabilities.didSpace;
|
|
66
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* @description
|
|
69
|
+
* @param {import('@abtnode/client').BlockletState} blocklet
|
|
70
|
+
* @return {string}
|
|
71
|
+
*/
|
|
67
72
|
const getDIDSpaceEndpoint = blocklet => {
|
|
68
73
|
var _blocklet$configs, _blocklet$configs$fin;
|
|
69
74
|
return (blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$configs = blocklet.configs) === null || _blocklet$configs === void 0 ? void 0 : (_blocklet$configs$fin = _blocklet$configs.find(item => item.key === _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)) === null || _blocklet$configs$fin === void 0 ? void 0 : _blocklet$configs$fin.value) || null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Selected;
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
|
|
9
|
+
var _propTypes = require("prop-types");
|
|
10
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
var _templateObject;
|
|
13
|
+
/* eslint-disable react/jsx-one-expression-per-line */
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @param {{
|
|
19
|
+
* children: React.ReactNode,
|
|
20
|
+
* selected?: false | true,
|
|
21
|
+
* }} { children, selected }
|
|
22
|
+
* @return {React.Component}
|
|
23
|
+
*/
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
26
|
+
function Selected(_ref) {
|
|
27
|
+
let {
|
|
28
|
+
children,
|
|
29
|
+
selected
|
|
30
|
+
} = _ref;
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(BoxContainer, {
|
|
32
|
+
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
33
|
+
className: "selected-container ".concat(selected ? 'selected' : ''),
|
|
34
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Check.default, {
|
|
35
|
+
className: "selected-icon"
|
|
36
|
+
})
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
const BoxContainer = (0, _styled.default)(_material.Box)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n .selected-container {\n display: flex !important;\n position: absolute;\n right: 0px;\n bottom: 0px;\n -webkit-box-pack: end;\n justify-content: flex-end;\n align-items: flex-end;\n width: 32px;\n height: 32px;\n border-radius: 0px 0px 8px;\n color: rgb(255, 255, 255);\n overflow: hidden;\n transition: all 0.4s ease 0s;\n\n &::after {\n position: absolute;\n z-index: 0;\n left: 60px;\n top: 60px;\n display: block;\n width: 0px;\n height: 0px;\n border-width: 16px;\n border-style: solid;\n border-color: transparent #1dc1c7 #1dc1c7 transparent;\n transition: all 0.1s ease 0s;\n content: '';\n }\n\n .selected-icon {\n visibility: hidden;\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0px 1px 1px 0px;\n font-size: 16px;\n transition: all 0.2s ease 0s;\n }\n }\n\n .selected-container.selected {\n &::after {\n left: 0px;\n top: 0px;\n }\n\n .selected-icon {\n visibility: visible;\n }\n }\n"])));
|
|
41
|
+
Selected.propTypes = {
|
|
42
|
+
children: _propTypes.node.isRequired,
|
|
43
|
+
selected: _propTypes.bool
|
|
44
|
+
};
|
|
45
|
+
Selected.defaultProps = {
|
|
46
|
+
selected: false
|
|
47
|
+
};
|
|
@@ -15,7 +15,7 @@ var _lodash = require("lodash");
|
|
|
15
15
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
16
16
|
var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
17
17
|
var _util = require("@blocklet/meta/lib/util");
|
|
18
|
-
var _blocklet = require("
|
|
18
|
+
var _blocklet = require("../../contexts/blocklet");
|
|
19
19
|
var _node = require("../../contexts/node");
|
|
20
20
|
var _spaceSelector = _interopRequireDefault(require("./space-selector"));
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -15,7 +15,7 @@ var _context = require("@arcblock/ux/lib/Locale/context");
|
|
|
15
15
|
var _material = require("@mui/material");
|
|
16
16
|
var _Autocomplete = _interopRequireWildcard(require("@mui/material/Autocomplete"));
|
|
17
17
|
var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
18
|
-
var _session = require("
|
|
18
|
+
var _session = require("../../contexts/session");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
20
|
var _templateObject;
|
|
21
21
|
const _excluded = ["onSelect", "endpoint", "gatewayUrl", "loading", "size", "helperText"];
|
|
@@ -15,7 +15,7 @@ var _dayjs = _interopRequireDefault(require("@abtnode/util/lib/dayjs"));
|
|
|
15
15
|
var _HelpOutline = _interopRequireDefault(require("@mui/icons-material/HelpOutline"));
|
|
16
16
|
var _propTypes = require("prop-types");
|
|
17
17
|
var _node = require("../../contexts/node");
|
|
18
|
-
var _blocklet = require("
|
|
18
|
+
var _blocklet = require("../../contexts/blocklet");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
20
|
const _excluded = ["progress", "spaceGateways"];
|
|
21
21
|
/**
|
|
@@ -10,14 +10,13 @@ var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
|
|
|
10
10
|
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
11
11
|
var _Connect = _interopRequireDefault(require("@arcblock/did-connect/lib/Connect"));
|
|
12
12
|
var _urlJoin = _interopRequireDefault(require("url-join"));
|
|
13
|
-
var _isUrl = _interopRequireDefault(require("is-url"));
|
|
14
13
|
var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
15
14
|
var _constant = require("@blocklet/constant");
|
|
16
15
|
var _SplitButton = _interopRequireDefault(require("@arcblock/ux/lib/SplitButton"));
|
|
17
16
|
var _Dialog = _interopRequireDefault(require("@arcblock/ux/lib/Dialog"));
|
|
18
17
|
var _Alert = _interopRequireDefault(require("@arcblock/ux/lib/Alert"));
|
|
19
18
|
var _propTypes = require("prop-types");
|
|
20
|
-
var _blocklet = require("
|
|
19
|
+
var _blocklet = require("../../contexts/blocklet");
|
|
21
20
|
var _api = require("../../util/api");
|
|
22
21
|
var _util = require("../../util");
|
|
23
22
|
var _node = require("../../contexts/node");
|
|
@@ -155,12 +154,12 @@ function ConnectTo(_ref) {
|
|
|
155
154
|
name,
|
|
156
155
|
did
|
|
157
156
|
} = _ref2;
|
|
158
|
-
let
|
|
159
|
-
if (!
|
|
157
|
+
let normalizeUrl = endpoint === null || endpoint === void 0 ? void 0 : (_endpoint$replace = endpoint.replace(/\/api\/.+/, '')) === null || _endpoint$replace === void 0 ? void 0 : (_endpoint$replace$tri = _endpoint$replace.trim()) === null || _endpoint$replace$tri === void 0 ? void 0 : _endpoint$replace$tri.replace(/\/$/, '');
|
|
158
|
+
if (!normalizeUrl.startsWith('http')) {
|
|
160
159
|
// eslint-disable-next-line no-param-reassign
|
|
161
|
-
|
|
160
|
+
normalizeUrl = "https://".concat(normalizeUrl);
|
|
162
161
|
}
|
|
163
|
-
if (!(0,
|
|
162
|
+
if (!(await (0, _spaces.isValidSpaceGatewayUrl)(normalizeUrl))) {
|
|
164
163
|
_Toast.default.error(t('storage.spaces.gateway.add.invalidUrl'));
|
|
165
164
|
return;
|
|
166
165
|
}
|
|
@@ -174,7 +173,7 @@ function ConnectTo(_ref) {
|
|
|
174
173
|
const spaceGateway = {
|
|
175
174
|
name,
|
|
176
175
|
did,
|
|
177
|
-
url:
|
|
176
|
+
url: normalizeUrl,
|
|
178
177
|
endpoint
|
|
179
178
|
};
|
|
180
179
|
await nodeApi.addBlockletSpaceGateway({
|
|
@@ -12,7 +12,7 @@ var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
|
12
12
|
var _connectTo = _interopRequireDefault(require("./connect-to"));
|
|
13
13
|
var _item = _interopRequireDefault(require("./item"));
|
|
14
14
|
var _backups = _interopRequireDefault(require("./backups"));
|
|
15
|
-
var _blocklet = require("
|
|
15
|
+
var _blocklet = require("../../contexts/blocklet");
|
|
16
16
|
var _node = require("../../contexts/node");
|
|
17
17
|
var _spaces = require("../../util/spaces");
|
|
18
18
|
var _useBackupProgress = _interopRequireDefault(require("../../hooks/use-backup-progress"));
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _material = require("@mui/material");
|
|
9
9
|
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
10
|
-
var _blocklet = require("
|
|
10
|
+
var _blocklet = require("../../contexts/blocklet");
|
|
11
11
|
var _connectTo = _interopRequireDefault(require("./connect-to"));
|
|
12
12
|
var _diskInfo = _interopRequireDefault(require("../disk-info"));
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _blocklet = require("
|
|
8
|
+
var _blocklet = require("../../contexts/blocklet");
|
|
9
9
|
var _spaces = require("../../util/spaces");
|
|
10
10
|
var _disconnect = _interopRequireDefault(require("./disconnect"));
|
|
11
11
|
var _connected = _interopRequireDefault(require("./connected"));
|
|
@@ -23,7 +23,7 @@ var _action = _interopRequireDefault(require("./action"));
|
|
|
23
23
|
var _mode = require("../../util/mode");
|
|
24
24
|
var _api = require("../../util/api");
|
|
25
25
|
var _node = require("../../contexts/node");
|
|
26
|
-
var _blocklet = require("
|
|
26
|
+
var _blocklet = require("../../contexts/blocklet");
|
|
27
27
|
var _useBlockletInfoForConnectDidSpaces = _interopRequireDefault(require("../../hooks/use-blocklet-info-for-connect-did-spaces"));
|
|
28
28
|
var _spaces = require("../../util/spaces");
|
|
29
29
|
var _previewNft = _interopRequireDefault(require("./preview-nft"));
|
package/lib/card-selector.js
CHANGED
|
@@ -9,6 +9,7 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
var _templateObject;
|
|
12
|
+
/* eslint-disable react/no-danger */
|
|
12
13
|
/* eslint-disable jsx-a11y/alt-text */
|
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
15
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -23,7 +24,7 @@ function CardSelector(_ref) {
|
|
|
23
24
|
} = _ref;
|
|
24
25
|
const [selectedId, setSelectedId] = (0, _react.useState)(0);
|
|
25
26
|
const [translateX, setTranslateX] = (0, _react.useState)(0);
|
|
26
|
-
const
|
|
27
|
+
const outerCon = (0, _react.useRef)(null);
|
|
27
28
|
|
|
28
29
|
// 选择卡片
|
|
29
30
|
const selectedItem = i => {
|
|
@@ -33,14 +34,14 @@ function CardSelector(_ref) {
|
|
|
33
34
|
setSelectedId(i);
|
|
34
35
|
|
|
35
36
|
// 外部容器大小
|
|
36
|
-
const outerWidth =
|
|
37
|
+
const outerWidth = outerCon.current.clientWidth;
|
|
37
38
|
setTranslateX(i * (width + cardSpace) - (outerWidth - width) / 2 + cardSpace * 0.5);
|
|
38
39
|
onSelect(i);
|
|
39
40
|
};
|
|
40
41
|
(0, _react.useEffect)(() => {
|
|
41
42
|
selectedItem(defaultIndex);
|
|
42
43
|
const func = e => e.preventDefault();
|
|
43
|
-
|
|
44
|
+
outerCon.current.addEventListener('touchmove', func, {
|
|
44
45
|
passive: false
|
|
45
46
|
});
|
|
46
47
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -62,7 +63,7 @@ function CardSelector(_ref) {
|
|
|
62
63
|
}
|
|
63
64
|
};
|
|
64
65
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Container, {
|
|
65
|
-
ref:
|
|
66
|
+
ref: outerCon,
|
|
66
67
|
onTouchStart: touchstart,
|
|
67
68
|
onTouchEnd: touchend,
|
|
68
69
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -70,28 +71,27 @@ function CardSelector(_ref) {
|
|
|
70
71
|
style: {
|
|
71
72
|
transform: "translate(".concat(-translateX, "px, 0)")
|
|
72
73
|
},
|
|
73
|
-
children: list.map((
|
|
74
|
+
children: list.map((x, i) => {
|
|
74
75
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
75
76
|
className: "card-item ".concat(i === selectedId ? 'selected' : ''),
|
|
76
77
|
style: {
|
|
77
78
|
width,
|
|
78
79
|
height,
|
|
79
80
|
margin: cardSpace / 2
|
|
80
|
-
}
|
|
81
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
82
|
-
,
|
|
83
|
-
|
|
81
|
+
},
|
|
84
82
|
onClick: () => selectedItem(i),
|
|
85
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
84
|
+
className: "card-content",
|
|
85
|
+
dangerouslySetInnerHTML: {
|
|
86
|
+
__html: x.src
|
|
87
|
+
}
|
|
88
88
|
})
|
|
89
|
-
},
|
|
89
|
+
}, x.id);
|
|
90
90
|
})
|
|
91
91
|
})
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
-
const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);\n overflow: hidden;\n .card-container {\n display: flex;\n white-space: nowrap;\n width: max-content;\n transition: all ease 0.3s;\n }\n .card-item {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n cursor: pointer;\n\n
|
|
94
|
+
const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);\n overflow: hidden;\n .card-container {\n display: flex;\n white-space: nowrap;\n width: max-content;\n transition: all ease 0.3s;\n }\n .card-item {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n cursor: pointer;\n\n .card-content {\n pointer-events: none;\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n outline: #526ded solid 0;\n transition: all ease 0.2s;\n box-shadow: rgba(0, 0, 0, 0.2) 0 0 10px;\n }\n &.selected {\n cursor: default;\n .card-content {\n outline: #526ded solid 5px;\n }\n }\n }\n"])));
|
|
95
95
|
CardSelector.propTypes = {
|
|
96
96
|
list: _propTypes.default.array,
|
|
97
97
|
width: _propTypes.default.number,
|
|
@@ -12,6 +12,7 @@ var _Dialog = _interopRequireDefault(require("@arcblock/ux/lib/Dialog"));
|
|
|
12
12
|
var _iconsMaterial = require("@mui/icons-material");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
var _templateObject;
|
|
15
|
+
/* eslint-disable react/no-danger */
|
|
15
16
|
/* eslint-disable jsx-a11y/alt-text */
|
|
16
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
18
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -38,7 +39,6 @@ function InvitationPassport(_ref) {
|
|
|
38
39
|
// can't get avatar, cause user is not login
|
|
39
40
|
// ownerAvatarUrl: user.avatar,
|
|
40
41
|
ownerDid: invitation.info.appDid,
|
|
41
|
-
isDataUrl: true,
|
|
42
42
|
preferredColor: invitation.info.passportColor || passportColor
|
|
43
43
|
});
|
|
44
44
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -54,10 +54,11 @@ function InvitationPassport(_ref) {
|
|
|
54
54
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
55
|
className: "invite-passport__card",
|
|
56
56
|
onClick: onViewPermission,
|
|
57
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
58
|
+
className: "invite-passport__cover",
|
|
59
|
+
dangerouslySetInnerHTML: {
|
|
60
|
+
__html: display
|
|
61
|
+
}
|
|
61
62
|
})
|
|
62
63
|
})
|
|
63
64
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
|
|
@@ -106,7 +107,7 @@ InvitationPassport.propTypes = {
|
|
|
106
107
|
InvitationPassport.defaultProps = {
|
|
107
108
|
passportColor: 'auto'
|
|
108
109
|
};
|
|
109
|
-
const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ", ";\n }\n"])), _ref2 => {
|
|
110
|
+
const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n cursor: pointer;\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ", ";\n }\n"])), _ref2 => {
|
|
110
111
|
let {
|
|
111
112
|
theme
|
|
112
113
|
} = _ref2;
|
|
@@ -12,7 +12,7 @@ var _Connect = _interopRequireDefault(require("@arcblock/did-connect/lib/Connect
|
|
|
12
12
|
var _Button = _interopRequireDefault(require("@arcblock/did-connect/lib/Button"));
|
|
13
13
|
var _utils = require("@arcblock/did-connect/lib/utils");
|
|
14
14
|
var _util = require("../util");
|
|
15
|
-
var _usePassportId = _interopRequireDefault(require("
|
|
15
|
+
var _usePassportId = _interopRequireDefault(require("../hooks/use-passport-id"));
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
var _templateObject;
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/lib/locales/en.js
CHANGED
|
@@ -312,7 +312,8 @@ module.exports = {
|
|
|
312
312
|
manual: 'Manual',
|
|
313
313
|
progress: 'In progress',
|
|
314
314
|
startTime: 'Start time',
|
|
315
|
-
endTime: 'End time'
|
|
315
|
+
endTime: 'End time',
|
|
316
|
+
selected: 'Selected'
|
|
316
317
|
},
|
|
317
318
|
blocklet: {
|
|
318
319
|
external: 'External',
|
|
@@ -1356,6 +1357,7 @@ module.exports = {
|
|
|
1356
1357
|
tag: 'Connected'
|
|
1357
1358
|
},
|
|
1358
1359
|
connectedWithName: 'You have successfully connected to {name}',
|
|
1360
|
+
addedWithName: 'You have successfully added {name}',
|
|
1359
1361
|
connects: 'Connect',
|
|
1360
1362
|
reconnect: 'Reconnect',
|
|
1361
1363
|
addressCannotEmpty: 'Address cannot be empty',
|
|
@@ -1391,7 +1393,8 @@ module.exports = {
|
|
|
1391
1393
|
title: 'Delete gateway',
|
|
1392
1394
|
succeeded: 'Delete DID Spaces{name} Success',
|
|
1393
1395
|
failed: 'Delete gateway failed',
|
|
1394
|
-
failedForConnected: 'Unable to delete a connected DID Spaces'
|
|
1396
|
+
failedForConnected: 'Unable to delete a connected DID Spaces',
|
|
1397
|
+
failedForSelected: 'Unable to delete a selected DID Spaces'
|
|
1395
1398
|
},
|
|
1396
1399
|
connect: {
|
|
1397
1400
|
title: 'Connect DID Spaces',
|
|
@@ -1421,14 +1424,18 @@ module.exports = {
|
|
|
1421
1424
|
},
|
|
1422
1425
|
notYet: "You don't have a backup in progress yet...",
|
|
1423
1426
|
connect: {
|
|
1424
|
-
now: 'Connect',
|
|
1427
|
+
now: 'Connect now',
|
|
1425
1428
|
title: 'Connect DID Spaces',
|
|
1426
1429
|
provider: 'Provide your DID Spaces to start backups',
|
|
1427
|
-
|
|
1430
|
+
providerForStorage: 'Please connect your DID Spaces',
|
|
1431
|
+
useWallet: 'Connect with DID Wallet',
|
|
1432
|
+
useWalletReconnect: 'Reconnect with DID Wallet',
|
|
1428
1433
|
useSpaceGateway: 'Connect using the DID Spaces gateway',
|
|
1434
|
+
useSpaceGatewayReconnect: 'Reconnect using the DID Spaces gateway',
|
|
1429
1435
|
switchToSpace: 'Switch to Space',
|
|
1430
1436
|
switchToSpaceSucceeded: 'Switched to Space{name}',
|
|
1431
|
-
succeeded: 'You have successfully connected to DID Spaces'
|
|
1437
|
+
succeeded: 'You have successfully connected to DID Spaces',
|
|
1438
|
+
disconnect: 'disconnect'
|
|
1432
1439
|
},
|
|
1433
1440
|
disconnected: {
|
|
1434
1441
|
tag: 'Disconnected',
|
package/lib/locales/zh.js
CHANGED
|
@@ -317,7 +317,8 @@ module.exports = {
|
|
|
317
317
|
manual: '手动',
|
|
318
318
|
progress: '进行中',
|
|
319
319
|
startTime: '开始时间',
|
|
320
|
-
endTime: '结束时间'
|
|
320
|
+
endTime: '结束时间',
|
|
321
|
+
selected: '已选中'
|
|
321
322
|
},
|
|
322
323
|
blocklet: {
|
|
323
324
|
external: '外部',
|
|
@@ -1360,6 +1361,7 @@ module.exports = {
|
|
|
1360
1361
|
tag: '已连接'
|
|
1361
1362
|
},
|
|
1362
1363
|
connectedWithName: '你已成功连接至 {name}',
|
|
1364
|
+
addedWithName: '你已成功添加 {name}',
|
|
1363
1365
|
connects: '连接',
|
|
1364
1366
|
reconnect: '重新连接',
|
|
1365
1367
|
addressCannotEmpty: '地址不能为空',
|
|
@@ -1394,7 +1396,8 @@ module.exports = {
|
|
|
1394
1396
|
title: '删除 DID Spaces',
|
|
1395
1397
|
succeeded: '删除 DID Spaces{name} 成功',
|
|
1396
1398
|
failed: '删除 DID Spaces 失败',
|
|
1397
|
-
failedForConnected: '无法删除一个已连接的 DID Spaces'
|
|
1399
|
+
failedForConnected: '无法删除一个已连接的 DID Spaces',
|
|
1400
|
+
failedForSelected: '无法删除一个已选中的 DID Spaces'
|
|
1398
1401
|
},
|
|
1399
1402
|
connect: {
|
|
1400
1403
|
title: '连接到 DID Spaces',
|
|
@@ -1427,11 +1430,15 @@ module.exports = {
|
|
|
1427
1430
|
now: '立即连接',
|
|
1428
1431
|
title: '使用 DID Wallet 连接',
|
|
1429
1432
|
provider: '提供您的 DID Spaces 开始备份',
|
|
1433
|
+
providerForStorage: '请连接您的 DID Spaces',
|
|
1430
1434
|
useWallet: '使用 DID Wallet 连接',
|
|
1435
|
+
useWalletReconnect: '使用 DID Wallet 重新连接',
|
|
1431
1436
|
useSpaceGateway: '使用 DID Spaces 网关连接',
|
|
1437
|
+
useSpaceGatewayReconnect: '使用 DID Spaces 网关重新连接',
|
|
1432
1438
|
switchToSpace: '切换至 Space',
|
|
1433
1439
|
switchToSpaceSucceeded: '已切换至 Space{name}',
|
|
1434
|
-
succeeded: '你已成功连接至 DID Spaces'
|
|
1440
|
+
succeeded: '你已成功连接至 DID Spaces',
|
|
1441
|
+
disconnect: '断开连接'
|
|
1435
1442
|
},
|
|
1436
1443
|
disconnected: {
|
|
1437
1444
|
tag: '连接已断开',
|
package/lib/lost-passport.js
CHANGED
|
@@ -218,10 +218,10 @@ function LostPassport(_ref2) {
|
|
|
218
218
|
ownerDid: user.did,
|
|
219
219
|
ownerName: user.fullName,
|
|
220
220
|
ownerAvatarUrl: user.avatar,
|
|
221
|
-
isDataUrl: true,
|
|
222
221
|
preferredColor: passportColor || 'auto'
|
|
223
222
|
}),
|
|
224
|
-
name: x.title
|
|
223
|
+
name: x.title,
|
|
224
|
+
id: x.id
|
|
225
225
|
};
|
|
226
226
|
}),
|
|
227
227
|
onSelect: index => handleChange({
|