@blocklet/launcher-workflow 1.7.9 → 1.7.12
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 +63 -57
- package/package.json +8 -8
package/lib/purchase.js
CHANGED
|
@@ -267,63 +267,69 @@ function PurchasePage() {
|
|
|
267
267
|
}
|
|
268
268
|
}, t('common.redeem'));
|
|
269
269
|
|
|
270
|
-
return
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
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
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
270
|
+
return (
|
|
271
|
+
/*#__PURE__*/
|
|
272
|
+
// layout-fix-container for compatibility with lower versions of safari, do not remove this classNane
|
|
273
|
+
_react.default.createElement(Container, {
|
|
274
|
+
className: "layout-fix-container"
|
|
275
|
+
}, isEmbed && !isMobile && /*#__PURE__*/_react.default.createElement(_pageHeader.default, {
|
|
276
|
+
title: t('plan.title'),
|
|
277
|
+
subTitle: t('plan.subTitle')
|
|
278
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
279
|
+
className: "page-body body"
|
|
280
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
281
|
+
className: "page-body-article"
|
|
282
|
+
}, /*#__PURE__*/_react.default.createElement(_compactLayout.default, {
|
|
283
|
+
onBottomFix: type => setButtonInFix(type === 'fix'),
|
|
284
|
+
bottom: plans.length ? /*#__PURE__*/_react.default.createElement("div", {
|
|
285
|
+
className: "button-container container-padding ".concat(buttonInFix ? 'has-shadow' : '')
|
|
286
|
+
}, /*#__PURE__*/_react.default.createElement(RedeemButton, null), /*#__PURE__*/_react.default.createElement(PayButton, null)) : ''
|
|
287
|
+
}, (!isEmbed || isMobile) && /*#__PURE__*/_react.default.createElement(_pageHeader.default, {
|
|
288
|
+
title: t('plan.title'),
|
|
289
|
+
subTitle: t('plan.subTitle')
|
|
290
|
+
}), plans.length ? /*#__PURE__*/_react.default.createElement("div", {
|
|
291
|
+
className: "select-payment"
|
|
292
|
+
}, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
|
293
|
+
tabs: paymentTypes,
|
|
294
|
+
current: paymentType,
|
|
295
|
+
onChange: e => setPaymentType(e)
|
|
296
|
+
})) : '', /*#__PURE__*/_react.default.createElement("div", {
|
|
297
|
+
className: "select-plan small-select-plan-".concat(plans.length)
|
|
298
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
299
|
+
className: "selector-container container-padding"
|
|
300
|
+
}, plans.length ? plans.map(item => /*#__PURE__*/_react.default.createElement(_plan.default, {
|
|
301
|
+
key: item._id,
|
|
302
|
+
paymentType: paymentType,
|
|
303
|
+
onClick: () => selectPlan(item),
|
|
304
|
+
selected: plan && plan._id === item._id,
|
|
305
|
+
data: item
|
|
306
|
+
})) : /*#__PURE__*/_react.default.createElement(_Empty.default, null, t('plan.noPlan'))))))), /*#__PURE__*/_react.default.createElement(_Connect.default, {
|
|
307
|
+
open: paying && paymentType === 'crypto',
|
|
308
|
+
popup: true,
|
|
309
|
+
action: "purchase",
|
|
310
|
+
checkFn: createRequest().get,
|
|
311
|
+
onSuccess: handlePaid,
|
|
312
|
+
onClose: handleCloseAuthDialog,
|
|
313
|
+
checkTimeout: 60 * 5000,
|
|
314
|
+
extraParams: getPurchaseParams(),
|
|
315
|
+
webWalletUrl: (0, _utils.getWebWalletUrl)(),
|
|
316
|
+
showDownload: false,
|
|
317
|
+
locale: locale,
|
|
318
|
+
messages: {
|
|
319
|
+
title: t('purchase.dialog.title'),
|
|
320
|
+
scan: t('purchase.dialog.scan'),
|
|
321
|
+
confirm: t('purchase.dialog.confirm'),
|
|
322
|
+
success: t('purchase.dialog.success')
|
|
323
|
+
}
|
|
324
|
+
}), paymentInfo && /*#__PURE__*/_react.default.createElement(_checkout.default, {
|
|
325
|
+
clientSecret: paymentInfo.clientSecret,
|
|
326
|
+
orderId: paymentInfo.orderId,
|
|
327
|
+
userDid: userDid,
|
|
328
|
+
onComplete: handlePaid,
|
|
329
|
+
onCancel: handleCancelPay,
|
|
330
|
+
status: paymentInfo.status
|
|
331
|
+
}))
|
|
332
|
+
);
|
|
327
333
|
}
|
|
328
334
|
|
|
329
335
|
const Container = _styledComponents.default.div.withConfig({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/launcher-workflow",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.12",
|
|
4
4
|
"description": "Purchase components for Launcher UI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"react": ">=18.1.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@arcblock/did-connect": "^2.1.
|
|
41
|
-
"@arcblock/icons": "^2.1.
|
|
42
|
-
"@arcblock/license": "^2.1.
|
|
43
|
-
"@arcblock/ux": "^2.1.
|
|
44
|
-
"@blocklet/launcher-constant": "1.7.
|
|
45
|
-
"@blocklet/launcher-layout": "1.7.
|
|
40
|
+
"@arcblock/did-connect": "^2.1.10",
|
|
41
|
+
"@arcblock/icons": "^2.1.10",
|
|
42
|
+
"@arcblock/license": "^2.1.10",
|
|
43
|
+
"@arcblock/ux": "^2.1.10",
|
|
44
|
+
"@blocklet/launcher-constant": "1.7.12",
|
|
45
|
+
"@blocklet/launcher-layout": "1.7.12",
|
|
46
46
|
"@emotion/react": "^11.9.0",
|
|
47
47
|
"@emotion/styled": "^11.8.1",
|
|
48
48
|
"@mui/icons-material": "^5.6.2",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"babel-plugin-inline-react-svg": "^2.0.1",
|
|
74
74
|
"babel-plugin-styled-components": "^1.10.7"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "6a8aa085daf0524a115aca98aac3813581081e38"
|
|
77
77
|
}
|