@abtnode/ux 1.16.14-beta-963cb583 → 1.16.14-beta-7423f9ef
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/component/add.js +19 -1
- package/es/blocklet/storage/backups.js +15 -8
- package/es/locales/en.js +3 -2
- package/es/locales/zh.js +2 -1
- package/lib/blocklet/component/add.js +3 -3
- package/lib/blocklet/storage/backups.js +15 -8
- package/lib/locales/en.js +3 -2
- package/lib/locales/zh.js +2 -1
- package/package.json +15 -15
|
@@ -1115,6 +1115,7 @@ const DialogWrapper = styled(Dialog)`
|
|
|
1115
1115
|
padding-right: 0;
|
|
1116
1116
|
padding-bottom: 0;
|
|
1117
1117
|
}
|
|
1118
|
+
|
|
1118
1119
|
.MuiDialogActions-root {
|
|
1119
1120
|
padding: 16px 24px;
|
|
1120
1121
|
}
|
|
@@ -1127,8 +1128,8 @@ const TypographyWrapper = styled(Typography)`
|
|
|
1127
1128
|
height: 100%;
|
|
1128
1129
|
`;
|
|
1129
1130
|
const RightContent = styled.div`
|
|
1130
|
-
padding: 34px 24px 24px;
|
|
1131
1131
|
width: 100%;
|
|
1132
|
+
height: 100%;
|
|
1132
1133
|
display: flex;
|
|
1133
1134
|
flex-direction: column;
|
|
1134
1135
|
justify-content: flex-start;
|
|
@@ -1158,6 +1159,8 @@ const DialogContentWrapper = styled(DialogContentText)`
|
|
|
1158
1159
|
// mobile extra style
|
|
1159
1160
|
if (className === 'mobileStyle') {
|
|
1160
1161
|
return `
|
|
1162
|
+
height: 100%;
|
|
1163
|
+
|
|
1161
1164
|
& > div{
|
|
1162
1165
|
height: 100%;
|
|
1163
1166
|
}
|
|
@@ -1167,6 +1170,8 @@ const DialogContentWrapper = styled(DialogContentText)`
|
|
|
1167
1170
|
}
|
|
1168
1171
|
}
|
|
1169
1172
|
|
|
1173
|
+
|
|
1174
|
+
|
|
1170
1175
|
// content-panel
|
|
1171
1176
|
.root-header + div{
|
|
1172
1177
|
padding-top: 0;
|
|
@@ -1176,6 +1181,19 @@ const DialogContentWrapper = styled(DialogContentText)`
|
|
|
1176
1181
|
}
|
|
1177
1182
|
}
|
|
1178
1183
|
|
|
1184
|
+
header + div {
|
|
1185
|
+
padding-top: 0;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
header {
|
|
1189
|
+
.header-title {
|
|
1190
|
+
margin-left: 0;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
.header-title-name {
|
|
1194
|
+
max-width: 100% !important;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1179
1197
|
`;
|
|
1180
1198
|
}
|
|
1181
1199
|
return `
|
|
@@ -152,9 +152,14 @@ function SpacesBackupRecords({
|
|
|
152
152
|
customBodyRenderLite: index => {
|
|
153
153
|
const {
|
|
154
154
|
status,
|
|
155
|
-
message
|
|
155
|
+
message,
|
|
156
|
+
createdAt
|
|
156
157
|
} = backups?.[index] ?? {};
|
|
157
|
-
|
|
158
|
+
const timeoutError = isNull(status) && dayjs().diff(createdAt, 'hours') > 6;
|
|
159
|
+
const timeoutErrorMessage = timeoutError && t('common.timeoutError');
|
|
160
|
+
const pending = isNull(status) && !timeoutError;
|
|
161
|
+
const success = status === 0 && !timeoutError;
|
|
162
|
+
if (pending) {
|
|
158
163
|
return /*#__PURE__*/_jsxs(Typography, {
|
|
159
164
|
display: "inline-flex",
|
|
160
165
|
alignItems: "center",
|
|
@@ -167,10 +172,13 @@ function SpacesBackupRecords({
|
|
|
167
172
|
}), t('common.progress')]
|
|
168
173
|
});
|
|
169
174
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
175
|
+
if (success) {
|
|
176
|
+
return /*#__PURE__*/_jsx(Tag, {
|
|
177
|
+
type: "success",
|
|
178
|
+
children: t('common.succeeded')
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
174
182
|
display: "inline-flex",
|
|
175
183
|
alignItems: "center",
|
|
176
184
|
children: [/*#__PURE__*/_jsx(Tag, {
|
|
@@ -182,7 +190,7 @@ function SpacesBackupRecords({
|
|
|
182
190
|
alignItems: 'center',
|
|
183
191
|
flexShrink: 0
|
|
184
192
|
},
|
|
185
|
-
title: message,
|
|
193
|
+
title: message || timeoutErrorMessage,
|
|
186
194
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
187
195
|
children: /*#__PURE__*/_jsx(HelpOutlineIcon, {
|
|
188
196
|
style: {
|
|
@@ -194,7 +202,6 @@ function SpacesBackupRecords({
|
|
|
194
202
|
})
|
|
195
203
|
})]
|
|
196
204
|
});
|
|
197
|
-
return node;
|
|
198
205
|
}
|
|
199
206
|
}
|
|
200
207
|
}];
|
package/es/locales/en.js
CHANGED
|
@@ -160,7 +160,7 @@ module.exports = {
|
|
|
160
160
|
expires: 'Expires',
|
|
161
161
|
export: 'Export',
|
|
162
162
|
externalIp: 'External IP',
|
|
163
|
-
failed: '
|
|
163
|
+
failed: 'Failed',
|
|
164
164
|
filter: 'Log Filter',
|
|
165
165
|
fingerprint: 'Fingerprint',
|
|
166
166
|
finish: 'Finish',
|
|
@@ -311,7 +311,8 @@ module.exports = {
|
|
|
311
311
|
progress: 'In progress',
|
|
312
312
|
startTime: 'Start time',
|
|
313
313
|
endTime: 'End time',
|
|
314
|
-
selected: 'Selected'
|
|
314
|
+
selected: 'Selected',
|
|
315
|
+
timeoutError: 'Timeout error'
|
|
315
316
|
},
|
|
316
317
|
blocklet: {
|
|
317
318
|
external: 'External',
|
package/es/locales/zh.js
CHANGED
|
@@ -1117,9 +1117,9 @@ AddComponent.defaultProps = {
|
|
|
1117
1117
|
};
|
|
1118
1118
|
|
|
1119
1119
|
// FIXME: @zhanghan 下面代码中的 header:empty 用于修复 e2e-test 中的问题 core/webapp/cypress/e2e/3-blocklet-lifecycle.cy.js L70
|
|
1120
|
-
const DialogWrapper = (0, _styled.default)(_Dialog.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .MuiDialogContent-root {\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 0;\n }\n .MuiDialogActions-root {\n padding: 16px 24px;\n }\n header:empty {\n display: none;\n }\n"])));
|
|
1120
|
+
const DialogWrapper = (0, _styled.default)(_Dialog.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .MuiDialogContent-root {\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 0;\n }\n\n .MuiDialogActions-root {\n padding: 16px 24px;\n }\n header:empty {\n display: none;\n }\n"])));
|
|
1121
1121
|
const TypographyWrapper = (0, _styled.default)(_Typography.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n"])));
|
|
1122
|
-
const RightContent = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
1122
|
+
const RightContent = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n\n .bottom-button {\n min-width: 200px;\n }\n\n // blocklet-select-side\n aside {\n width: 140px;\n }\n"])));
|
|
1123
1123
|
const isMobileDialogContent = props => {
|
|
1124
1124
|
if (props.isMobile) {
|
|
1125
1125
|
return "\n height: calc(100vh - 56px - 64px - 48px);\n ";
|
|
@@ -1132,7 +1132,7 @@ const DialogContentWrapper = (0, _styled.default)(_DialogContentText.default)(_t
|
|
|
1132
1132
|
} = _ref9;
|
|
1133
1133
|
// mobile extra style
|
|
1134
1134
|
if (className === 'mobileStyle') {
|
|
1135
|
-
return "\n & > div{\n height: 100%;\n }\n .root-header {\n .app-name-content {\n display: none;\n }\n }\n\n // content-panel\n .root-header + div{\n padding-top: 0;\n position: relative;\n & > div {\n padding-top: 0;\n }\n }\n\n ";
|
|
1135
|
+
return "\n height: 100%;\n\n & > div{\n height: 100%;\n }\n .root-header {\n .app-name-content {\n display: none;\n }\n }\n\n\n\n // content-panel\n .root-header + div{\n padding-top: 0;\n position: relative;\n & > div {\n padding-top: 0;\n }\n }\n\n header + div {\n padding-top: 0;\n }\n\n header {\n .header-title {\n margin-left: 0;\n }\n\n .header-title-name {\n max-width: 100% !important;\n }\n }\n ";
|
|
1136
1136
|
}
|
|
1137
1137
|
return "\n height: 72vh;\n position: relative;\n .root-header {\n z-index: auto !important;\n position: fixed !important;\n }\n & > div {\n height: 100%;\n width: 100%;\n max-width: 100%;\n & > div {\n max-height: unset !important;\n max-width: 100%;\n & > div {\n // left-panel\n &:first-child {\n padding-top: 0;\n // padding-left: 0;\n width: 25%;\n min-width: 240px;\n & > div:first-child {\n display: none;\n }\n // step\n & > div:last-child {\n // margin-top: 32px;\n margin-top: 0;\n }\n }\n // right-panel\n &:last-child {\n padding-top: 0;\n padding-right: 24px;\n overflow-y: auto;\n .app-content {\n padding: 0 0 24px 0;\n }\n .button-container {\n padding-right: 0;\n }\n }\n }\n }\n }\n\n ";
|
|
1138
1138
|
}, props => isMobileDialogContent(props), props => isMobileDialogContent(props));
|
|
@@ -172,9 +172,14 @@ function SpacesBackupRecords(_ref2) {
|
|
|
172
172
|
var _backups$index;
|
|
173
173
|
const {
|
|
174
174
|
status,
|
|
175
|
-
message
|
|
175
|
+
message,
|
|
176
|
+
createdAt
|
|
176
177
|
} = (_backups$index = backups === null || backups === void 0 ? void 0 : backups[index]) !== null && _backups$index !== void 0 ? _backups$index : {};
|
|
177
|
-
|
|
178
|
+
const timeoutError = (0, _lodash.isNull)(status) && (0, _dayjs.default)().diff(createdAt, 'hours') > 6;
|
|
179
|
+
const timeoutErrorMessage = timeoutError && t('common.timeoutError');
|
|
180
|
+
const pending = (0, _lodash.isNull)(status) && !timeoutError;
|
|
181
|
+
const success = status === 0 && !timeoutError;
|
|
182
|
+
if (pending) {
|
|
178
183
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
179
184
|
display: "inline-flex",
|
|
180
185
|
alignItems: "center",
|
|
@@ -187,10 +192,13 @@ function SpacesBackupRecords(_ref2) {
|
|
|
187
192
|
}), t('common.progress')]
|
|
188
193
|
});
|
|
189
194
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
195
|
+
if (success) {
|
|
196
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tag.default, {
|
|
197
|
+
type: "success",
|
|
198
|
+
children: t('common.succeeded')
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
194
202
|
display: "inline-flex",
|
|
195
203
|
alignItems: "center",
|
|
196
204
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tag.default, {
|
|
@@ -202,7 +210,7 @@ function SpacesBackupRecords(_ref2) {
|
|
|
202
210
|
alignItems: 'center',
|
|
203
211
|
flexShrink: 0
|
|
204
212
|
},
|
|
205
|
-
title: message,
|
|
213
|
+
title: message || timeoutErrorMessage,
|
|
206
214
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Icon, {
|
|
207
215
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_HelpOutline.default, {
|
|
208
216
|
style: {
|
|
@@ -214,7 +222,6 @@ function SpacesBackupRecords(_ref2) {
|
|
|
214
222
|
})
|
|
215
223
|
})]
|
|
216
224
|
});
|
|
217
|
-
return node;
|
|
218
225
|
}
|
|
219
226
|
}
|
|
220
227
|
}];
|
package/lib/locales/en.js
CHANGED
|
@@ -162,7 +162,7 @@ module.exports = {
|
|
|
162
162
|
expires: 'Expires',
|
|
163
163
|
export: 'Export',
|
|
164
164
|
externalIp: 'External IP',
|
|
165
|
-
failed: '
|
|
165
|
+
failed: 'Failed',
|
|
166
166
|
filter: 'Log Filter',
|
|
167
167
|
fingerprint: 'Fingerprint',
|
|
168
168
|
finish: 'Finish',
|
|
@@ -313,7 +313,8 @@ module.exports = {
|
|
|
313
313
|
progress: 'In progress',
|
|
314
314
|
startTime: 'Start time',
|
|
315
315
|
endTime: 'End time',
|
|
316
|
-
selected: 'Selected'
|
|
316
|
+
selected: 'Selected',
|
|
317
|
+
timeoutError: 'Timeout error'
|
|
317
318
|
},
|
|
318
319
|
blocklet: {
|
|
319
320
|
external: 'External',
|
package/lib/locales/zh.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.14-beta-
|
|
3
|
+
"version": "1.16.14-beta-7423f9ef",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -27,23 +27,23 @@
|
|
|
27
27
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@abtnode/auth": "1.16.14-beta-
|
|
31
|
-
"@abtnode/constant": "1.16.14-beta-
|
|
32
|
-
"@abtnode/util": "1.16.14-beta-
|
|
30
|
+
"@abtnode/auth": "1.16.14-beta-7423f9ef",
|
|
31
|
+
"@abtnode/constant": "1.16.14-beta-7423f9ef",
|
|
32
|
+
"@abtnode/util": "1.16.14-beta-7423f9ef",
|
|
33
33
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
34
34
|
"@arcblock/did": "^1.18.89",
|
|
35
|
-
"@arcblock/did-connect": "^2.7.
|
|
35
|
+
"@arcblock/did-connect": "^2.7.6",
|
|
36
36
|
"@arcblock/did-motif": "^1.1.13",
|
|
37
|
-
"@arcblock/icons": "^2.7.
|
|
38
|
-
"@arcblock/nft-display": "2.7.
|
|
39
|
-
"@arcblock/react-hooks": "^2.7.
|
|
40
|
-
"@arcblock/terminal": "^2.7.
|
|
41
|
-
"@arcblock/ux": "^2.7.
|
|
42
|
-
"@blocklet/constant": "1.16.14-beta-
|
|
43
|
-
"@blocklet/launcher-layout": "2.1.
|
|
37
|
+
"@arcblock/icons": "^2.7.6",
|
|
38
|
+
"@arcblock/nft-display": "2.7.6",
|
|
39
|
+
"@arcblock/react-hooks": "^2.7.6",
|
|
40
|
+
"@arcblock/terminal": "^2.7.6",
|
|
41
|
+
"@arcblock/ux": "^2.7.6",
|
|
42
|
+
"@blocklet/constant": "1.16.14-beta-7423f9ef",
|
|
43
|
+
"@blocklet/launcher-layout": "2.1.93",
|
|
44
44
|
"@blocklet/list": "^0.12.25",
|
|
45
|
-
"@blocklet/meta": "1.16.14-beta-
|
|
46
|
-
"@blocklet/ui-react": "^2.7.
|
|
45
|
+
"@blocklet/meta": "1.16.14-beta-7423f9ef",
|
|
46
|
+
"@blocklet/ui-react": "^2.7.6",
|
|
47
47
|
"@emotion/react": "^11.10.4",
|
|
48
48
|
"@emotion/styled": "^11.10.4",
|
|
49
49
|
"@iconify/react": "^4.0.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"babel-plugin-inline-react-svg": "^1.1.2",
|
|
99
99
|
"glob": "^10.3.3"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "b26614028fa0b33cf8b6781c3b571b2a6055dfdd",
|
|
102
102
|
"exports": {
|
|
103
103
|
".": {
|
|
104
104
|
"import": "./es/index.js",
|