diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/ui/Subscription.js | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/components/ui/Subscription.js b/src/components/ui/Subscription.js index fe0925a26..80ee2d9d2 100644 --- a/src/components/ui/Subscription.js +++ b/src/components/ui/Subscription.js | |||
@@ -7,6 +7,7 @@ import Form from '../../lib/Form'; | |||
7 | import Radio from '../ui/Radio'; | 7 | import Radio from '../ui/Radio'; |
8 | import Button from '../ui/Button'; | 8 | import Button from '../ui/Button'; |
9 | import Loader from '../ui/Loader'; | 9 | import Loader from '../ui/Loader'; |
10 | import { isWindows } from '../../environment'; | ||
10 | 11 | ||
11 | import { required } from '../../helpers/validation-helpers'; | 12 | import { required } from '../../helpers/validation-helpers'; |
12 | 13 | ||
@@ -93,6 +94,10 @@ const messages = defineMessages({ | |||
93 | id: 'subscription.mining.moreInformation', | 94 | id: 'subscription.mining.moreInformation', |
94 | defaultMessage: '!!!Get more information about this plan', | 95 | defaultMessage: '!!!Get more information about this plan', |
95 | }, | 96 | }, |
97 | euTaxInfo: { | ||
98 | id: 'subscription.euTaxInfo', | ||
99 | defaultMessage: '!!!EU residents: local sales tax may apply', | ||
100 | }, | ||
96 | }); | 101 | }); |
97 | 102 | ||
98 | @observer | 103 | @observer |
@@ -144,14 +149,18 @@ export default class SubscriptionForm extends Component { | |||
144 | label: `€ ${Object.hasOwnProperty.call(this.props.plan, 'year') | 149 | label: `€ ${Object.hasOwnProperty.call(this.props.plan, 'year') |
145 | ? `${this.props.plan.year.price} / ${intl.formatMessage(messages.typeYearly)}` | 150 | ? `${this.props.plan.year.price} / ${intl.formatMessage(messages.typeYearly)}` |
146 | : 'yearly'}`, | 151 | : 'yearly'}`, |
147 | }, { | ||
148 | value: 'mining', | ||
149 | label: intl.formatMessage(messages.typeMining), | ||
150 | }], | 152 | }], |
151 | }, | 153 | }, |
152 | }, | 154 | }, |
153 | }; | 155 | }; |
154 | 156 | ||
157 | if (!isWindows) { | ||
158 | form.fields.paymentTier.options.push({ | ||
159 | value: 'mining', | ||
160 | label: intl.formatMessage(messages.typeMining), | ||
161 | }); | ||
162 | } | ||
163 | |||
155 | if (this.props.showSkipOption) { | 164 | if (this.props.showSkipOption) { |
156 | form.fields.paymentTier.options.unshift({ | 165 | form.fields.paymentTier.options.unshift({ |
157 | value: 'skip', | 166 | value: 'skip', |
@@ -259,6 +268,11 @@ export default class SubscriptionForm extends Component { | |||
259 | onClick={() => handlePayment(this.form.$('paymentTier').value)} | 268 | onClick={() => handlePayment(this.form.$('paymentTier').value)} |
260 | /> | 269 | /> |
261 | )} | 270 | )} |
271 | {this.form.$('paymentTier').value !== 'skip' && this.form.$('paymentTier').value !== 'mining' && ( | ||
272 | <p className="legal"> | ||
273 | {intl.formatMessage(messages.euTaxInfo)} | ||
274 | </p> | ||
275 | )} | ||
262 | </Loader> | 276 | </Loader> |
263 | ); | 277 | ); |
264 | } | 278 | } |