@blocklet/launcher-workflow 2.0.8 → 2.0.10

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/checkout.js CHANGED
@@ -83,7 +83,6 @@ function CheckoutPage() {
83
83
  const {
84
84
  session
85
85
  } = (0, _session.useSessionContext)();
86
- const [paying, setPaying] = (0, _react.useState)(false);
87
86
  const [showAgreement, setShowAgreement] = (0, _react.useState)(false);
88
87
  const [showPayment, setShowPayment] = (0, _react.useState)(false);
89
88
  const [agree, setAgree] = (0, _react.useState)(false);
@@ -145,7 +144,6 @@ function CheckoutPage() {
145
144
  setShowPayment(true);
146
145
  return;
147
146
  }
148
- setPaying(true);
149
147
  if (!(session !== null && session !== void 0 && session.user)) {
150
148
  const paymentTokenURL = (0, _urlJoin.default)(didPayPrefix, "/did/purchase/token?productId=".concat(planId, "&paymentMethodId=").concat(paymentMethod._id));
151
149
  const {
@@ -161,7 +159,7 @@ function CheckoutPage() {
161
159
  });
162
160
  }
163
161
  };
164
- const handleCancelPay = () => setPaying(false);
162
+ const handleCancelPay = () => setShowPayment(false);
165
163
  const handlePaid = async _ref => {
166
164
  let {
167
165
  nftId
@@ -173,7 +171,7 @@ function CheckoutPage() {
173
171
  open: true,
174
172
  nftId
175
173
  });
176
- setPaying(false);
174
+ setShowPayment(false);
177
175
  return;
178
176
  }
179
177
  searchParams.set('launchType', 'serverless');
@@ -182,11 +180,11 @@ function CheckoutPage() {
182
180
  pathname: (0, _urlJoin.default)(routerPrefix, "/launch/".concat(nftId)),
183
181
  search: searchParams.toString()
184
182
  });
185
- setPaying(false);
183
+ setShowPayment(false);
186
184
  };
187
185
  const handlePayFailed = () => {
188
186
  // TODO: Toast 错误
189
- setPaying(false);
187
+ setShowPayment(false);
190
188
  };
191
189
  const calculateTotalPayment = prices => {
192
190
  if (!paymentMethod) {
@@ -312,15 +310,15 @@ function CheckoutPage() {
312
310
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
313
311
  className: "actions",
314
312
  children: [isMobile && /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
315
- loading: paying,
313
+ loading: showPayment,
316
314
  className: "button-previous",
317
315
  variant: "outlined",
318
316
  onClick: () => navigate(-1),
319
317
  children: t('common.previous')
320
318
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
321
- loading: paying,
319
+ loading: showPayment,
322
320
  className: "button-pay",
323
- disabled: paying || showPayment || !planId || !paymentMethod || !agree,
321
+ disabled: showPayment || !planId || !paymentMethod || !agree,
324
322
  variant: "contained",
325
323
  onClick: handlePay,
326
324
  children: t('common.pay')
package/lib/locales/en.js CHANGED
@@ -47,11 +47,11 @@ module.exports = {
47
47
  waitingForLaunching: 'Your Blocklet Space launch request is being processed, please be patient, it usually takes about 5 minutes',
48
48
  accessServer: 'Access Blocklet Space',
49
49
  waiting: {
50
- starting: 'Starting Server Instance',
51
- securing: 'Securing Server Network',
52
- prepare: 'Prepare Server Storage',
53
- waiting: 'Waiting Server Ready',
54
- done: 'Server is Ready'
50
+ starting: 'Starting Blocklet Space',
51
+ securing: 'Securing Network',
52
+ prepare: 'Prepare Storage',
53
+ waiting: 'Waiting for Ready',
54
+ done: 'Blocklet Space is Ready'
55
55
  },
56
56
  dialog: {
57
57
  title: 'Launch Blocklet Space',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-workflow",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "Purchase components for Launcher UI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -36,24 +36,24 @@
36
36
  "react": ">=18.1.0"
37
37
  },
38
38
  "dependencies": {
39
- "@arcblock/did-connect": "^2.5.14",
40
- "@arcblock/icons": "^2.5.14",
41
- "@arcblock/license": "^2.5.14",
42
- "@arcblock/ux": "^2.5.14",
43
- "@blocklet/launcher-layout": "2.0.8",
44
- "@blocklet/launcher-util": "2.0.8",
45
- "@blocklet/launcher-ux": "2.0.8",
46
- "@did-pay/react": "^1.9.44",
39
+ "@arcblock/did-connect": "^2.5.16",
40
+ "@arcblock/icons": "^2.5.16",
41
+ "@arcblock/license": "^2.5.16",
42
+ "@arcblock/ux": "^2.5.16",
43
+ "@blocklet/launcher-layout": "2.0.10",
44
+ "@blocklet/launcher-util": "2.0.10",
45
+ "@blocklet/launcher-ux": "2.0.10",
46
+ "@did-pay/react": "^1.9.46",
47
47
  "@emotion/react": "^11.10.6",
48
48
  "@emotion/styled": "^11.10.6",
49
49
  "@mui/icons-material": "^5.11.11",
50
- "@mui/material": "^5.11.13",
51
- "@ocap/util": "^1.18.62",
50
+ "@mui/material": "^5.11.14",
51
+ "@ocap/util": "^1.18.64",
52
52
  "@splidejs/react-splide": "^0.7.12",
53
53
  "@splidejs/splide": "^4.1.4",
54
54
  "@splidejs/splide-extension-grid": "^0.4.1",
55
55
  "@stripe/react-stripe-js": "^1.16.5",
56
- "@stripe/stripe-js": "^1.50.0",
56
+ "@stripe/stripe-js": "^1.52.0",
57
57
  "axios": "^0.26.1",
58
58
  "flat": "^5.0.2",
59
59
  "js-cookie": "^3.0.1",
@@ -72,5 +72,5 @@
72
72
  "@babel/preset-react": "^7.18.6",
73
73
  "babel-plugin-inline-react-svg": "^2.0.2"
74
74
  },
75
- "gitHead": "3c123612c60451a722befebdf2c58f04ed90f252"
75
+ "gitHead": "e9fa27a72da394ca198138b12efc2de73b6393d8"
76
76
  }