@blocklet/launcher-workflow 1.5.64 → 1.5.65

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.
@@ -187,7 +187,7 @@ function OperationPage(_ref) {
187
187
  const Content = _styledComponents.default.div.withConfig({
188
188
  displayName: "instance-operation__Content",
189
189
  componentId: "sc-1fcaixs-0"
190
- })(["margin:auto;height:100%;.link{color:#4f6af6;}.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);
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);
191
191
 
192
192
  OperationPage.propTypes = {
193
193
  type: _propTypes.default.oneOf(['launch', 'start']),
@@ -28,7 +28,7 @@ function PageHeader(_ref) {
28
28
  const Content = _styledComponents.default.div.withConfig({
29
29
  displayName: "page-header__Content",
30
30
  componentId: "sc-2cz88s-0"
31
- })(["width:100%;text-align:center;.title{font-size:24px;color:", ";}.sub-title{font-size:14px;color:", ";}"], props => props.theme.palette.common.black, props => props.theme.palette.grey[600]);
31
+ })(["width:100%;text-align:center;.title{font-size:24px;font-weight:700;color:", ";}.sub-title{font-size:14px;color:", ";padding:0 14px;font-weight:400;}"], props => props.theme.palette.common.black, props => props.theme.palette.grey[600]);
32
32
 
33
33
  var _default = PageHeader;
34
34
  exports.default = _default;
@@ -83,4 +83,4 @@ Paying.propTypes = {
83
83
  const Content = _styledComponents.default.div.withConfig({
84
84
  displayName: "paying__Content",
85
85
  componentId: "sc-1n02bp2-0"
86
- })(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;.status{margin-top:32px;}.status--succeed_icon{background-color:#3ab39d;display:inline-flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:100%;color:#fff;}"]);
86
+ })(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;.status{margin-top:32px;}.status--succeed_icon{background-color:#3ab39d;display:inline-flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:100%;color:", ";}"], props => props.theme.palette.common.white);
package/lib/purchase.js CHANGED
@@ -27,6 +27,8 @@ var _Connect = _interopRequireDefault(require("@arcblock/did-connect/lib/Connect
27
27
 
28
28
  var _utils = require("@arcblock/did-connect/lib/utils");
29
29
 
30
+ var _useMediaQuery = _interopRequireDefault(require("@material-ui/core/useMediaQuery"));
31
+
30
32
  var _compactLayout = _interopRequireDefault(require("@blocklet/launcher-layout/lib/compact-layout"));
31
33
 
32
34
  var _Empty = _interopRequireDefault(require("@arcblock/ux/lib/Empty"));
@@ -90,6 +92,7 @@ function PurchasePage() {
90
92
  const [buttonInFix, setButtonInFix] = (0, _react.useState)(false);
91
93
  const [paymentType, setPaymentType] = (0, _react.useState)('crypto');
92
94
  const routerPrefix = (0, _router.usePrefix)();
95
+ const isMobile = (0, _useMediaQuery.default)(theme => theme.breakpoints.down('sm'));
93
96
  const userDid = query.get('userDid') || (0, _lodash.default)(session, 'user.did');
94
97
  const isEmbed = !!query.get('blocklet_meta_url');
95
98
  (0, _react.useEffect)(() => {
@@ -236,7 +239,6 @@ function PurchasePage() {
236
239
  const PayButton = () => /*#__PURE__*/_react.default.createElement(_Button.default, {
237
240
  onClick: () => handlePay(paymentType),
238
241
  disabled: paying,
239
- rounded: true,
240
242
  variant: "contained",
241
243
  color: "primary"
242
244
  }, paying && /*#__PURE__*/_react.default.createElement(_Spinner.default, {
@@ -245,7 +247,6 @@ function PurchasePage() {
245
247
 
246
248
  const RedeemButton = () => /*#__PURE__*/_react.default.createElement(_Button.default, {
247
249
  onClick: () => handleRedeem(),
248
- rounded: true,
249
250
  variant: "outlined",
250
251
  color: "primary",
251
252
  style: {
@@ -267,7 +268,7 @@ function PurchasePage() {
267
268
  }
268
269
  };
269
270
 
270
- return /*#__PURE__*/_react.default.createElement(Container, null, isEmbed && /*#__PURE__*/_react.default.createElement(_pageHeader.default, {
271
+ return /*#__PURE__*/_react.default.createElement(Container, null, isEmbed && !isMobile && /*#__PURE__*/_react.default.createElement(_pageHeader.default, {
271
272
  title: t('plan.title'),
272
273
  subTitle: t('plan.subTitle')
273
274
  }), /*#__PURE__*/_react.default.createElement("div", {
@@ -279,7 +280,7 @@ function PurchasePage() {
279
280
  bottom: plans.length ? /*#__PURE__*/_react.default.createElement("div", {
280
281
  className: "button-container container-padding ".concat(buttonInFix ? 'has-shadow' : '')
281
282
  }, /*#__PURE__*/_react.default.createElement(RedeemButton, null), /*#__PURE__*/_react.default.createElement(PayButton, null)) : ''
282
- }, !isEmbed && /*#__PURE__*/_react.default.createElement(_pageHeader.default, {
283
+ }, (!isEmbed || isMobile) && /*#__PURE__*/_react.default.createElement(_pageHeader.default, {
283
284
  title: t('plan.title'),
284
285
  subTitle: t('plan.subTitle')
285
286
  }), plans.length ? /*#__PURE__*/_react.default.createElement("div", {
@@ -333,7 +334,7 @@ const Center = _styledComponents.default.div.withConfig({
333
334
  const Container = _styledComponents.default.div.withConfig({
334
335
  displayName: "purchase__Container",
335
336
  componentId: "sc-1knmtel-1"
336
- })(["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:rgba(0,0,0,0.05) 0 0 4px;}}.select-body-item{cursor:pointer;transition:background-color ease 0.2s,border ease 0.2s;}.selected{border-color:", ";cursor:default;}.container-padding{padding-left:24px;padding-right:24px;}"], props => props.theme.breakpoints.down('sm'), props => props.theme.palette.primary.main);
337
+ })(["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);}}.select-body-item{cursor:pointer;transition:background-color ease 0.2s,border ease 0.2s;}.selected{border-color:", ";cursor:default;}.container-padding{padding-left:24px;padding-right:24px;}"], props => props.theme.breakpoints.down('sm'), props => props.theme.palette.primary.main);
337
338
 
338
339
  const PaymentLabel = _styledComponents.default.div.withConfig({
339
340
  displayName: "purchase__PaymentLabel",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-workflow",
3
- "version": "1.5.64",
3
+ "version": "1.5.65",
4
4
  "description": "Purchase components for Launcher UI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -37,15 +37,15 @@
37
37
  "react": ">=16.12.0"
38
38
  },
39
39
  "dependencies": {
40
- "@arcblock/did-connect": "^1.16.43",
41
- "@arcblock/icons": "^1.16.43",
42
- "@arcblock/ux": "^1.16.43",
43
- "@blocklet/launcher-constant": "1.5.64",
44
- "@blocklet/launcher-layout": "1.5.64",
40
+ "@arcblock/did-connect": "^1.16.49",
41
+ "@arcblock/icons": "^1.16.49",
42
+ "@arcblock/ux": "^1.16.49",
43
+ "@blocklet/launcher-constant": "1.5.65",
44
+ "@blocklet/launcher-layout": "1.5.65",
45
45
  "@material-ui/core": "^4.12.3",
46
46
  "@material-ui/icons": "^4.11.2",
47
47
  "@material-ui/lab": "^4.0.0-alpha.60",
48
- "@ocap/util": "^1.14.25",
48
+ "@ocap/util": "^1.15.2",
49
49
  "@stripe/react-stripe-js": "^1.7.0",
50
50
  "@stripe/stripe-js": "^1.22.0",
51
51
  "@styled-icons/remix-fill": "^10.18.0",
@@ -67,5 +67,5 @@
67
67
  "babel-plugin-inline-react-svg": "^2.0.1",
68
68
  "babel-plugin-styled-components": "^1.10.7"
69
69
  },
70
- "gitHead": "968fa143ec8a2e70dd27fdb5efecabbc2ad5e892"
70
+ "gitHead": "f0d418d80249fc4d18fe2fd8481bd64a1010d4f4"
71
71
  }