@blocklet/launcher-workflow 1.5.61 → 1.5.62
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 +21 -5
- package/package.json +3 -3
package/lib/purchase.js
CHANGED
|
@@ -82,6 +82,7 @@ function PurchasePage() {
|
|
|
82
82
|
} = (0, _locale.useLocaleContext)();
|
|
83
83
|
const [paying, setPaying] = (0, _react.useState)(false);
|
|
84
84
|
const [paymentInfo, setPaymentInfo] = (0, _react.useState)(null);
|
|
85
|
+
const [buttonInFix, setButtonInFix] = (0, _react.useState)(false);
|
|
85
86
|
const [paymentType, setPaymentType] = (0, _react.useState)('crypto');
|
|
86
87
|
const routerPrefix = (0, _router.usePrefix)();
|
|
87
88
|
const userDid = query.get('userDid') || (0, _lodash.default)(session, 'user.did');
|
|
@@ -240,10 +241,24 @@ function PurchasePage() {
|
|
|
240
241
|
variant: "outlined",
|
|
241
242
|
color: "primary",
|
|
242
243
|
style: {
|
|
243
|
-
|
|
244
|
+
marginRight: '24px'
|
|
244
245
|
}
|
|
245
246
|
}, t('common.redeem'));
|
|
246
247
|
|
|
248
|
+
const bottomFix = type => {
|
|
249
|
+
switch (type) {
|
|
250
|
+
case 'fix':
|
|
251
|
+
setButtonInFix(true);
|
|
252
|
+
break;
|
|
253
|
+
|
|
254
|
+
case 'scroll':
|
|
255
|
+
setButtonInFix(false);
|
|
256
|
+
break;
|
|
257
|
+
|
|
258
|
+
default:
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
|
|
247
262
|
return /*#__PURE__*/_react.default.createElement(Container, null, isEmbed && /*#__PURE__*/_react.default.createElement(_pageHeader.default, {
|
|
248
263
|
title: t('plan.title'),
|
|
249
264
|
subTitle: t('plan.subTitle')
|
|
@@ -252,9 +267,10 @@ function PurchasePage() {
|
|
|
252
267
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
253
268
|
className: "page-body-article"
|
|
254
269
|
}, /*#__PURE__*/_react.default.createElement(_compactLayout.default, {
|
|
270
|
+
onBottomFix: bottomFix,
|
|
255
271
|
bottom: plans.length ? /*#__PURE__*/_react.default.createElement("div", {
|
|
256
|
-
className: "button-container"
|
|
257
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
272
|
+
className: "button-container container-padding ".concat(buttonInFix ? 'has-shadow' : '')
|
|
273
|
+
}, /*#__PURE__*/_react.default.createElement(RedeemButton, null), /*#__PURE__*/_react.default.createElement(PayButton, null)) : ''
|
|
258
274
|
}, !isEmbed && /*#__PURE__*/_react.default.createElement(_pageHeader.default, {
|
|
259
275
|
title: t('plan.title'),
|
|
260
276
|
subTitle: t('plan.subTitle')
|
|
@@ -267,7 +283,7 @@ function PurchasePage() {
|
|
|
267
283
|
})) : '', /*#__PURE__*/_react.default.createElement("div", {
|
|
268
284
|
className: "select-plan small-select-plan-".concat(plans.length)
|
|
269
285
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
270
|
-
className: "selector-container"
|
|
286
|
+
className: "selector-container container-padding"
|
|
271
287
|
}, plans.length ? plans.map(item => /*#__PURE__*/_react.default.createElement(_plan.default, {
|
|
272
288
|
key: item._id,
|
|
273
289
|
paymentType: paymentType,
|
|
@@ -308,7 +324,7 @@ const Center = _styledComponents.default.div.withConfig({
|
|
|
308
324
|
const Container = _styledComponents.default.div.withConfig({
|
|
309
325
|
displayName: "purchase__Container",
|
|
310
326
|
componentId: "sc-1knmtel-1"
|
|
311
|
-
})(["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;
|
|
327
|
+
})(["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 33px;", "{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;margin-top:0;}.page-body-article{position:absolute;left:0;top:0;width:100%;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:15px;padding-top:15px;> button{width:200px;}&.has-shadow{box-shadow:rgba(0,0,0,0.05) 0 0 4px;}}.select-body-item{cursor:pointer;transition:background-color ease 0.2s,border ease 0.2s;}.selected{border-color:", ";cursor:default;}.container-padding{padding-left:24px;padding-right:24px;}"], props => props.theme.breakpoints.down('sm'), props => props.theme.palette.primary.main);
|
|
312
328
|
|
|
313
329
|
const PaymentLabel = _styledComponents.default.div.withConfig({
|
|
314
330
|
displayName: "purchase__PaymentLabel",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/launcher-workflow",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.62",
|
|
4
4
|
"description": "Purchase components for Launcher UI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@arcblock/did-connect": "^1.16.40",
|
|
41
41
|
"@arcblock/icons": "^1.16.40",
|
|
42
42
|
"@arcblock/ux": "^1.16.40",
|
|
43
|
-
"@blocklet/launcher-layout": "1.5.
|
|
43
|
+
"@blocklet/launcher-layout": "1.5.62",
|
|
44
44
|
"@material-ui/core": "^4.12.3",
|
|
45
45
|
"@material-ui/icons": "^4.11.2",
|
|
46
46
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"babel-plugin-inline-react-svg": "^2.0.1",
|
|
67
67
|
"babel-plugin-styled-components": "^1.10.7"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "09b90c32667ccd867d6e1f263452d487f67b83ab"
|
|
70
70
|
}
|