@blocklet/launcher-workflow 2.1.26 → 2.1.28
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 +2 -0
- package/lib/locales/zh.js +2 -0
- package/lib/purchase.js +14 -5
- package/package.json +11 -11
package/lib/locales/en.js
CHANGED
|
@@ -100,6 +100,8 @@ module.exports = {
|
|
|
100
100
|
},
|
|
101
101
|
purchase: {
|
|
102
102
|
pageTitle: 'Purchase Space',
|
|
103
|
+
noPlan: 'Select space to continue',
|
|
104
|
+
hasPlan: 'Continue with {name}',
|
|
103
105
|
selectSpaceHint: 'Already have dedicated space? Click here to select >',
|
|
104
106
|
morePlanPrompt: 'Flip the page to see more plans',
|
|
105
107
|
redeem: 'Select purchased space',
|
package/lib/locales/zh.js
CHANGED
|
@@ -102,6 +102,8 @@ module.exports = {
|
|
|
102
102
|
selectSpaceHint: '已有专用空间?点击这里选择 >',
|
|
103
103
|
morePlanPrompt: '翻页看更多方案',
|
|
104
104
|
redeem: '我已购买空间',
|
|
105
|
+
noPlan: '选择套餐以继续',
|
|
106
|
+
hasPlan: '选用{name}',
|
|
105
107
|
noProducts: '没有可购买的商品,请检查 PaymentKit 的配置',
|
|
106
108
|
serverlessNotSupported: '该应用被禁止能在单应用或者按需空间中运行,请选择专用空间',
|
|
107
109
|
dialog: {
|
package/lib/purchase.js
CHANGED
|
@@ -245,7 +245,9 @@ function PurchasePage(_ref) {
|
|
|
245
245
|
}
|
|
246
246
|
if (state.sessionId !== params.get('sessionId')) {
|
|
247
247
|
params.set('sessionId', state.sessionId);
|
|
248
|
-
setParams(params
|
|
248
|
+
setParams(params, {
|
|
249
|
+
replace: true
|
|
250
|
+
});
|
|
249
251
|
}
|
|
250
252
|
}, [state.sessionId]);
|
|
251
253
|
(0, _react.useEffect)(() => {
|
|
@@ -298,7 +300,9 @@ function PurchasePage(_ref) {
|
|
|
298
300
|
}
|
|
299
301
|
if (state.planId !== params.get('planId')) {
|
|
300
302
|
params.set('planId', state.planId);
|
|
301
|
-
setParams(params
|
|
303
|
+
setParams(params, {
|
|
304
|
+
replace: true
|
|
305
|
+
});
|
|
302
306
|
}
|
|
303
307
|
}, [state.planId]);
|
|
304
308
|
(0, _react.useEffect)(() => {
|
|
@@ -307,7 +311,9 @@ function PurchasePage(_ref) {
|
|
|
307
311
|
}
|
|
308
312
|
if (state.paymentMethod !== params.get('paymentMethod')) {
|
|
309
313
|
params.set('paymentMethod', state.paymentMethod);
|
|
310
|
-
setParams(params
|
|
314
|
+
setParams(params, {
|
|
315
|
+
replace: true
|
|
316
|
+
});
|
|
311
317
|
}
|
|
312
318
|
}, [state.paymentMethod]);
|
|
313
319
|
(0, _react.useEffect)(() => {
|
|
@@ -365,6 +371,7 @@ function PurchasePage(_ref) {
|
|
|
365
371
|
search: params.toString()
|
|
366
372
|
});
|
|
367
373
|
};
|
|
374
|
+
const plan = state.planId && state.plans ? state.plans.find(x => x._id === state.planId) : null;
|
|
368
375
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
|
|
369
376
|
embed: embed,
|
|
370
377
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_header.default, {
|
|
@@ -406,7 +413,9 @@ function PurchasePage(_ref) {
|
|
|
406
413
|
to: (0, _urlJoin.default)(routerPrefix, "/purchase/checkout?".concat(params.toString())),
|
|
407
414
|
className: "button-next",
|
|
408
415
|
variant: "contained",
|
|
409
|
-
children: t('
|
|
416
|
+
children: plan ? t('purchase.hasPlan', {
|
|
417
|
+
name: plan.name[locale]
|
|
418
|
+
}) : t('purchase.noPlan')
|
|
410
419
|
})]
|
|
411
420
|
}),
|
|
412
421
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -531,7 +540,7 @@ function PurchasePage(_ref) {
|
|
|
531
540
|
})]
|
|
532
541
|
});
|
|
533
542
|
}
|
|
534
|
-
const Container = (0, _styled.default)(_layout.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .container-inner {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n }\n\n .plan-list {\n display: flex;\n justify-content: center;\n align-items: center;\n\n @media (min-width: 900px) {\n margin-top: 20px;\n }\n\n @media (min-width: 680px) and (max-width: 899px) {\n justify-content: center;\n }\n\n .toc {\n min-width: 180px;\n margin-right: 20px;\n }\n\n button.splide__pagination__page.is-active {\n background: #9397a1;\n }\n }\n\n .splide__pagination-custom {\n bottom: -24px;\n }\n\n .footer {\n display: flex;\n justify-content: ", ";\n align-item: center;\n margin-top: auto;\n padding-top: 16px;\n\n > * {\n margin: 0 8px;\n ", " {\n margin: 0 16px;\n }\n }\n\n @media (max-width: ", "px) {\n flex-direction: column;\n align-items: center;\n }\n\n .footer-left {\n display: flex;\n gap: 16px;\n align-items: center;\n justify-content: space-between;\n\n .select-space {\n order: 1;\n color: #000;\n\n &:hover {\n text-decoration: underline !important;\n }\n }\n\n .redeem-button {\n order: 1;\n }\n\n @media (max-width: ", "px) {\n width: 100%;\n flex-direction: column;\n\n .redeem-button {\n width: 100%;\n order: 2;\n }\n }\n }\n\n .button-next {\n width: 200px;\n\n @media (max-width: ", "px) {\n width: 100%;\n margin-top: 20px;\n }\n }\n }\n"])), props => props.embed ? 'space-between' : 'flex-end', props => props.theme.breakpoints.up('md'), props => props.theme.breakpoints.values.sm, props => props.theme.breakpoints.values.sm, props => props.theme.breakpoints.values.sm);
|
|
543
|
+
const Container = (0, _styled.default)(_layout.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .container-inner {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n }\n\n .plan-list {\n display: flex;\n justify-content: center;\n align-items: center;\n\n @media (min-width: 900px) {\n margin-top: 20px;\n }\n\n @media (min-width: 680px) and (max-width: 899px) {\n justify-content: center;\n }\n\n .toc {\n min-width: 180px;\n margin-right: 20px;\n }\n\n button.splide__pagination__page.is-active {\n background: #9397a1;\n }\n }\n\n .splide__pagination-custom {\n bottom: -24px;\n }\n\n .footer {\n display: flex;\n justify-content: ", ";\n align-item: center;\n margin-top: auto;\n padding-top: 16px;\n\n > * {\n margin: 0 8px;\n ", " {\n margin: 0 16px;\n }\n }\n\n @media (max-width: ", "px) {\n flex-direction: column;\n align-items: center;\n }\n\n .footer-left {\n display: flex;\n gap: 16px;\n align-items: center;\n justify-content: space-between;\n\n .select-space {\n order: 1;\n color: #000;\n\n &:hover {\n text-decoration: underline !important;\n }\n }\n\n .redeem-button {\n order: 1;\n }\n\n @media (max-width: ", "px) {\n width: 100%;\n flex-direction: column;\n\n .redeem-button {\n width: 100%;\n order: 2;\n }\n }\n }\n\n .button-next {\n min-width: 200px;\n\n @media (max-width: ", "px) {\n width: 100%;\n margin-top: 20px;\n }\n }\n }\n"])), props => props.embed ? 'space-between' : 'flex-end', props => props.theme.breakpoints.up('md'), props => props.theme.breakpoints.values.sm, props => props.theme.breakpoints.values.sm, props => props.theme.breakpoints.values.sm);
|
|
535
544
|
PurchasePage.propTypes = {
|
|
536
545
|
disableBack: _propTypes.default.bool
|
|
537
546
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/launcher-workflow",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.28",
|
|
4
4
|
"description": "Purchase components for Launcher UI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"react": ">=18.1.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@arcblock/did-connect": "^2.5.
|
|
39
|
-
"@arcblock/icons": "^2.5.
|
|
40
|
-
"@arcblock/license": "^2.5.
|
|
41
|
-
"@arcblock/react-hooks": "^2.5.
|
|
42
|
-
"@arcblock/ux": "^2.5.
|
|
43
|
-
"@blocklet/launcher-layout": "2.1.
|
|
44
|
-
"@blocklet/launcher-util": "2.1.
|
|
45
|
-
"@blocklet/launcher-ux": "2.1.
|
|
46
|
-
"@blocklet/payment": "^1.12.
|
|
38
|
+
"@arcblock/did-connect": "^2.5.53",
|
|
39
|
+
"@arcblock/icons": "^2.5.53",
|
|
40
|
+
"@arcblock/license": "^2.5.53",
|
|
41
|
+
"@arcblock/react-hooks": "^2.5.53",
|
|
42
|
+
"@arcblock/ux": "^2.5.53",
|
|
43
|
+
"@blocklet/launcher-layout": "2.1.28",
|
|
44
|
+
"@blocklet/launcher-util": "2.1.28",
|
|
45
|
+
"@blocklet/launcher-ux": "2.1.28",
|
|
46
|
+
"@blocklet/payment": "^1.12.15",
|
|
47
47
|
"@emotion/react": "^11.11.0",
|
|
48
48
|
"@emotion/styled": "^11.11.0",
|
|
49
49
|
"@mui/icons-material": "^5.11.16",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
76
76
|
"jest": "^27.5.1"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "8f18d43e67331df2eee7f983f20d61fb47f7183f"
|
|
79
79
|
}
|