Skip to content

Commit

Permalink
Leve/sw 38/balance (#957)
Browse files Browse the repository at this point in the history
* intermediate

* payment options by design
  • Loading branch information
levenecav authored Mar 12, 2019
1 parent e42172d commit 7d01a02
Show file tree
Hide file tree
Showing 41 changed files with 1,801 additions and 181 deletions.
2 changes: 2 additions & 0 deletions .env.nightly
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ export REACT_APP_ZENDESK_TOKEN="yu5JvQvGXeCz0fc68AUwDcZAaQxAiaSIYHgwuD98"
export REACT_APP_COUNTRY_HEADER="cf-ipcountry"

export REACT_APP_STRIPE_API_KEY="pk_test_hH0fg7QCeCIE7ZmVN19h6l9C"

export REACT_APP_WALLET_APPLE_URL="https://itunes.apple.com/ru/app/ture/id1448865994?mt=8"
2 changes: 2 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ export REACT_APP_GENERATE_SOURCEMAP="false"
export REACT_APP_COUNTRY_HEADER="cf-ipcountry"

export REACT_APP_STRIPE_API_KEY="pk_live_ntT9fyeyExAz1z0RcrliUAkA"

export REACT_APP_WALLET_APPLE_URL="https://itunes.apple.com/ru/app/ture/id1448865994?mt=8"
2 changes: 2 additions & 0 deletions .env.stable
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ export REACT_APP_ZENDESK_TOKEN="yu5JvQvGXeCz0fc68AUwDcZAaQxAiaSIYHgwuD98"
export REACT_APP_COUNTRY_HEADER="cf-ipcountry"

export REACT_APP_STRIPE_API_KEY="pk_test_hH0fg7QCeCIE7ZmVN19h6l9C"

export REACT_APP_WALLET_APPLE_URL="https://itunes.apple.com/ru/app/ture/id1448865994?mt=8"
2 changes: 2 additions & 0 deletions .env.stage
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ export REACT_APP_COUNTRY_HEADER="cf-ipcountry"
export REACT_APP_STRIPE_API_KEY="pk_test_hH0fg7QCeCIE7ZmVN19h6l9C"

export REACT_APP_RRPARTNERID="5ba8ba0797a5281c5c422860"

export REACT_APP_WALLET_APPLE_URL="https://itunes.apple.com/ru/app/ture/id1448865994?mt=8"
16 changes: 15 additions & 1 deletion src/components/Confirmation/Confirmation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow strict

import React, { PureComponent } from 'react';
import type { Node } from 'react';

import { Button } from 'components/common/Button';
import { Modal } from 'components/Modal';
Expand All @@ -16,6 +17,8 @@ type PropsType = {
onConfirm: () => void,
onCancel: () => void,
handleCloseModal: () => void,
children?: Node,
disableConfirm?: boolean,
};

class Confirmation extends PureComponent<PropsType> {
Expand All @@ -25,6 +28,8 @@ class Confirmation extends PureComponent<PropsType> {
onConfirm: () => {},
onCancel: () => {},
handleCloseModal: () => {},
disableConfirm: false,
children: undefined,
};

render() {
Expand All @@ -37,6 +42,8 @@ class Confirmation extends PureComponent<PropsType> {
title,
description,
showModal,
disableConfirm,
children,
} = this.props;
return (
<Modal
Expand All @@ -46,11 +53,18 @@ class Confirmation extends PureComponent<PropsType> {
<aside styleName="container" data-test="confirmationPopup">
<h2 styleName="title">{title}</h2>
<p styleName="description">{description}</p>
{children != null && <div styleName="body">{children}</div>}
<div styleName="buttons">
<Button wireframe big onClick={onCancel} dataTest="cancel">
{cancelText}
</Button>
<Button big onClick={onConfirm} pink dataTest="confirm">
<Button
big
onClick={onConfirm}
pink
disabled={disableConfirm}
dataTest="confirm"
>
{confirmText}
</Button>
</div>
Expand Down
8 changes: 5 additions & 3 deletions src/components/Confirmation/Confirmation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
padding: 4rem 3.5rem;
background: $color_white;
max-width: 100%;

@media (min-width: $md) {
max-width: 82rem;
padding: 9rem;
Expand Down Expand Up @@ -36,7 +36,10 @@
margin-bottom: 6.25rem;
text-align: center;
max-width: 54rem;
}

.body {
margin-bottom: 6.25rem;
}

.buttons {
Expand All @@ -63,5 +66,4 @@
margin-right: 2rem;
}
}

}
}
1 change: 1 addition & 0 deletions src/components/Icon/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const iconsMap = {
leftArrowSlider: <LeftArrowSlider />,
login: <Login />,
logo: <Logo />,
//
logout: <Logout />,
magnifier: <Magnifier />,
minus: <Minus />,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Icon/svg/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 12 additions & 12 deletions src/components/common/Button/Button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
}

.disabled {
background-color: $color_grey_trivial;
border: 1px solid $color_grey_trivial;
color: $color_grey_minor;
cursor: default;
background-color: $color_grey_trivial !important;
border: 1px solid $color_grey_trivial !important;
color: $color_grey_minor !important;
cursor: default !important;
}

.iconic {
Expand Down Expand Up @@ -153,14 +153,14 @@
}
}

&.disabled {
opacity: 0.3;

&:hover {
color: $color_blue;
background: transparent;
}
}
//&.disabled {
// opacity: 0.3;
//
// &:hover {
// color: $color_blue;
// background: transparent;
// }
//}

&.pink {
border: 1px solid $color_pink;
Expand Down
2 changes: 0 additions & 2 deletions src/components/common/Tabs/Tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
.label {
position: relative;
padding: 0 2rem 2rem;
margin-bottom: -0.25rem;
cursor: pointer;
//text-transform: uppercase;

.labelText {
color: $color_grey_minor;
Expand Down
32 changes: 16 additions & 16 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ if (process.env.BROWSER && buildApp) {
ReactDOM.hydrate(App, document.getElementById('root'));
}
// $FlowIgnore
if (process.env.NODE_ENV === 'development' && module.hot) {
module.hot.accept('./components/entry.js', () => {
import('./components/entry.js')
.then(newInstance => {
const rebuildApp = newInstance.default;
rebuildApp()
.then(NewApp => {
ReactDOM.render(NewApp, document.getElementById('root'));
return true;
})
.catch(log.error);
return true;
})
.catch(log.error);
});
}
// if (process.env.NODE_ENV === 'development' && module.hot) {
// module.hot.accept('./components/entry.js', () => {
// import('./components/entry.js')
// .then(newInstance => {
// const rebuildApp = newInstance.default;
// rebuildApp()
// .then(NewApp => {
// ReactDOM.render(NewApp, document.getElementById('root'));
// return true;
// })
// .catch(log.error);
// return true;
// })
// .catch(log.error);
// });
// }
return true;
})
.catch(log.error);
Expand Down
6 changes: 4 additions & 2 deletions src/pages/Checkout/PaymentInfo/PaymentInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class PaymentInfo extends PureComponent<PropsType, StateType> {
<div>
Don’t you have one yet?{' '}
<a
href="https://itunes.apple.com/ru/app/ture/id1448865994?mt=8"
href={process.env.REACT_APP_WALLET_APPLE_URL}
target="_blank"
rel="noopener noreferrer"
>
Expand Down Expand Up @@ -285,7 +285,9 @@ class PaymentInfo extends PureComponent<PropsType, StateType> {
</div>
<div styleName="paymentInfo">
<div styleName="addressTitle">Address</div>
<div styleName="address">{wallet}</div>
<div styleName="address" data-test="walletNumberField">
{wallet}
</div>
<div styleName="amountTitle">Amount</div>
<div styleName="amount">
<strong>{`${formatPrice(amount)} ${
Expand Down
Loading

0 comments on commit 7d01a02

Please sign in to comment.