@blocklet/launcher-workflow 1.7.77 → 1.7.78
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/purchase.js +52 -46
- package/package.json +5 -5
package/lib/purchase.js
CHANGED
|
@@ -39,6 +39,8 @@ var _pageHeader = _interopRequireDefault(require("@blocklet/launcher-layout/lib/
|
|
|
39
39
|
|
|
40
40
|
var _constant = require("@blocklet/launcher-util/lib/constant");
|
|
41
41
|
|
|
42
|
+
var _submit = _interopRequireDefault(require("@blocklet/launcher-ux/lib/hot-key/submit"));
|
|
43
|
+
|
|
42
44
|
var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
|
|
43
45
|
|
|
44
46
|
var _plan = _interopRequireDefault(require("./components/plan"));
|
|
@@ -271,53 +273,57 @@ function PurchasePage() {
|
|
|
271
273
|
className: "page-body body",
|
|
272
274
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
273
275
|
className: "page-body-article",
|
|
274
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
310
|
-
className: "selector-container container-padding",
|
|
311
|
-
children: plans.length ? plans.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_plan.default, {
|
|
312
|
-
paymentMethod: paymentMethod,
|
|
313
|
-
onClick: () => selectPlan(item),
|
|
314
|
-
selected: plan && plan._id === item._id,
|
|
315
|
-
data: item
|
|
316
|
-
}, item._id)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Empty.default, {
|
|
317
|
-
children: t('plan.noPlan')
|
|
276
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_submit.default, {
|
|
277
|
+
disabled: paying,
|
|
278
|
+
onConfirm: () => handlePay(paymentMethod),
|
|
279
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_compactLayout.default, {
|
|
280
|
+
onBottomFix: type => setButtonInFix(type === 'fix'),
|
|
281
|
+
bottom: plans.length ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
282
|
+
className: "button-container container-padding ".concat(buttonInFix ? 'has-shadow' : ''),
|
|
283
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
284
|
+
onClick: () => handleRedeem(),
|
|
285
|
+
variant: "outlined",
|
|
286
|
+
color: "primary",
|
|
287
|
+
style: {
|
|
288
|
+
marginRight: '24px'
|
|
289
|
+
},
|
|
290
|
+
children: t('common.redeem')
|
|
291
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Button.default, {
|
|
292
|
+
onClick: () => handlePay(paymentMethod),
|
|
293
|
+
disabled: paying,
|
|
294
|
+
variant: "contained",
|
|
295
|
+
color: "primary",
|
|
296
|
+
children: [paying && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Spinner.default, {
|
|
297
|
+
size: 14
|
|
298
|
+
}), paying ? t('common.paying') : t('common.purchase')]
|
|
299
|
+
})]
|
|
300
|
+
}) : '',
|
|
301
|
+
children: [(!isEmbed || isMobile) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_pageHeader.default, {
|
|
302
|
+
title: t('plan.title'),
|
|
303
|
+
subTitle: t('plan.subTitle'),
|
|
304
|
+
onClickBack: disabledBack.includes('purchase') ? '' : clickBack
|
|
305
|
+
}), plans.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
306
|
+
className: "select-payment",
|
|
307
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tabs.default, {
|
|
308
|
+
tabs: paymentTypes,
|
|
309
|
+
current: paymentMethod,
|
|
310
|
+
onChange: e => setPaymentType(e)
|
|
318
311
|
})
|
|
319
|
-
})
|
|
320
|
-
|
|
312
|
+
}) : '', /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
313
|
+
className: "select-plan small-select-plan-".concat(plans.length),
|
|
314
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
315
|
+
className: "selector-container container-padding",
|
|
316
|
+
children: plans.length ? plans.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_plan.default, {
|
|
317
|
+
paymentMethod: paymentMethod,
|
|
318
|
+
onClick: () => selectPlan(item),
|
|
319
|
+
selected: plan && plan._id === item._id,
|
|
320
|
+
data: item
|
|
321
|
+
}, item._id)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Empty.default, {
|
|
322
|
+
children: t('plan.noPlan')
|
|
323
|
+
})
|
|
324
|
+
})
|
|
325
|
+
})]
|
|
326
|
+
})
|
|
321
327
|
})
|
|
322
328
|
})
|
|
323
329
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Connect.default, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/launcher-workflow",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.78",
|
|
4
4
|
"description": "Purchase components for Launcher UI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@arcblock/icons": "^2.1.71",
|
|
42
42
|
"@arcblock/license": "^2.1.71",
|
|
43
43
|
"@arcblock/ux": "^2.1.71",
|
|
44
|
-
"@blocklet/launcher-layout": "1.7.
|
|
45
|
-
"@blocklet/launcher-util": "1.7.
|
|
46
|
-
"@blocklet/launcher-ux": "1.7.
|
|
44
|
+
"@blocklet/launcher-layout": "1.7.78",
|
|
45
|
+
"@blocklet/launcher-util": "1.7.78",
|
|
46
|
+
"@blocklet/launcher-ux": "1.7.78",
|
|
47
47
|
"@emotion/react": "^11.9.0",
|
|
48
48
|
"@emotion/styled": "^11.8.1",
|
|
49
49
|
"@mui/icons-material": "^5.6.2",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"babel-plugin-inline-react-svg": "^2.0.1",
|
|
75
75
|
"babel-plugin-styled-components": "^1.10.7"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "6ebb89ee4d166e18a343edfd2594cddc77828ce8"
|
|
78
78
|
}
|