@abtnode/ux 1.16.17-beta-5d4664f8 → 1.16.17-beta-2ac96448
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/configuration.js +169 -32
- package/es/blocklet/publish/create-release.js +1 -1
- package/es/blocklet/storage/auto-backup.js +55 -0
- package/es/blocklet/storage/connected.js +6 -0
- package/es/contexts/blocklet-storage.js +28 -1
- package/es/hooks/use-app-logo.js +20 -4
- package/es/hooks/use-auto-backup.js +33 -0
- package/es/locales/en.js +11 -4
- package/es/locales/zh.js +11 -4
- package/es/util/index.js +2 -1
- package/lib/blocklet/configuration.js +141 -33
- package/lib/blocklet/publish/create-release.js +1 -1
- package/lib/blocklet/storage/auto-backup.js +64 -0
- package/lib/blocklet/storage/connected.js +6 -0
- package/lib/contexts/blocklet-storage.js +28 -1
- package/lib/hooks/use-app-logo.js +21 -4
- package/lib/hooks/use-auto-backup.js +43 -0
- package/lib/locales/en.js +11 -4
- package/lib/locales/zh.js +11 -4
- package/lib/util/index.js +4 -2
- package/package.json +8 -8
|
@@ -9,12 +9,15 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
11
11
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
var _urlJoin = _interopRequireDefault(require("url-join"));
|
|
12
14
|
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
13
15
|
var _Switch = _interopRequireDefault(require("@mui/material/Switch"));
|
|
14
16
|
var _Divider = _interopRequireDefault(require("@mui/material/Divider"));
|
|
15
17
|
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
16
18
|
var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
|
|
17
19
|
var _Loop = _interopRequireDefault(require("@mui/icons-material/Loop"));
|
|
20
|
+
var _Avatar = _interopRequireDefault(require("@mui/material/Avatar"));
|
|
18
21
|
var _constant = require("@abtnode/constant");
|
|
19
22
|
var _constant2 = require("@blocklet/constant");
|
|
20
23
|
var _util = require("@blocklet/meta/lib/util");
|
|
@@ -28,12 +31,11 @@ var _permission = _interopRequireWildcard(require("../permission"));
|
|
|
28
31
|
var _clearCache = _interopRequireDefault(require("../clear-cache"));
|
|
29
32
|
var _appSk = _interopRequireDefault(require("./preferences/app-sk"));
|
|
30
33
|
var _transferOwner = _interopRequireDefault(require("./transfer-owner"));
|
|
34
|
+
var _useAppLogo = _interopRequireDefault(require("../hooks/use-app-logo"));
|
|
31
35
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
32
36
|
var _templateObject;
|
|
33
37
|
const _excluded = ["blocklet", "onUpdate", "hasPermission"];
|
|
34
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
36
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
39
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
38
40
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
39
41
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -42,10 +44,18 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
42
44
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
43
45
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
44
46
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
47
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
48
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
45
49
|
const languages = Object.keys(_constant2.SUPPORTED_LANGUAGES).map(x => ({
|
|
46
50
|
code: x,
|
|
47
51
|
name: _constant2.SUPPORTED_LANGUAGES[x].nativeName
|
|
48
52
|
}));
|
|
53
|
+
|
|
54
|
+
// eslint-disable-next-line import/no-unresolved
|
|
55
|
+
const UploaderComponent = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('@blocklet/uploader/react'))).then(res => ({
|
|
56
|
+
default: res.Uploader
|
|
57
|
+
})));
|
|
58
|
+
const uploadPrefix = '/blocklet/logo/upload';
|
|
49
59
|
function BlockletEnvironment(_ref) {
|
|
50
60
|
var _blocklet$settings;
|
|
51
61
|
let {
|
|
@@ -54,7 +64,15 @@ function BlockletEnvironment(_ref) {
|
|
|
54
64
|
hasPermission
|
|
55
65
|
} = _ref,
|
|
56
66
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
57
|
-
const
|
|
67
|
+
const {
|
|
68
|
+
api,
|
|
69
|
+
inService,
|
|
70
|
+
prefix,
|
|
71
|
+
getSessionInHeader,
|
|
72
|
+
ws: {
|
|
73
|
+
useSubscription
|
|
74
|
+
}
|
|
75
|
+
} = (0, _node.useNodeContext)();
|
|
58
76
|
const {
|
|
59
77
|
t
|
|
60
78
|
} = (0, _react.useContext)(_context.LocaleContext);
|
|
@@ -64,12 +82,28 @@ function BlockletEnvironment(_ref) {
|
|
|
64
82
|
const whoCanAccess = (0, _util.getWhoCanAccess)(blocklet);
|
|
65
83
|
const publicToStore = blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$settings = blocklet.settings) === null || _blocklet$settings === void 0 ? void 0 : _blocklet$settings.publicToStore;
|
|
66
84
|
const disabled = loading || !hasPermission;
|
|
85
|
+
const uploaderLogoRef = (0, _react.useRef)(null);
|
|
67
86
|
const {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
logoUrl,
|
|
88
|
+
rectLogoUrl,
|
|
89
|
+
faviconUrl
|
|
90
|
+
} = (0, _useAppLogo.default)({
|
|
91
|
+
blocklet
|
|
92
|
+
});
|
|
93
|
+
const [apiPathProps, setApiPathProps] = (0, _react.useState)();
|
|
94
|
+
const uploadLogoPrefix = (0, _urlJoin.default)(prefix, uploadPrefix, 'square', blocklet.meta.did);
|
|
95
|
+
const uploadLogoRectPrefix = (0, _urlJoin.default)(prefix, uploadPrefix, 'rect', blocklet.meta.did);
|
|
96
|
+
const uploadLogoFaviconPrefix = (0, _urlJoin.default)(prefix, uploadPrefix, 'favicon', blocklet.meta.did);
|
|
97
|
+
const openUploader = uploaderPrefix => {
|
|
98
|
+
if (!hasPermission) {
|
|
99
|
+
return;
|
|
71
100
|
}
|
|
72
|
-
|
|
101
|
+
setApiPathProps({
|
|
102
|
+
uploader: uploaderPrefix,
|
|
103
|
+
disableMediaKitPrefix: true
|
|
104
|
+
});
|
|
105
|
+
uploaderLogoRef.current.open();
|
|
106
|
+
};
|
|
73
107
|
const {
|
|
74
108
|
did
|
|
75
109
|
} = blocklet.meta;
|
|
@@ -91,10 +125,6 @@ function BlockletEnvironment(_ref) {
|
|
|
91
125
|
const deletable = !customDelete || customDelete.value === 'yes';
|
|
92
126
|
const customLanguages = blocklet.environments.find(x => x.key === _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES);
|
|
93
127
|
const customUrl = blocklet.environments.find(x => x.key === _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL);
|
|
94
|
-
const customLogoSquare = blocklet.environments.find(x => x.key === _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE);
|
|
95
|
-
const customLogoRect = blocklet.environments.find(x => x.key === _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT);
|
|
96
|
-
const customLogoFavicon = blocklet.environments.find(x => x.key === _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON);
|
|
97
|
-
const customLogoDeprecated = blocklet.environments.find(x => x.key === _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO);
|
|
98
128
|
const copyrightOwner = blocklet.environments.find(x => x.key === _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER);
|
|
99
129
|
const copyrightYear = blocklet.environments.find(x => x.key === _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR);
|
|
100
130
|
const configurableEnvs = [{
|
|
@@ -109,22 +139,6 @@ function BlockletEnvironment(_ref) {
|
|
|
109
139
|
key: _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,
|
|
110
140
|
description: t('blocklet.config.appUrl'),
|
|
111
141
|
value: customUrl ? customUrl.value : ''
|
|
112
|
-
}, {
|
|
113
|
-
key: _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE,
|
|
114
|
-
description: t('blocklet.config.logoSquare'),
|
|
115
|
-
value: customLogoSquare ? customLogoSquare.value : ''
|
|
116
|
-
}, {
|
|
117
|
-
key: _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT,
|
|
118
|
-
description: t('blocklet.config.logoRect'),
|
|
119
|
-
value: customLogoRect ? customLogoRect.value : ''
|
|
120
|
-
}, {
|
|
121
|
-
key: _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON,
|
|
122
|
-
description: t('blocklet.config.logoFavicon'),
|
|
123
|
-
value: customLogoFavicon ? customLogoFavicon.value : ''
|
|
124
|
-
}, {
|
|
125
|
-
key: _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO,
|
|
126
|
-
description: t('blocklet.config.logo'),
|
|
127
|
-
value: customLogoDeprecated ? customLogoDeprecated.value : ''
|
|
128
142
|
}, {
|
|
129
143
|
key: _constant2.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,
|
|
130
144
|
description: t('blocklet.config.copyrightOwner'),
|
|
@@ -155,7 +169,7 @@ function BlockletEnvironment(_ref) {
|
|
|
155
169
|
} = e.target;
|
|
156
170
|
const {
|
|
157
171
|
blocklet: data
|
|
158
|
-
} = await
|
|
172
|
+
} = await api.configPublicToStore({
|
|
159
173
|
input: {
|
|
160
174
|
did: blocklet.meta.did,
|
|
161
175
|
publicToStore: checked
|
|
@@ -187,7 +201,7 @@ function BlockletEnvironment(_ref) {
|
|
|
187
201
|
setLoading(true);
|
|
188
202
|
const {
|
|
189
203
|
blocklet: data
|
|
190
|
-
} = await
|
|
204
|
+
} = await api.configBlocklet({
|
|
191
205
|
input: {
|
|
192
206
|
did: blocklet.meta.did,
|
|
193
207
|
configs: params
|
|
@@ -211,7 +225,7 @@ function BlockletEnvironment(_ref) {
|
|
|
211
225
|
} = e.target;
|
|
212
226
|
const {
|
|
213
227
|
blocklet: data
|
|
214
|
-
} = await
|
|
228
|
+
} = await api.configBlocklet({
|
|
215
229
|
input: {
|
|
216
230
|
did: blocklet.meta.did,
|
|
217
231
|
configs: [{
|
|
@@ -236,7 +250,7 @@ function BlockletEnvironment(_ref) {
|
|
|
236
250
|
try {
|
|
237
251
|
setLoading(true);
|
|
238
252
|
const corsAllowedOrigins = newValue.length ? newValue : ['__none__'];
|
|
239
|
-
await
|
|
253
|
+
await api.updateRoutingSite({
|
|
240
254
|
input: {
|
|
241
255
|
id: site.id,
|
|
242
256
|
corsAllowedOrigins,
|
|
@@ -259,7 +273,7 @@ function BlockletEnvironment(_ref) {
|
|
|
259
273
|
try {
|
|
260
274
|
const {
|
|
261
275
|
blocklet: data
|
|
262
|
-
} = await
|
|
276
|
+
} = await api.configBlocklet({
|
|
263
277
|
input: {
|
|
264
278
|
did: blocklet.meta.did,
|
|
265
279
|
configs: [{
|
|
@@ -275,6 +289,11 @@ function BlockletEnvironment(_ref) {
|
|
|
275
289
|
setLoading(false);
|
|
276
290
|
}
|
|
277
291
|
};
|
|
292
|
+
const uploaderStyle = {
|
|
293
|
+
'&::after': {
|
|
294
|
+
content: "\"".concat(t('common.switch'), "\"")
|
|
295
|
+
}
|
|
296
|
+
};
|
|
278
297
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Div, _objectSpread(_objectSpread({}, rest), {}, {
|
|
279
298
|
children: [configurableEnvs.map(item => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
280
299
|
className: "config-form",
|
|
@@ -294,6 +313,95 @@ function BlockletEnvironment(_ref) {
|
|
|
294
313
|
onSubmit: value => onSubmitConfig(item.key, value)
|
|
295
314
|
})]
|
|
296
315
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
316
|
+
className: "config-form",
|
|
317
|
+
component: _Divider.default,
|
|
318
|
+
my: 3
|
|
319
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
320
|
+
className: "config-label",
|
|
321
|
+
fontSize: 14,
|
|
322
|
+
mb: 1,
|
|
323
|
+
sx: {
|
|
324
|
+
flexGrow: 0,
|
|
325
|
+
width: 'auto'
|
|
326
|
+
},
|
|
327
|
+
children: t('blocklet.config.logoSquare')
|
|
328
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
329
|
+
className: (0, _classnames.default)('uploader-wrapper', hasPermission && 'enabled'),
|
|
330
|
+
sx: uploaderStyle,
|
|
331
|
+
onClick: () => openUploader(uploadLogoPrefix),
|
|
332
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
333
|
+
sx: {
|
|
334
|
+
height: 80,
|
|
335
|
+
width: 80
|
|
336
|
+
},
|
|
337
|
+
variant: "square",
|
|
338
|
+
alt: "Blocklet Logo",
|
|
339
|
+
src: logoUrl
|
|
340
|
+
})
|
|
341
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
342
|
+
className: "config-label",
|
|
343
|
+
fontSize: 14,
|
|
344
|
+
mt: 4,
|
|
345
|
+
children: t('blocklet.config.logoRect')
|
|
346
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
347
|
+
mb: 1.5,
|
|
348
|
+
className: "config-desc",
|
|
349
|
+
children: t('blocklet.config.logoRectDesc')
|
|
350
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
351
|
+
className: (0, _classnames.default)('uploader-wrapper', hasPermission && 'enabled'),
|
|
352
|
+
sx: uploaderStyle,
|
|
353
|
+
onClick: () => openUploader(uploadLogoRectPrefix),
|
|
354
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
355
|
+
alt: "Blocklet Rect Logo",
|
|
356
|
+
src: rectLogoUrl,
|
|
357
|
+
style: {
|
|
358
|
+
height: '80px'
|
|
359
|
+
}
|
|
360
|
+
})
|
|
361
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
362
|
+
className: "config-label",
|
|
363
|
+
fontSize: 14,
|
|
364
|
+
mt: 4,
|
|
365
|
+
children: t('blocklet.config.logoFavicon')
|
|
366
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
367
|
+
mb: 1.5,
|
|
368
|
+
className: "config-desc",
|
|
369
|
+
children: t('blocklet.config.logoFaviconDesc')
|
|
370
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
371
|
+
sx: {
|
|
372
|
+
display: 'inline-flex',
|
|
373
|
+
cursor: hasPermission ? 'pointer' : 'default'
|
|
374
|
+
},
|
|
375
|
+
onClick: () => openUploader(uploadLogoFaviconPrefix),
|
|
376
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
377
|
+
variant: "square",
|
|
378
|
+
sx: {
|
|
379
|
+
width: 20,
|
|
380
|
+
height: 20
|
|
381
|
+
},
|
|
382
|
+
alt: "Blocklet Favicon Logo",
|
|
383
|
+
src: faviconUrl
|
|
384
|
+
})
|
|
385
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(UploaderComponent, {
|
|
386
|
+
id: "\u200Buploader-logo",
|
|
387
|
+
ref: uploaderLogoRef,
|
|
388
|
+
popup: true,
|
|
389
|
+
onUploadFinish: () => {
|
|
390
|
+
uploaderLogoRef.current.close();
|
|
391
|
+
},
|
|
392
|
+
plugins: [],
|
|
393
|
+
apiPathProps: apiPathProps,
|
|
394
|
+
coreProps: {
|
|
395
|
+
restrictions: {
|
|
396
|
+
allowedFileTypes: ['image/*', '.jpg', '.jpeg', '.png', '.gif', '.svg'],
|
|
397
|
+
maxFileSize: 1024 * 1024 * 10,
|
|
398
|
+
maxNumberOfFiles: 1
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
tusProps: {
|
|
402
|
+
headers: getSessionInHeader
|
|
403
|
+
}
|
|
404
|
+
}, "uploader-logo"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
297
405
|
className: "config-form",
|
|
298
406
|
children: whoCanAccess === 'all' && blocklet.source === 'registry' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
299
407
|
className: "config-item",
|
|
@@ -490,4 +598,4 @@ BlockletEnvironment.defaultProps = {
|
|
|
490
598
|
onUpdate: () => {},
|
|
491
599
|
hasPermission: false
|
|
492
600
|
};
|
|
493
|
-
const Div = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: 24px;\n .config-form {\n flex-grow: 1;\n overflow-y: auto;\n ", " {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n
|
|
601
|
+
const Div = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: 24px;\n .config-form {\n flex-grow: 1;\n overflow-y: auto;\n ", " {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n }\n }\n\n .config-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 16px 0;\n }\n\n .config-label {\n font-weight: bold;\n }\n\n .config-desc {\n font-weight: normal;\n font-size: 12px;\n color: #666;\n }\n\n .form-item {\n margin-top: 0;\n }\n\n .uploader-wrapper {\n display: inline-flex;\n position: relative;\n font-size: 0px;\n &.enabled {\n cursor: pointer;\n }\n &::after {\n display: none;\n }\n &.enabled::after {\n display: block;\n opacity: 0;\n position: absolute;\n bottom: 0;\n background: rgba(0, 0, 0, 0.2);\n left: 0;\n right: 0;\n height: 2.2em;\n color: white;\n text-align: center;\n font-size: 12px;\n line-height: 2em;\n transition: opacity 0.3s ease;\n }\n &:hover::after {\n opacity: 1;\n }\n }\n"])), props => props.theme.breakpoints.down('md'));
|
|
@@ -592,7 +592,7 @@ function CreateRelease(_ref2) {
|
|
|
592
592
|
maxNumberOfFiles: 1
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
}, "uploader-
|
|
595
|
+
}, "uploader-logo"), /*#__PURE__*/(0, _jsxRuntime.jsx)(UploaderComponent, {
|
|
596
596
|
id: "\u200Buploader-screenshot",
|
|
597
597
|
ref: uploaderScreenshotRef,
|
|
598
598
|
popup: true,
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _material = require("@mui/material");
|
|
9
|
+
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
10
|
+
var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
11
|
+
var _switchControl = _interopRequireDefault(require("../component/switch-control"));
|
|
12
|
+
var _blockletStorage = require("../../contexts/blocklet-storage");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
19
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
|
+
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); } /**
|
|
21
|
+
* @description
|
|
22
|
+
* @param {{
|
|
23
|
+
* style: import('react').CSSProperties
|
|
24
|
+
* }} {...rest}
|
|
25
|
+
* @return {*}
|
|
26
|
+
*/
|
|
27
|
+
function AutoBackup(_ref) {
|
|
28
|
+
let rest = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
29
|
+
const {
|
|
30
|
+
t
|
|
31
|
+
} = (0, _context.useLocaleContext)();
|
|
32
|
+
const {
|
|
33
|
+
autoBackup,
|
|
34
|
+
updateAutoBackup
|
|
35
|
+
} = (0, _blockletStorage.useBlockletStorageContext)();
|
|
36
|
+
const configAutoBackup = async () => {
|
|
37
|
+
try {
|
|
38
|
+
const enabled = !autoBackup.enabled;
|
|
39
|
+
await updateAutoBackup({
|
|
40
|
+
enabled
|
|
41
|
+
});
|
|
42
|
+
_Toast.default.success(enabled ? t('storage.spaces.autoBackup.enabled') : t('storage.spaces.autoBackup.disabled'));
|
|
43
|
+
} catch (error) {
|
|
44
|
+
_Toast.default.error(error.message);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_switchControl.default, {
|
|
48
|
+
checked: Boolean(autoBackup === null || autoBackup === void 0 ? void 0 : autoBackup.enabled),
|
|
49
|
+
onChange: configAutoBackup,
|
|
50
|
+
name: "enableWelcomePage",
|
|
51
|
+
labelProps: {
|
|
52
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
53
|
+
marginRight: "8px",
|
|
54
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
55
|
+
children: t('storage.spaces.autoBackup.title')
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
},
|
|
59
|
+
style: _objectSpread({}, rest.style)
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
AutoBackup.propTypes = {};
|
|
63
|
+
var _default = AutoBackup;
|
|
64
|
+
exports.default = _default;
|
|
@@ -15,6 +15,7 @@ var _blocklet = require("../../contexts/blocklet");
|
|
|
15
15
|
var _node = require("../../contexts/node");
|
|
16
16
|
var _diskInfo = _interopRequireDefault(require("../disk-info"));
|
|
17
17
|
var _blockletStorage = require("../../contexts/blocklet-storage");
|
|
18
|
+
var _autoBackup = _interopRequireDefault(require("./auto-backup"));
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
21
|
/**
|
|
@@ -76,7 +77,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
76
77
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
77
78
|
fontSize: "1.2rem",
|
|
78
79
|
fontWeight: "bold",
|
|
80
|
+
flexGrow: 1,
|
|
79
81
|
children: t('storage.spaces.connected.title')
|
|
82
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_autoBackup.default, {
|
|
83
|
+
style: {
|
|
84
|
+
marginRight: '32px'
|
|
85
|
+
}
|
|
80
86
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_connectTo.default, {})]
|
|
81
87
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
82
88
|
children: shouldShowLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
@@ -17,6 +17,7 @@ var _useSpaceGateways = _interopRequireDefault(require("../hooks/use-space-gatew
|
|
|
17
17
|
var _node = require("./node");
|
|
18
18
|
var _useBackupProgress = _interopRequireDefault(require("../hooks/use-backup-progress"));
|
|
19
19
|
var _useBackups = _interopRequireDefault(require("../hooks/use-backups"));
|
|
20
|
+
var _useAutoBackup = require("../hooks/use-auto-backup");
|
|
20
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
23
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -26,6 +27,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
26
27
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
27
28
|
* @typedef {import('../blocklet/storage/connected').SpaceGateway} SpaceGateway
|
|
28
29
|
* @typedef {import('@abtnode/client').Backup} Backup
|
|
30
|
+
* @typedef {import('@abtnode/client').AutoBackup} AutoBackup
|
|
29
31
|
*/ /**
|
|
30
32
|
* @typedef {{
|
|
31
33
|
* spaceGateways: SpaceGateway[],
|
|
@@ -36,12 +38,14 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
36
38
|
* refreshSpaceGateways: () => void,
|
|
37
39
|
* spaceGatewaysLoading: boolean,
|
|
38
40
|
* spaceGatewayIsSelected: (spaceGateway: SpaceGateway) => boolean,
|
|
41
|
+
* updateAutoBackup: (autoBackup: { enabled: boolean }) => Promise<void>,
|
|
39
42
|
*
|
|
40
43
|
* backupEndpoint: string,
|
|
41
44
|
* backupProgress: any,
|
|
42
45
|
* backups: Backup[],
|
|
43
46
|
* backupsLoading: boolean,
|
|
44
47
|
* refreshBackupEndpoint: () => void,
|
|
48
|
+
* autoBackup: AutoBackup,
|
|
45
49
|
* }} BlockletStorageContextType
|
|
46
50
|
*/ /** @type {import('react').Context<BlockletStorageContextType>} */
|
|
47
51
|
const BlockletStorageContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
@@ -89,6 +93,10 @@ function BlockletStorageProvider(_ref) {
|
|
|
89
93
|
setLoading: setBackupsLoading
|
|
90
94
|
});
|
|
91
95
|
const [selectedSpaceGateway, setSelectedSpaceGateway] = (0, _react.useState)(spaceGateways === null || spaceGateways === void 0 ? void 0 : spaceGateways.find(x => x.endpoint === backupEndpoint));
|
|
96
|
+
const [autoBackupRefresh, setAutoBackupRefresh] = (0, _react.useState)(false);
|
|
97
|
+
const autoBackup = (0, _useAutoBackup.useAutoBackup)({
|
|
98
|
+
deps: [autoBackupRefresh]
|
|
99
|
+
});
|
|
92
100
|
|
|
93
101
|
/**
|
|
94
102
|
* @description
|
|
@@ -183,9 +191,26 @@ function BlockletStorageProvider(_ref) {
|
|
|
183
191
|
* @param {SpaceGateway} spaceGateway
|
|
184
192
|
*/
|
|
185
193
|
const spaceGatewayIsSelected = spaceGateway => (spaceGateway === null || spaceGateway === void 0 ? void 0 : spaceGateway.endpoint) === backupEndpoint;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @description
|
|
197
|
+
* @param {AutoBackup} value
|
|
198
|
+
*/
|
|
199
|
+
const updateAutoBackup = async value => {
|
|
200
|
+
await api.updateAutoBackup({
|
|
201
|
+
input: {
|
|
202
|
+
did: blocklet.meta.did,
|
|
203
|
+
autoBackup: value
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
refreshAutoBackup();
|
|
207
|
+
};
|
|
186
208
|
const refreshBackupEndpoint = () => {
|
|
187
209
|
setBackupEndpointRefresh(p => !p);
|
|
188
210
|
};
|
|
211
|
+
const refreshAutoBackup = () => {
|
|
212
|
+
setAutoBackupRefresh(x => !x);
|
|
213
|
+
};
|
|
189
214
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Provider, {
|
|
190
215
|
value: {
|
|
191
216
|
spaceGateways,
|
|
@@ -196,11 +221,13 @@ function BlockletStorageProvider(_ref) {
|
|
|
196
221
|
refreshSpaceGateways,
|
|
197
222
|
spaceGatewaysLoading,
|
|
198
223
|
spaceGatewayIsSelected,
|
|
224
|
+
updateAutoBackup,
|
|
199
225
|
backupEndpoint,
|
|
200
226
|
backupProgress,
|
|
201
227
|
backups,
|
|
202
228
|
backupsLoading,
|
|
203
|
-
refreshBackupEndpoint
|
|
229
|
+
refreshBackupEndpoint,
|
|
230
|
+
autoBackup
|
|
204
231
|
},
|
|
205
232
|
children: children
|
|
206
233
|
});
|
|
@@ -5,21 +5,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = useAppLogo;
|
|
7
7
|
var _urlJoin = _interopRequireDefault(require("url-join"));
|
|
8
|
+
var _constant = require("@blocklet/constant");
|
|
8
9
|
var _node = require("../contexts/node");
|
|
9
10
|
var _util = require("../util");
|
|
10
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
const getSearch = (blocklet, customLogo) => {
|
|
13
|
+
let search = '?v=';
|
|
14
|
+
if (customLogo) {
|
|
15
|
+
search += (0, _util.getLogoHash)(customLogo);
|
|
16
|
+
} else {
|
|
17
|
+
var _blocklet$meta;
|
|
18
|
+
search += "".concat(blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta = blocklet.meta) === null || _blocklet$meta === void 0 ? void 0 : _blocklet$meta.version).concat((0, _util.isInstalling)(blocklet === null || blocklet === void 0 ? void 0 : blocklet.status) ? '~' : '');
|
|
19
|
+
}
|
|
20
|
+
return search;
|
|
21
|
+
};
|
|
11
22
|
function useAppLogo(_ref) {
|
|
12
|
-
var _window$env
|
|
23
|
+
var _find, _find2, _find3, _window$env;
|
|
13
24
|
let {
|
|
14
25
|
blocklet
|
|
15
26
|
} = _ref;
|
|
16
27
|
const {
|
|
17
28
|
inService
|
|
18
29
|
} = (0, _node.useNodeContext)();
|
|
30
|
+
const customLogo = (_find = ((blocklet === null || blocklet === void 0 ? void 0 : blocklet.environments) || []).find(x => x.key === _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE)) === null || _find === void 0 ? void 0 : _find.value;
|
|
31
|
+
const customRectLogo = (_find2 = ((blocklet === null || blocklet === void 0 ? void 0 : blocklet.environments) || []).find(x => x.key === _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT)) === null || _find2 === void 0 ? void 0 : _find2.value;
|
|
32
|
+
const customFavicon = (_find3 = ((blocklet === null || blocklet === void 0 ? void 0 : blocklet.environments) || []).find(x => x.key === _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON)) === null || _find3 === void 0 ? void 0 : _find3.value;
|
|
19
33
|
const prefix = ((_window$env = window.env) === null || _window$env === void 0 ? void 0 : _window$env.apiPrefix) || '/';
|
|
20
|
-
const
|
|
21
|
-
const
|
|
34
|
+
const logoUrl = (0, _urlJoin.default)(prefix, "/blocklet/logo/".concat(inService ? '' : blocklet.meta.did), getSearch(blocklet, customLogo));
|
|
35
|
+
const rectLogoUrl = (0, _urlJoin.default)(prefix, "/blocklet/logo-rect/".concat(inService ? '' : blocklet.meta.did), getSearch(blocklet, customRectLogo));
|
|
36
|
+
const faviconUrl = (0, _urlJoin.default)(prefix, "/blocklet/logo-favicon/".concat(inService ? '' : blocklet.meta.did), getSearch(blocklet, customFavicon));
|
|
22
37
|
return {
|
|
23
|
-
logoUrl
|
|
38
|
+
logoUrl,
|
|
39
|
+
rectLogoUrl,
|
|
40
|
+
faviconUrl
|
|
24
41
|
};
|
|
25
42
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useAutoBackup = useAutoBackup;
|
|
7
|
+
var _ahooks = require("ahooks");
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _blocklet = require("../contexts/blocklet");
|
|
10
|
+
var _node = require("../contexts/node");
|
|
11
|
+
/* eslint-disable import/prefer-default-export */
|
|
12
|
+
|
|
13
|
+
function useAutoBackup() {
|
|
14
|
+
var _blocklet$meta2;
|
|
15
|
+
let {
|
|
16
|
+
deps
|
|
17
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
18
|
+
deps: []
|
|
19
|
+
};
|
|
20
|
+
/** @type {{ blocklet: import('@abtnode/client').BlockletState }} */
|
|
21
|
+
const {
|
|
22
|
+
blocklet
|
|
23
|
+
} = (0, _blocklet.useBlockletContext)();
|
|
24
|
+
/** @type {{api: import('@abtnode/client')}} */
|
|
25
|
+
const {
|
|
26
|
+
api
|
|
27
|
+
} = (0, _node.useNodeContext)();
|
|
28
|
+
const [autoBackup, setAutoBackup] = (0, _react.useState)(null);
|
|
29
|
+
(0, _ahooks.useAsyncEffect)(async () => {
|
|
30
|
+
var _blocklet$meta;
|
|
31
|
+
if (blocklet !== null && blocklet !== void 0 && (_blocklet$meta = blocklet.meta) !== null && _blocklet$meta !== void 0 && _blocklet$meta.did) {
|
|
32
|
+
const {
|
|
33
|
+
autoBackup: data
|
|
34
|
+
} = await api.getAutoBackup({
|
|
35
|
+
input: {
|
|
36
|
+
did: blocklet.meta.did
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
setAutoBackup(data);
|
|
40
|
+
}
|
|
41
|
+
}, [blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta2 = blocklet.meta) === null || _blocklet$meta2 === void 0 ? void 0 : _blocklet$meta2.did].concat(deps));
|
|
42
|
+
return autoBackup;
|
|
43
|
+
}
|
package/lib/locales/en.js
CHANGED
|
@@ -280,6 +280,7 @@ module.exports = {
|
|
|
280
280
|
succeeded: 'Succeeded',
|
|
281
281
|
subscription: 'Subscription',
|
|
282
282
|
support: 'Support',
|
|
283
|
+
switch: 'Switch',
|
|
283
284
|
team: 'Team',
|
|
284
285
|
the: 'The',
|
|
285
286
|
timeAgo: '{time} ago',
|
|
@@ -393,10 +394,11 @@ module.exports = {
|
|
|
393
394
|
name: 'Blocklet Name',
|
|
394
395
|
description: 'Blocklet Description',
|
|
395
396
|
sk: 'Secret key for the blocklet wallet',
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
logoFavicon: '
|
|
397
|
+
logoSquare: 'App Logo',
|
|
398
|
+
logoRect: 'Rect logo',
|
|
399
|
+
logoRectDesc: 'Usually displayed at the top of the page, default to app logo',
|
|
400
|
+
logoFavicon: 'Favicon',
|
|
401
|
+
logoFaviconDesc: "Usually displayed in the browser's address bar or tab page, default to app logo",
|
|
400
402
|
clusterSize: 'Instance count when run this blocklet in cluster mode',
|
|
401
403
|
copyrightOwner: 'Copyright Owner (Display in footer)',
|
|
402
404
|
copyrightYear: 'Copyright Year (Display in footer)',
|
|
@@ -1439,6 +1441,11 @@ module.exports = {
|
|
|
1439
1441
|
title: 'Backup',
|
|
1440
1442
|
records: 'Backup Records'
|
|
1441
1443
|
},
|
|
1444
|
+
autoBackup: {
|
|
1445
|
+
title: 'Auto backup',
|
|
1446
|
+
enabled: 'Automatic backup is on',
|
|
1447
|
+
disabled: 'Automatic backup is off'
|
|
1448
|
+
},
|
|
1442
1449
|
backupSuccessfully: 'Backup successfully',
|
|
1443
1450
|
restore: 'Restore',
|
|
1444
1451
|
restoreSuccessfully: 'Restore successfully',
|
package/lib/locales/zh.js
CHANGED
|
@@ -285,6 +285,7 @@ module.exports = {
|
|
|
285
285
|
succeeded: '成功',
|
|
286
286
|
subscription: '订阅',
|
|
287
287
|
support: '服务支持',
|
|
288
|
+
switch: '切换',
|
|
288
289
|
team: '团队',
|
|
289
290
|
the: '此',
|
|
290
291
|
timeAgo: '{time}前',
|
|
@@ -397,10 +398,11 @@ module.exports = {
|
|
|
397
398
|
name: '应用名称',
|
|
398
399
|
description: '应用描述',
|
|
399
400
|
sk: '应用账户私钥',
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
logoFavicon: '
|
|
401
|
+
logoSquare: '应用 Logo',
|
|
402
|
+
logoRect: '横版 Logo',
|
|
403
|
+
logoRectDesc: '通常显示在页面顶部,默认和应用 Logo 相同',
|
|
404
|
+
logoFavicon: 'Favicon',
|
|
405
|
+
logoFaviconDesc: '通常显示在浏览器的地址栏或标签页中,默认和应用 Logo 相同',
|
|
404
406
|
clusterSize: '以 Cluster 模式启动时的实例数量',
|
|
405
407
|
copyrightOwner: '版权所有者 (展示在页脚中)',
|
|
406
408
|
copyrightYear: '版权年份 (展示在页脚中)',
|
|
@@ -1443,6 +1445,11 @@ module.exports = {
|
|
|
1443
1445
|
title: '备份',
|
|
1444
1446
|
records: '备份记录'
|
|
1445
1447
|
},
|
|
1448
|
+
autoBackup: {
|
|
1449
|
+
title: '自动备份',
|
|
1450
|
+
enabled: '自动备份已开启',
|
|
1451
|
+
disabled: '自动备份已关闭'
|
|
1452
|
+
},
|
|
1446
1453
|
backupSuccessfully: '备份成功',
|
|
1447
1454
|
restore: '还原',
|
|
1448
1455
|
restoreSuccessfully: '还原成功',
|