@blocklet/launcher-workflow 1.5.83 → 1.5.86
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.
|
@@ -136,27 +136,25 @@ function OperationPage(_ref) {
|
|
|
136
136
|
});
|
|
137
137
|
}, [nftId]); // eslint-disable-line
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
const successful = launchState.status === STATUS.success;
|
|
140
|
+
return /*#__PURE__*/_react.default.createElement(Content, null, /*#__PURE__*/_react.default.createElement(_pageHeader.default, {
|
|
141
|
+
title: t("".concat(type, ".title")),
|
|
142
|
+
className: "launch-page-header ".concat(successful ? 'header-hide' : '')
|
|
143
|
+
}), launchState.status === STATUS.waiting && /*#__PURE__*/_react.default.createElement("div", {
|
|
142
144
|
className: "center"
|
|
143
|
-
}, /*#__PURE__*/_react.default.createElement(_Spinner.default, null)), launchState.status === STATUS.launching && /*#__PURE__*/_react.default.createElement(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
className: "status-spinner"
|
|
149
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
150
|
-
className: "status-text"
|
|
151
|
-
}, t('launch.waitingForLaunching')))), launchState.status === STATUS.success && /*#__PURE__*/_react.default.createElement(_launchResultMessage.default, {
|
|
152
|
-
className: "message",
|
|
153
|
-
variant: "success",
|
|
154
|
-
title: t('launch.launched'),
|
|
155
|
-
footer: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("a", {
|
|
156
|
-
className: "link",
|
|
145
|
+
}, /*#__PURE__*/_react.default.createElement(_Spinner.default, null)), (launchState.status === STATUS.launching || successful) && /*#__PURE__*/_react.default.createElement(_launchResultMessage.default, {
|
|
146
|
+
variant: successful ? 'success' : 'loading',
|
|
147
|
+
title: successful ? t('launch.launched') : '',
|
|
148
|
+
subTitle: !successful ? t('launch.waitingForLaunching') : '',
|
|
149
|
+
footer: successful ? /*#__PURE__*/_react.default.createElement(LinkEle, {
|
|
157
150
|
href: launchState.appUrl,
|
|
158
|
-
|
|
159
|
-
},
|
|
151
|
+
rel: "noreferrer"
|
|
152
|
+
}, /*#__PURE__*/_react.default.createElement(_Spinner.default, {
|
|
153
|
+
size: [16, 10],
|
|
154
|
+
style: {
|
|
155
|
+
marginRight: 14
|
|
156
|
+
}
|
|
157
|
+
}), " ", t('common.redirecting')) : ''
|
|
160
158
|
}), [STATUS.error, STATUS.launchFailedError].includes(launchState.status) && /*#__PURE__*/_react.default.createElement(_launchResultMessage.default, {
|
|
161
159
|
variant: "error",
|
|
162
160
|
title: t("".concat(type, ".error.launchFailed")),
|
|
@@ -181,13 +179,18 @@ function OperationPage(_ref) {
|
|
|
181
179
|
component: _reactRouterDom.Link,
|
|
182
180
|
to: (0, _router.default)(routerPrefix, "/prepare/".concat(nftId).concat(window.location.search))
|
|
183
181
|
}, t('common.launch'))
|
|
184
|
-
}))
|
|
182
|
+
}));
|
|
185
183
|
}
|
|
186
184
|
|
|
185
|
+
const LinkEle = _styledComponents.default.a.withConfig({
|
|
186
|
+
displayName: "instance-operation__LinkEle",
|
|
187
|
+
componentId: "sc-1fcaixs-0"
|
|
188
|
+
})(["display:flex;justify-content:center;align-items:center;height:36px;color:", ";"], props => props.theme.palette.primary.main);
|
|
189
|
+
|
|
187
190
|
const Content = _styledComponents.default.div.withConfig({
|
|
188
191
|
displayName: "instance-operation__Content",
|
|
189
|
-
componentId: "sc-1fcaixs-
|
|
190
|
-
})(["margin:auto;height:100%;.link{color:", ";}.link:hover{text-decoration:underline !important;}.status{color:", ";display:flex;flex-direction:column;align-items:center;.status-spinner{color:inherit !important;}.status-text{display:inline-block;padding:0 20px;max-width:420px;margin-top:24px;text-align:center;}}.button{min-width:150px;margin-bottom:100px;}.center{display:flex;align-items:center;justify-content:center;width:100%;height:100%;}"], props => props.theme.palette.primary.main, props => props.theme.palette.primary.main);
|
|
192
|
+
componentId: "sc-1fcaixs-1"
|
|
193
|
+
})(["margin:auto;height:100%;.link{color:", ";}.link:hover{text-decoration:underline !important;}.status{color:", ";display:flex;flex-direction:column;align-items:center;.status-spinner{color:inherit !important;}.status-text{display:inline-block;padding:0 20px;max-width:420px;margin-top:24px;text-align:center;}}.button{min-width:150px;margin-bottom:100px;}.center{display:flex;align-items:center;justify-content:center;width:100%;height:100%;}.launch-page-header{transition:all ease 0.3s;&.header-hide{opacity:0;}}"], props => props.theme.palette.primary.main, props => props.theme.palette.primary.main);
|
|
191
194
|
|
|
192
195
|
OperationPage.propTypes = {
|
|
193
196
|
type: _propTypes.default.oneOf(['launch', 'start']),
|
package/lib/components/plan.js
CHANGED
|
@@ -38,7 +38,9 @@ function NodeType(_ref) {
|
|
|
38
38
|
const {
|
|
39
39
|
locale
|
|
40
40
|
} = (0, _locale.useLocaleContext)();
|
|
41
|
-
return /*#__PURE__*/_react.default.createElement(Container,
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(Container, Object.assign({}, props, {
|
|
42
|
+
className: selected ? 'item-selected' : ''
|
|
43
|
+
}), /*#__PURE__*/_react.default.createElement(_core.Typography, {
|
|
42
44
|
className: "name",
|
|
43
45
|
component: "span"
|
|
44
46
|
}, (0, _lodash.default)(data, "name.".concat(locale))), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -53,12 +55,12 @@ function NodeType(_ref) {
|
|
|
53
55
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
54
56
|
className: "item-block"
|
|
55
57
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
-
className: "item-icon"
|
|
57
|
-
}, /*#__PURE__*/_react.default.createElement(_Check.default, {
|
|
58
|
-
fontSize: "small"
|
|
59
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
60
58
|
className: "item-desc"
|
|
61
|
-
}, feat[locale]))))))
|
|
59
|
+
}, feat[locale])))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
className: "check-container"
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(_Check.default, {
|
|
62
|
+
className: "check-icon"
|
|
63
|
+
})));
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
NodeType.propTypes = {
|
|
@@ -74,4 +76,4 @@ NodeType.defaultProps = {
|
|
|
74
76
|
const Container = _styledComponents.default.div.withConfig({
|
|
75
77
|
displayName: "plan__Container",
|
|
76
78
|
componentId: "sc-1ts75ga-0"
|
|
77
|
-
})(["border:1px solid ", ";border-radius:8px;
|
|
79
|
+
})(["position:relative;border:1px solid ", ";border-radius:8px;padding:16px;cursor:pointer;transition:background-color ease 0.2s,border ease 0.2s;&.item-selected{background-color:#eff3fe;border-color:#eff3fe;cursor:default;}.name{color:", ";font-size:16px;line-height:20px;font-weight:500;}.price{margin-top:8px;font-size:24px;font-weight:700;color:", ";}.rights{font-size:14px;& > ul li{list-style-type:none;margin:0;vertical-align:middle;color:", ";}& > ul li:not(:first-child){margin-top:8px;}.rights-list{margin-top:8px;}}.item-block{display:flex;.item-icon{margin-right:6px;font-size:14px;color:", ";flex-shrink:0;}.item-desc{flex:1;}}.check-container{position:absolute;right:0;bottom:0;display:flex;justify-content:flex-end;align-items:flex-end;width:30px;height:30px;border-radius:0 0 7px 0;color:", ";overflow:hidden;transition:all ease 0.3s;&:after{position:absolute;z-index:0;left:30px;top:30px;display:block;width:0;height:0;border-top:transparent solid 15px;border-left:transparent solid 15px;border-bottom:", " solid 15px;border-right:", " solid 15px;transition:all ease 0.1s;content:'';}.check-icon{position:relative;z-index:2;margin:0 1px 1px 0;font-size:16px;transform:scale(0);transition:all ease 0.2s;}}&.item-selected{.check-container{&:after{left:0;top:0;}.check-icon{transform:scale(1);}}}"], props => props.theme.palette.grey[200], props => props.theme.palette.grey[900], props => props.theme.palette.primary.main, props => props.theme.palette.grey[700], props => props.theme.palette.primary.main, props => props.theme.palette.common.white, props => props.theme.palette.primary.main, props => props.theme.palette.primary.main);
|
package/lib/purchase.js
CHANGED
|
@@ -260,20 +260,6 @@ function PurchasePage() {
|
|
|
260
260
|
}
|
|
261
261
|
}, t('common.redeem'));
|
|
262
262
|
|
|
263
|
-
const bottomFix = type => {
|
|
264
|
-
switch (type) {
|
|
265
|
-
case 'fix':
|
|
266
|
-
setButtonInFix(true);
|
|
267
|
-
break;
|
|
268
|
-
|
|
269
|
-
case 'scroll':
|
|
270
|
-
setButtonInFix(false);
|
|
271
|
-
break;
|
|
272
|
-
|
|
273
|
-
default:
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
|
|
277
263
|
return /*#__PURE__*/_react.default.createElement(Container, null, isEmbed && !isMobile && /*#__PURE__*/_react.default.createElement(_pageHeader.default, {
|
|
278
264
|
title: t('plan.title'),
|
|
279
265
|
subTitle: t('plan.subTitle')
|
|
@@ -282,7 +268,7 @@ function PurchasePage() {
|
|
|
282
268
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
283
269
|
className: "page-body-article"
|
|
284
270
|
}, /*#__PURE__*/_react.default.createElement(_compactLayout.default, {
|
|
285
|
-
onBottomFix:
|
|
271
|
+
onBottomFix: type => setButtonInFix(type === 'fix'),
|
|
286
272
|
bottom: plans.length ? /*#__PURE__*/_react.default.createElement("div", {
|
|
287
273
|
className: "button-container container-padding ".concat(buttonInFix ? 'has-shadow' : '')
|
|
288
274
|
}, /*#__PURE__*/_react.default.createElement(RedeemButton, null), /*#__PURE__*/_react.default.createElement(PayButton, null)) : ''
|
|
@@ -303,7 +289,7 @@ function PurchasePage() {
|
|
|
303
289
|
key: item._id,
|
|
304
290
|
paymentType: paymentType,
|
|
305
291
|
onClick: () => selectPlan(item),
|
|
306
|
-
|
|
292
|
+
selected: plan && plan._id === item._id,
|
|
307
293
|
data: item
|
|
308
294
|
})) : /*#__PURE__*/_react.default.createElement(_Empty.default, null, t('plan.noPlan'))))))), /*#__PURE__*/_react.default.createElement(_Connect.default, {
|
|
309
295
|
open: paying && paymentType === 'crypto',
|
|
@@ -340,7 +326,7 @@ const Center = _styledComponents.default.div.withConfig({
|
|
|
340
326
|
const Container = _styledComponents.default.div.withConfig({
|
|
341
327
|
displayName: "purchase__Container",
|
|
342
328
|
componentId: "sc-1knmtel-1"
|
|
343
|
-
})(["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:0px -1px 1px 0px rgba(168,180,197,0.12);}}.
|
|
329
|
+
})(["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:0px -1px 1px 0px rgba(168,180,197,0.12);}}.container-padding{padding-left:24px;padding-right:24px;}"], props => props.theme.breakpoints.down('sm'));
|
|
344
330
|
|
|
345
331
|
const PaymentLabel = _styledComponents.default.div.withConfig({
|
|
346
332
|
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.86",
|
|
4
4
|
"description": "Purchase components for Launcher UI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"react": ">=16.12.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@arcblock/did-connect": "^1.16.
|
|
41
|
-
"@arcblock/icons": "^1.16.
|
|
42
|
-
"@arcblock/license": "^1.16.
|
|
43
|
-
"@arcblock/ux": "^1.16.
|
|
44
|
-
"@blocklet/launcher-constant": "1.5.
|
|
45
|
-
"@blocklet/launcher-layout": "1.5.
|
|
40
|
+
"@arcblock/did-connect": "^1.16.66",
|
|
41
|
+
"@arcblock/icons": "^1.16.66",
|
|
42
|
+
"@arcblock/license": "^1.16.66",
|
|
43
|
+
"@arcblock/ux": "^1.16.66",
|
|
44
|
+
"@blocklet/launcher-constant": "1.5.86",
|
|
45
|
+
"@blocklet/launcher-layout": "1.5.86",
|
|
46
46
|
"@material-ui/core": "^4.12.3",
|
|
47
47
|
"@material-ui/icons": "^4.11.2",
|
|
48
48
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
49
|
-
"@ocap/util": "^1.15.
|
|
49
|
+
"@ocap/util": "^1.15.5",
|
|
50
50
|
"@stripe/react-stripe-js": "^1.7.0",
|
|
51
51
|
"@stripe/stripe-js": "^1.22.0",
|
|
52
52
|
"@styled-icons/remix-fill": "^10.18.0",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"babel-plugin-inline-react-svg": "^2.0.1",
|
|
70
70
|
"babel-plugin-styled-components": "^1.10.7"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "f03b341d1db4648c26f39f63ade647ae5a59fcb4"
|
|
73
73
|
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = LaunchResultMessage;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
-
|
|
14
|
-
var _Check = _interopRequireDefault(require("@material-ui/icons/Check"));
|
|
15
|
-
|
|
16
|
-
var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
|
|
17
|
-
|
|
18
|
-
var _Spinner = _interopRequireDefault(require("@arcblock/ux/lib/Spinner"));
|
|
19
|
-
|
|
20
|
-
var _PriorityHigh = _interopRequireDefault(require("@material-ui/icons/PriorityHigh"));
|
|
21
|
-
|
|
22
|
-
const _excluded = ["variant", "title", "subTitle", "footer"];
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
|
-
|
|
28
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
|
-
|
|
30
|
-
function LaunchResultMessage(_ref) {
|
|
31
|
-
let {
|
|
32
|
-
variant,
|
|
33
|
-
title,
|
|
34
|
-
subTitle,
|
|
35
|
-
footer
|
|
36
|
-
} = _ref,
|
|
37
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
38
|
-
|
|
39
|
-
let Icon;
|
|
40
|
-
|
|
41
|
-
switch (variant) {
|
|
42
|
-
case 'error':
|
|
43
|
-
Icon = _Close.default;
|
|
44
|
-
break;
|
|
45
|
-
|
|
46
|
-
case 'info':
|
|
47
|
-
Icon = _PriorityHigh.default;
|
|
48
|
-
break;
|
|
49
|
-
|
|
50
|
-
case 'loading':
|
|
51
|
-
Icon = _Spinner.default;
|
|
52
|
-
break;
|
|
53
|
-
|
|
54
|
-
default:
|
|
55
|
-
Icon = _Check.default;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return /*#__PURE__*/_react.default.createElement(Container, Object.assign({
|
|
59
|
-
variant: variant
|
|
60
|
-
}, props), /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
-
className: "result-body"
|
|
62
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
63
|
-
className: "result-icon color-".concat(variant)
|
|
64
|
-
}, /*#__PURE__*/_react.default.createElement(Icon, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
-
className: "result-title color-".concat(variant, " ").concat(title ? '' : 'ele-hide')
|
|
66
|
-
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
67
|
-
className: "result-sub-title ".concat(subTitle ? '' : 'ele-hide')
|
|
68
|
-
}, subTitle), /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
-
className: "result-footer ".concat(footer ? '' : 'ele-hide')
|
|
70
|
-
}, footer)));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
LaunchResultMessage.propTypes = {
|
|
74
|
-
variant: _propTypes.default.oneOf(['success', 'error', 'info', 'loading']),
|
|
75
|
-
title: _propTypes.default.string,
|
|
76
|
-
subTitle: _propTypes.default.string,
|
|
77
|
-
footer: _propTypes.default.any
|
|
78
|
-
};
|
|
79
|
-
LaunchResultMessage.defaultProps = {
|
|
80
|
-
variant: 'success',
|
|
81
|
-
title: '',
|
|
82
|
-
subTitle: '',
|
|
83
|
-
footer: null
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
const Container = _styledComponents.default.div.withConfig({
|
|
87
|
-
displayName: "launch-result-message__Container",
|
|
88
|
-
componentId: "sc-17nd2le-0"
|
|
89
|
-
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:100%;height:100%;.result-body{max-width:500px;text-align:center;margin-top:-64px;}.result-icon{display:inline-flex;justify-content:center;align-items:center;margin-bottom:24px;width:48px;height:48px;border-radius:100%;color:", ";transition:all ease 0.3s;&.color-success{background-color:", ";}&.color-error{background-color:", ";}&.color-info{background-color:", ";}}.result-title{height:34px;font-size:24px;margin-bottom:8px;font-weight:bolder;transition:all ease 0.3s;&.ele-hide{height:0;opacity:0;margin-bottom:0;}&.color-success{color:", ";}&.color-error{color:", ";}&.color-info{color:", ";}&.ele-hide{line-height:0;opacity:0;}}.result-sub-title{margin:0 auto;max-width:90%;color:", ";font-size:14px;line-height:1.21em;transition:all ease 0.3s;&.ele-hide{line-height:0;opacity:0;}}.result-footer{margin-top:38px;height:70px;overflow:hidden;transition:all ease 0.3s;&.ele-hide{margin-top:0;height:0;opacity:0;}}"], props => props.theme.palette.common.white, props => props.theme.palette.success.main, props => props.theme.palette.error.main, props => props.theme.palette.primary.main, props => props.theme.palette.success.main, props => props.theme.palette.error.main, props => props.theme.palette.primary.main, props => props.theme.palette.grey[700]);
|