@blocklet/launcher-workflow 2.3.103 → 2.3.105

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.
@@ -213,7 +213,6 @@ export default function LaunchDedicated({
213
213
  }), [STATUS.error, STATUS.launchFailedError].includes(launchState.status) && /*#__PURE__*/_jsx(LaunchResultMessage, {
214
214
  variant: "error",
215
215
  title: t(`${type}.error.launchFailed`),
216
- subTitle: type === 'launch' ? t('launch.error.launchFailedDescription') : '',
217
216
  footer: type === 'launch' && /*#__PURE__*/_jsx(Button, {
218
217
  color: "primary",
219
218
  variant: "contained",
@@ -53,26 +53,23 @@ export default function LaunchServerless({
53
53
  className: "content",
54
54
  children: [state.loading && /*#__PURE__*/_jsx(LaunchResultMessage, {
55
55
  variant: "loading",
56
- title: t('prepare.serverless.allocate'),
57
- subTitle: t('prepare.serverless.preparing')
56
+ title: t('prepare.serverless.preparing')
58
57
  }), state.error && /*#__PURE__*/_jsx(LaunchResultMessage, {
59
58
  variant: "error",
60
- title: t('prepare.serverless.allocate'),
61
- subTitle: t('prepare.serverless.prepareFailed', {
59
+ title: t('prepare.serverless.prepareFailed', {
62
60
  error: formatError(state.error)
63
61
  }),
64
62
  footer: /*#__PURE__*/_jsx(Button, {
65
63
  size: "small",
66
64
  style: {
67
- marginTop: '8px'
65
+ marginTop: '-16px'
68
66
  },
69
67
  onClick: () => window.location.reload(),
70
68
  children: t('common.retry')
71
69
  })
72
70
  }), state.value && /*#__PURE__*/_jsx(LaunchResultMessage, {
73
71
  variant: "success",
74
- title: t('prepare.serverless.allocated'),
75
- subTitle: t('prepare.serverless.prepared')
72
+ title: t('prepare.serverless.prepared')
76
73
  })]
77
74
  })
78
75
  })]
@@ -83,6 +80,7 @@ const Container = styled.div`
83
80
  flex-direction: column;
84
81
  width: 100%;
85
82
  height: 100%;
83
+ padding-top: 100px;
86
84
 
87
85
  .page-logo {
88
86
  display: flex;
@@ -105,6 +103,13 @@ const Container = styled.div`
105
103
  .loading-description {
106
104
  margin-top: 8px;
107
105
  }
106
+
107
+ .result-title {
108
+ font-size: 18px;
109
+ }
110
+ .result-title.color-loading {
111
+ color: ${props => props.theme.palette.primary.main};
112
+ }
108
113
  }
109
114
  }
110
115
  `;
package/es/locales/en.js CHANGED
@@ -39,15 +39,13 @@ export default {
39
39
  },
40
40
  prepare: {
41
41
  serverless: {
42
- allocate: 'Waiting for space',
43
- allocated: 'Blocklet space ready',
44
- preparing: 'Preparing blocklet space for you launch request...',
45
- prepared: 'Blocklet space is ready for you, redirecting...',
46
- prepareFailed: 'Failed to prepare space! {error}'
42
+ preparing: 'Allocating space on the server. Please wait...',
43
+ prepared: 'The space is ready. Redirecting to the server to continue the installation...',
44
+ prepareFailed: 'Failed to allocate space! {error}'
47
45
  }
48
46
  },
49
47
  launch: {
50
- pageTitle: 'Prepare Space',
48
+ pageTitle: 'Preparing Space',
51
49
  invalidFftId: 'Invalid Purchase NFT ID',
52
50
  launchApp: 'Launch App',
53
51
  launching: 'Your Blocklet Space is being baked, please be patient, it usually takes about 5 minutes',
package/es/locales/zh.js CHANGED
@@ -39,10 +39,9 @@ export default {
39
39
  },
40
40
  prepare: {
41
41
  serverless: {
42
- allocate: '等待空间就绪',
43
- preparing: '正在为应用启动准备空间...',
44
- prepared: '已准备好应用空间,跳转中...',
45
- prepareFailed: '准备空间失败! {error}'
42
+ preparing: '正在服务端分配空间中...',
43
+ prepared: '空间已准备好,跳转服务器继续安装...',
44
+ prepareFailed: '分配空间失败! {error}'
46
45
  }
47
46
  },
48
47
  launch: {
package/es/prepare.js CHANGED
@@ -163,7 +163,7 @@ function Content({
163
163
  });
164
164
  }
165
165
  }, [launchState.value?.launch, params, setParams]);
166
- if (launchState.loading || blocklet.loading) {
166
+ if (blocklet.loading) {
167
167
  return /*#__PURE__*/_jsx(Center, {
168
168
  relative: "parent",
169
169
  children: /*#__PURE__*/_jsx(CircularProgress, {})
@@ -193,7 +193,7 @@ function Content({
193
193
 
194
194
  // TODO: PaymentKitV2 处理支付失败的情况
195
195
 
196
- const launch = launchState.value?.launch;
196
+ const launch = launchState.value?.launch || {};
197
197
  if ([LAUNCH_STATUS.paid, LAUNCH_STATUS.nftMinted, LAUNCH_STATUS.allocated].includes(launch.status)) {
198
198
  return /*#__PURE__*/_jsx(ConfirmDialog, {
199
199
  title: t('purchase.unexpectedLaunchSession.paid'),
@@ -224,7 +224,6 @@ function LaunchDedicated(_ref) {
224
224
  }), [STATUS.error, STATUS.launchFailedError].includes(launchState.status) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_launchResultMessage.default, {
225
225
  variant: "error",
226
226
  title: t("".concat(type, ".error.launchFailed")),
227
- subTitle: type === 'launch' ? t('launch.error.launchFailedDescription') : '',
228
227
  footer: type === 'launch' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
229
228
  color: "primary",
230
229
  variant: "contained",
@@ -64,32 +64,29 @@ function LaunchServerless(_ref) {
64
64
  className: "content",
65
65
  children: [state.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_launchResultMessage.default, {
66
66
  variant: "loading",
67
- title: t('prepare.serverless.allocate'),
68
- subTitle: t('prepare.serverless.preparing')
67
+ title: t('prepare.serverless.preparing')
69
68
  }), state.error && /*#__PURE__*/(0, _jsxRuntime.jsx)(_launchResultMessage.default, {
70
69
  variant: "error",
71
- title: t('prepare.serverless.allocate'),
72
- subTitle: t('prepare.serverless.prepareFailed', {
70
+ title: t('prepare.serverless.prepareFailed', {
73
71
  error: (0, _formatError.default)(state.error)
74
72
  }),
75
73
  footer: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
76
74
  size: "small",
77
75
  style: {
78
- marginTop: '8px'
76
+ marginTop: '-16px'
79
77
  },
80
78
  onClick: () => window.location.reload(),
81
79
  children: t('common.retry')
82
80
  })
83
81
  }), state.value && /*#__PURE__*/(0, _jsxRuntime.jsx)(_launchResultMessage.default, {
84
82
  variant: "success",
85
- title: t('prepare.serverless.allocated'),
86
- subTitle: t('prepare.serverless.prepared')
83
+ title: t('prepare.serverless.prepared')
87
84
  })]
88
85
  })
89
86
  })]
90
87
  });
91
88
  }
92
- const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n\n .page-logo {\n display: flex;\n justify-content: center;\n margin-top: 62px;\n ", " {\n margin-top: 48px;\n }\n }\n\n .page-body {\n margin-top: 128px;\n\n .content {\n display: flex;\n align-items: center;\n flex-direction: column;\n text-align: center;\n\n .loading-description {\n margin-top: 8px;\n }\n }\n }\n"])), props => props.theme.breakpoints.down('md'));
89
+ const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 100px;\n\n .page-logo {\n display: flex;\n justify-content: center;\n margin-top: 62px;\n ", " {\n margin-top: 48px;\n }\n }\n\n .page-body {\n margin-top: 128px;\n\n .content {\n display: flex;\n align-items: center;\n flex-direction: column;\n text-align: center;\n\n .loading-description {\n margin-top: 8px;\n }\n\n .result-title {\n font-size: 18px;\n }\n .result-title.color-loading {\n color: ", ";\n }\n }\n }\n"])), props => props.theme.breakpoints.down('md'), props => props.theme.palette.primary.main);
93
90
  LaunchServerless.propTypes = {
94
91
  sessionId: _propTypes.default.string.isRequired
95
92
  };
package/lib/locales/en.js CHANGED
@@ -45,15 +45,13 @@ var _default = exports.default = {
45
45
  },
46
46
  prepare: {
47
47
  serverless: {
48
- allocate: 'Waiting for space',
49
- allocated: 'Blocklet space ready',
50
- preparing: 'Preparing blocklet space for you launch request...',
51
- prepared: 'Blocklet space is ready for you, redirecting...',
52
- prepareFailed: 'Failed to prepare space! {error}'
48
+ preparing: 'Allocating space on the server. Please wait...',
49
+ prepared: 'The space is ready. Redirecting to the server to continue the installation...',
50
+ prepareFailed: 'Failed to allocate space! {error}'
53
51
  }
54
52
  },
55
53
  launch: {
56
- pageTitle: 'Prepare Space',
54
+ pageTitle: 'Preparing Space',
57
55
  invalidFftId: 'Invalid Purchase NFT ID',
58
56
  launchApp: 'Launch App',
59
57
  launching: 'Your Blocklet Space is being baked, please be patient, it usually takes about 5 minutes',
package/lib/locales/zh.js CHANGED
@@ -45,10 +45,9 @@ var _default = exports.default = {
45
45
  },
46
46
  prepare: {
47
47
  serverless: {
48
- allocate: '等待空间就绪',
49
- preparing: '正在为应用启动准备空间...',
50
- prepared: '已准备好应用空间,跳转中...',
51
- prepareFailed: '准备空间失败! {error}'
48
+ preparing: '正在服务端分配空间中...',
49
+ prepared: '空间已准备好,跳转服务器继续安装...',
50
+ prepareFailed: '分配空间失败! {error}'
52
51
  }
53
52
  },
54
53
  launch: {
package/lib/prepare.js CHANGED
@@ -175,7 +175,7 @@ function Content(_ref) {
175
175
  });
176
176
  }
177
177
  }, [(_launchState$value5 = launchState.value) === null || _launchState$value5 === void 0 ? void 0 : _launchState$value5.launch, params, setParams]);
178
- if (launchState.loading || blocklet.loading) {
178
+ if (blocklet.loading) {
179
179
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Center.default, {
180
180
  relative: "parent",
181
181
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {})
@@ -205,7 +205,7 @@ function Content(_ref) {
205
205
 
206
206
  // TODO: PaymentKitV2 处理支付失败的情况
207
207
 
208
- const launch = (_launchState$value6 = launchState.value) === null || _launchState$value6 === void 0 ? void 0 : _launchState$value6.launch;
208
+ const launch = ((_launchState$value6 = launchState.value) === null || _launchState$value6 === void 0 ? void 0 : _launchState$value6.launch) || {};
209
209
  if ([_constant.LAUNCH_STATUS.paid, _constant.LAUNCH_STATUS.nftMinted, _constant.LAUNCH_STATUS.allocated].includes(launch.status)) {
210
210
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_confirm.default, {
211
211
  title: t('purchase.unexpectedLaunchSession.paid'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-workflow",
3
- "version": "2.3.103",
3
+ "version": "2.3.105",
4
4
  "description": "Purchase components for Launcher UI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -29,7 +29,7 @@
29
29
  "build:lib": "babel src --out-dir lib --copy-files --no-copy-ignored",
30
30
  "build:es": "babel --config-file ./babel.config.es.js src --out-dir es --copy-files --no-copy-ignored",
31
31
  "autoexports": "node tools/auto-exports.js",
32
- "watch": "npm run watch:lib && npm run watch:es && npm run autoexports",
32
+ "watch": "concurrently \"npm run watch:lib\" \"npm run watch:es\" \"npm run autoexports\"",
33
33
  "watch:lib": "babel src --out-dir lib -w --copy-files",
34
34
  "watch:es": "babel --config-file ./babel.config.es.js src --out-dir es -w --copy-files",
35
35
  "prepublish": "npm run build"
@@ -41,16 +41,16 @@
41
41
  "react": ">=18.1.0"
42
42
  },
43
43
  "dependencies": {
44
- "@arcblock/did-connect": "^2.12.44",
45
- "@arcblock/icons": "^2.12.44",
46
- "@arcblock/license": "^2.12.44",
47
- "@arcblock/react-hooks": "^2.12.44",
48
- "@arcblock/ux": "^2.12.44",
49
- "@blocklet/launcher-layout": "^2.12.44",
50
- "@blocklet/launcher-util": "2.3.103",
51
- "@blocklet/launcher-ux": "2.3.103",
44
+ "@arcblock/did-connect": "^2.12.52",
45
+ "@arcblock/icons": "^2.12.52",
46
+ "@arcblock/license": "^2.12.52",
47
+ "@arcblock/react-hooks": "^2.12.52",
48
+ "@arcblock/ux": "^2.12.52",
49
+ "@blocklet/launcher-layout": "^2.12.52",
50
+ "@blocklet/launcher-util": "2.3.105",
51
+ "@blocklet/launcher-ux": "2.3.105",
52
52
  "@blocklet/payment": "^1.14.8",
53
- "@blocklet/payment-react": "^1.18.23",
53
+ "@blocklet/payment-react": "^1.18.24",
54
54
  "@emotion/react": "^11.14.0",
55
55
  "@emotion/styled": "^11.14.0",
56
56
  "@mui/icons-material": "^5.17.1",
@@ -85,6 +85,7 @@
85
85
  "@babel/preset-env": "^7.26.9",
86
86
  "@babel/preset-react": "^7.26.3",
87
87
  "babel-plugin-inline-react-svg": "^2.0.2",
88
+ "concurrently": "^9.1.2",
88
89
  "glob": "^10.4.5"
89
90
  },
90
91
  "exports": {
@@ -105,5 +106,5 @@
105
106
  "require": "./lib/locales/index.js"
106
107
  }
107
108
  },
108
- "gitHead": "fb3b2f0bfde81ee0732bda63008d8c6f55d8e6ab"
109
+ "gitHead": "f846b89921b0475a10753321cc01e43799e60d86"
109
110
  }