aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/Subscription.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-11-15 11:10:17 +0100
committerLibravatar GitHub <noreply@github.com>2017-11-15 11:10:17 +0100
commite875a8d52b4acc906a0316afa65e338f8fb85d32 (patch)
tree055e75c25a9a966c677e88e7206b6ad1abaa6dde /src/components/ui/Subscription.js
parentfix(Notifications): Fix notification data transformers (@dannyqiu) (diff)
parentMerge branch 'develop' into feature/pricing-info (diff)
downloadferdium-app-e875a8d52b4acc906a0316afa65e338f8fb85d32.tar.gz
ferdium-app-e875a8d52b4acc906a0316afa65e338f8fb85d32.tar.zst
ferdium-app-e875a8d52b4acc906a0316afa65e338f8fb85d32.zip
Merge pull request #277 from meetfranz/feature/pricing-info
Pricing Info
Diffstat (limited to 'src/components/ui/Subscription.js')
-rw-r--r--src/components/ui/Subscription.js20
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';
7import Radio from '../ui/Radio'; 7import Radio from '../ui/Radio';
8import Button from '../ui/Button'; 8import Button from '../ui/Button';
9import Loader from '../ui/Loader'; 9import Loader from '../ui/Loader';
10import { isWindows } from '../../environment';
10 11
11import { required } from '../../helpers/validation-helpers'; 12import { 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 }