Skip to content

Commit

Permalink
chore: mc modify iap copy (#404)
Browse files Browse the repository at this point in the history
* fix: add MCR ios terms

* fix: lint

* fix: add copy
  • Loading branch information
alexandra-marin authored and seavan committed Dec 19, 2018
1 parent 6bfb532 commit 65fddb5
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 9 deletions.
14 changes: 5 additions & 9 deletions app/components/settings/account-upgrade-option.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import BackIcon from '../layout/back-icon';
import routes from '../routes/routes';
import { uiState } from '../states';
import payments from '../payments/payments';
import whiteLabel from '../whitelabel/white-label-components';

const { width } = Dimensions.get('window');

Expand Down Expand Up @@ -66,15 +67,10 @@ class AccountUpgradeOption extends SafeComponent {
flexGrow: 1,
padding: vars.spacing.large.midi
}}>
<Text
semibold
style={{
color: vars.black54,
fontSize: vars.font.size12,
paddingBottom: 60
}}>
{tx(this.paymentInfo)}
</Text>
<whiteLabel.TermsOfUseUpgrade
paymentInfo={this.paymentInfo}
title={this.title}
/>
{buttons.roundBlueBgButton(tx('button_upgrade'), this.action, null, null, {
width: vars.wideRoundedButtonWidth
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import MedcryptorContactAddWarning from './medcryptor-contact-add-warning';
import MedcryptorChannelInvite from './medcryptor-channel-invite';
import MedcryptorSettingsHelpButton from './medcryptor-settings-help-button';
import MedcryptorManageAccountButton from './medcryptor-manage-account-button';
import TermsOfUseUpgradeMedcryptor from './tos-upgrade-mcr';

export default {
ContactAddWarning: MedcryptorContactAddWarning,
TermsOfUseUpgrade: TermsOfUseUpgradeMedcryptor,
SettingsHelpButton: MedcryptorSettingsHelpButton,
ManageAccountButton: MedcryptorManageAccountButton,
ChatList: MedcryptorChatList,
Expand Down
82 changes: 82 additions & 0 deletions app/components/whitelabel/medcryptor/tos-upgrade-mcr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import React from 'react';
import { observer } from 'mobx-react/native';
import { View, Linking, Platform } from 'react-native';
import { action } from 'mobx';
import { tx } from '../../utils/translator';
import vars from '../../../styles/vars';
import SafeComponent from '../../shared/safe-component';
import Text from '../../controls/custom-text';

@observer
export default class TermsOfUseUpgradeMedcryptor extends SafeComponent {
@action.bound
readTos() {
Linking.openURL('https://medcryptor.com/legal/terms-of-use');
}

@action.bound
readPrivacy() {
Linking.openURL('https://medcryptor.com/legal/privacy-policy');
}

get annual() {
return `Annual plans will be charged $300 AUD/year to your iTunes account at confirmation of purchase. You can manage your subscriptions and turn off auto-renewal by going to your iTunes Account Settings after purchase.
Your subscription will renew automatically at the end of each billing period unless you disable auto-renew at least 24-hours before the end of your current billing period.
If your subscription is renewed, your account will be charged for renewal within 24-hours prior to the end of the current period.`;
}

get monthly() {
return `Monthly plans will be charged $25 AUD/month to your iTunes account at confirmation of purchase. You can manage your subscriptions and turn off auto-renewal by going to your iTunes Account Settings after purchase.
Your subscription will renew automatically at the end of each billing period unless you disable auto-renew at least 24-hours before the end of your current billing period.
If your subscription is renewed, your account will be charged for renewal within 24-hours prior to the end of the current period.`;
}

get ios() {
const { title } = this.props;
return (
<View>
<Text
semibold
style={{
color: vars.black54,
fontSize: vars.font.size12,
paddingBottom: 10
}}>
{tx(title === 'title_monthly' ? this.monthly : this.annual)}
</Text>
<Text
style={{ color: vars.peerioBlue, paddingTop: vars.spacing.medium.maxi2x }}
onPress={this.readTos}>
{tx('title_termsOfUse')}
</Text>
<Text
style={{ color: vars.peerioBlue, paddingBottom: vars.spacing.medium.maxi2x }}
onPress={this.readPrivacy}>
{tx('title_privacyPolicy')}
</Text>
</View>
);
}

get android() {
return (
<Text
semibold
style={{
color: vars.black54,
fontSize: vars.font.size12,
paddingBottom: 60
}}>
{tx(this.props.paymentInfo)}
</Text>
);
}

renderThrow() {
return Platform.OS === 'ios' ? this.ios : this.android;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import PeerioContactAddWarning from './peerio-contact-add-warning';
import PeerioSettingsHelpButton from './peerio-settings-help-button';
import ChannelInvite from '../../messaging/channel-invite';
import PeerioManageAccountButton from './peerio-manage-account-button';
import TermsOfUseUpgradePeerio from './tos-upgrade-peerio';

export default {
ContactAddWarning: PeerioContactAddWarning,
TermsOfUseUpgrade: TermsOfUseUpgradePeerio,
SettingsHelpButton: PeerioSettingsHelpButton,
ManageAccountButton: PeerioManageAccountButton,
ChatList,
Expand Down
23 changes: 23 additions & 0 deletions app/components/whitelabel/peerio/tos-upgrade-peerio.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import { observer } from 'mobx-react/native';
import SafeComponent from '../../shared/safe-component';
import Text from '../../controls/custom-text';
import { vars } from '../../../styles/styles';
import { tx } from '../../utils/translator';

@observer
export default class TermsOfUseUpgradePeerio extends SafeComponent {
renderThrow() {
return (
<Text
semibold
style={{
color: vars.black54,
fontSize: vars.font.size12,
paddingBottom: 60
}}>
{tx(this.props.paymentInfo)}
</Text>
);
}
}

0 comments on commit 65fddb5

Please sign in to comment.