@blocklet/launcher-workflow 1.5.18 → 1.5.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/locales/en.js +3 -2
- package/lib/locales/zh.js +3 -2
- package/lib/prepare.js +2 -2
- package/lib/purchase.js +23 -33
- package/package.json +3 -3
package/lib/locales/en.js
CHANGED
|
@@ -16,7 +16,7 @@ module.exports = {
|
|
|
16
16
|
},
|
|
17
17
|
plan: {
|
|
18
18
|
title: 'Select Blocklet Server Type',
|
|
19
|
-
subTitle: 'Please select Blocklet Server type
|
|
19
|
+
subTitle: 'Please select payment method and Blocklet Server type',
|
|
20
20
|
loadListFailed: 'Plan list load error',
|
|
21
21
|
paymentCredit: {
|
|
22
22
|
status: {
|
|
@@ -27,7 +27,8 @@ module.exports = {
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
useCrypto: 'Use ABT',
|
|
30
|
-
useFiat: 'Use Credit Card'
|
|
30
|
+
useFiat: 'Use Credit Card',
|
|
31
|
+
noPlan: 'No blocklet server available for purchase'
|
|
31
32
|
},
|
|
32
33
|
prepare: {
|
|
33
34
|
title: 'Naming Blocklet Server',
|
package/lib/locales/zh.js
CHANGED
|
@@ -16,7 +16,7 @@ module.exports = {
|
|
|
16
16
|
},
|
|
17
17
|
plan: {
|
|
18
18
|
title: '创建节点',
|
|
19
|
-
subTitle: '
|
|
19
|
+
subTitle: '请选择支付方式和节点型号',
|
|
20
20
|
loadListFailed: '加载节点类型列表出错',
|
|
21
21
|
paymentCredit: {
|
|
22
22
|
status: {
|
|
@@ -27,7 +27,8 @@ module.exports = {
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
useCrypto: 'ABT 支付',
|
|
30
|
-
useFiat: '信用卡支付'
|
|
30
|
+
useFiat: '信用卡支付',
|
|
31
|
+
noPlan: '没有可购买的节点类型'
|
|
31
32
|
},
|
|
32
33
|
prepare: {
|
|
33
34
|
title: '命名节点',
|
package/lib/prepare.js
CHANGED
|
@@ -202,7 +202,7 @@ function PreparePage() {
|
|
|
202
202
|
value: description,
|
|
203
203
|
labelWidth: 0
|
|
204
204
|
}), error.description && /*#__PURE__*/_react.default.createElement(_FormHelperText.default, null, error.description)))), /*#__PURE__*/_react.default.createElement("div", {
|
|
205
|
-
className: "
|
|
205
|
+
className: "botton-container"
|
|
206
206
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
207
207
|
disabled: !name.trim() || !description.trim(),
|
|
208
208
|
style: {
|
|
@@ -240,4 +240,4 @@ function PreparePage() {
|
|
|
240
240
|
const Container = _styledComponents.default.div.withConfig({
|
|
241
241
|
displayName: "prepare__Container",
|
|
242
242
|
componentId: "sc-1ddofcz-0"
|
|
243
|
-
})(["display:flex;flex-direction:column;width:100%;height:100%;.page-logo{display:flex;justify-content:center;margin-top:
|
|
243
|
+
})(["display:flex;flex-direction:column;width:100%;height:100%;.page-logo{display:flex;justify-content:center;margin-top:62px;", "{margin-top:48px;}}.inputs{display:flex;align-items:center;flex-direction:column;text-align:center;}.input-item{margin-top:24px;width:90%;max-width:343px;font-size:14px;input,textarea{font-size:14px;}}.botton-container{margin-top:24px;text-align:center;}"], props => props.theme.breakpoints.down('sm'));
|
package/lib/purchase.js
CHANGED
|
@@ -29,9 +29,11 @@ var _compactLayout = _interopRequireDefault(require("@blocklet/launcher-layout/l
|
|
|
29
29
|
|
|
30
30
|
var _Alert = _interopRequireDefault(require("@material-ui/lab/Alert"));
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _Empty = _interopRequireDefault(require("@arcblock/ux/lib/Empty"));
|
|
33
|
+
|
|
34
|
+
var _Tabs = _interopRequireDefault(require("@arcblock/ux/lib/Tabs"));
|
|
33
35
|
|
|
34
|
-
var
|
|
36
|
+
var _plan = _interopRequireDefault(require("./components/plan"));
|
|
35
37
|
|
|
36
38
|
var _pageHeader = _interopRequireDefault(require("./components/page-header"));
|
|
37
39
|
|
|
@@ -87,9 +89,11 @@ function PurchasePage() {
|
|
|
87
89
|
|
|
88
90
|
}, [paymentType, userDid]);
|
|
89
91
|
const paymentTypes = [{
|
|
90
|
-
|
|
92
|
+
label: t('plan.useCrypto'),
|
|
93
|
+
value: 'crypto'
|
|
91
94
|
}, {
|
|
92
|
-
|
|
95
|
+
label: t('plan.useFiat'),
|
|
96
|
+
value: 'fiat'
|
|
93
97
|
}];
|
|
94
98
|
const plansState = (0, _reactUse.useAsync)(async () => {
|
|
95
99
|
const {
|
|
@@ -149,10 +153,6 @@ function PurchasePage() {
|
|
|
149
153
|
setPaying(false);
|
|
150
154
|
};
|
|
151
155
|
|
|
152
|
-
const selectPaymentType = value => {
|
|
153
|
-
setPaymentType(value);
|
|
154
|
-
};
|
|
155
|
-
|
|
156
156
|
const selectPlan = value => {
|
|
157
157
|
setPlan(value);
|
|
158
158
|
};
|
|
@@ -244,39 +244,29 @@ function PurchasePage() {
|
|
|
244
244
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
245
245
|
className: "page-body-article"
|
|
246
246
|
}, /*#__PURE__*/_react.default.createElement(_compactLayout.default, {
|
|
247
|
-
bottom: /*#__PURE__*/_react.default.createElement("div", {
|
|
247
|
+
bottom: plans.length ? /*#__PURE__*/_react.default.createElement("div", {
|
|
248
248
|
className: "button-container"
|
|
249
|
-
}, /*#__PURE__*/_react.default.createElement(PayButton, null), /*#__PURE__*/_react.default.createElement(RedeemButton, null))
|
|
249
|
+
}, /*#__PURE__*/_react.default.createElement(PayButton, null), /*#__PURE__*/_react.default.createElement(RedeemButton, null)) : ''
|
|
250
250
|
}, !isEmbed && /*#__PURE__*/_react.default.createElement(_pageHeader.default, {
|
|
251
251
|
title: t('plan.title'),
|
|
252
252
|
subTitle: t('plan.subTitle')
|
|
253
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
253
|
+
}), plans.length ? /*#__PURE__*/_react.default.createElement("div", {
|
|
254
254
|
className: "select-payment"
|
|
255
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
flexWrap: 'nowrap'
|
|
261
|
-
}
|
|
262
|
-
}, paymentTypes.map(item => /*#__PURE__*/_react.default.createElement(_paymentType.default, {
|
|
263
|
-
key: item.name,
|
|
264
|
-
className: "".concat(paymentType === item.name ? 'selected' : ''),
|
|
265
|
-
type: item.name,
|
|
266
|
-
onClick: () => selectPaymentType(item.name)
|
|
267
|
-
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
255
|
+
}, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
|
256
|
+
tabs: paymentTypes,
|
|
257
|
+
current: paymentType,
|
|
258
|
+
onChange: e => setPaymentType(e)
|
|
259
|
+
})) : '', /*#__PURE__*/_react.default.createElement("div", {
|
|
268
260
|
className: "select-plan small-select-plan-".concat(plans.length)
|
|
269
261
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
270
|
-
className: "select-title"
|
|
271
|
-
}, t('common.serverType')), /*#__PURE__*/_react.default.createElement("div", {
|
|
272
262
|
className: "selector-container"
|
|
273
|
-
}, plans.map(item => /*#__PURE__*/_react.default.createElement(_plan.default, {
|
|
263
|
+
}, plans.length ? plans.map(item => /*#__PURE__*/_react.default.createElement(_plan.default, {
|
|
274
264
|
key: item._id,
|
|
275
265
|
paymentType: paymentType,
|
|
276
266
|
onClick: () => selectPlan(item),
|
|
277
267
|
className: "select-body-item ".concat(plan && plan._id === item._id ? 'selected' : ''),
|
|
278
268
|
data: item
|
|
279
|
-
}))))))), /*#__PURE__*/_react.default.createElement(_Connect.default, {
|
|
269
|
+
})) : /*#__PURE__*/_react.default.createElement(_Empty.default, null, t('plan.noPlan'))))))), /*#__PURE__*/_react.default.createElement(_Connect.default, {
|
|
280
270
|
open: paying && paymentType === 'crypto',
|
|
281
271
|
popup: true,
|
|
282
272
|
action: "purchase",
|
|
@@ -288,10 +278,10 @@ function PurchasePage() {
|
|
|
288
278
|
webWalletUrl: (0, _utils.getWebWalletUrl)(),
|
|
289
279
|
showDownload: false,
|
|
290
280
|
messages: {
|
|
291
|
-
title: t('
|
|
292
|
-
scan: t('
|
|
293
|
-
confirm: t('
|
|
294
|
-
success: t('
|
|
281
|
+
title: t('launch.dialog.title'),
|
|
282
|
+
scan: t('launch.dialog.scan'),
|
|
283
|
+
confirm: t('launch.dialog.confirm'),
|
|
284
|
+
success: t('launch.dialog.success')
|
|
295
285
|
}
|
|
296
286
|
}), paymentInfo && /*#__PURE__*/_react.default.createElement(_checkout.default, {
|
|
297
287
|
clientSecret: paymentInfo.clientSecret,
|
|
@@ -310,7 +300,7 @@ const Center = _styledComponents.default.div.withConfig({
|
|
|
310
300
|
const Container = _styledComponents.default.div.withConfig({
|
|
311
301
|
displayName: "purchase__Container",
|
|
312
302
|
componentId: "sc-1knmtel-1"
|
|
313
|
-
})(["display:flex;flex-direction:column;width:100%;height:100%;.select-payment{padding-top:
|
|
303
|
+
})(["display:flex;flex-direction:column;width:100%;height:100%;.select-payment{display:flex;justify-content:center;align-items:center;padding-top:30px;}.select-plan{margin:48px auto;", "{margin:30px auto;}&.small-select-plan-2{max-width:780px;}&.small-select-plan-0,&.small-select-plan-1{max-width:460px;}}.page-body{position:relative;flex:1;padding:0 24px;margin-top:0;}.page-body-article{position:absolute;left:24px;top:0;width:calc(100% - 48px);height:100%;overflow-y:auto;}.selector-container{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:24px;margin-top:18px;}.button-container{display:flex;justify-content:center;align-items:center;padding-bottom:16px;> button{width:200px;}}.select-body-item{cursor:pointer;transition:background-color ease 0.2s,border ease 0.2s;}@media screen and (max-width:600px){.page-body{padding:0 24px;}}.selected{border-color:", ";cursor:default;}"], props => props.theme.breakpoints.down('sm'), props => props.theme.palette.primary.main);
|
|
314
304
|
|
|
315
305
|
var _default = (0, _reactRouterDom.withRouter)(PurchasePage);
|
|
316
306
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/launcher-workflow",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.19",
|
|
4
4
|
"description": "Purchase components for Launcher UI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@arcblock/did-connect": "^1.16.30",
|
|
41
41
|
"@arcblock/ux": "^1.16.30",
|
|
42
|
-
"@blocklet/launcher-layout": "1.5.
|
|
42
|
+
"@blocklet/launcher-layout": "1.5.19",
|
|
43
43
|
"@material-ui/core": "^4.12.3",
|
|
44
44
|
"@material-ui/icons": "^4.11.2",
|
|
45
45
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"babel-plugin-inline-react-svg": "^2.0.1",
|
|
65
65
|
"babel-plugin-styled-components": "^1.10.7"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "1e84e32e17c49b8502f89cfc68aa5f4023afec54"
|
|
68
68
|
}
|