From 65fddb59304ea2e54a20ce2a54a8cb88c1669208 Mon Sep 17 00:00:00 2001 From: Alexandra Marin Date: Wed, 19 Dec 2018 18:03:17 +0200 Subject: [PATCH] chore: mc modify iap copy (#404) * fix: add MCR ios terms * fix: lint * fix: add copy --- .../settings/account-upgrade-option.js | 14 ++-- .../medcryptor-white-label-components.js | 2 + .../whitelabel/medcryptor/tos-upgrade-mcr.js | 82 +++++++++++++++++++ .../peerio/peerio-white-label-components.js | 2 + .../whitelabel/peerio/tos-upgrade-peerio.js | 23 ++++++ 5 files changed, 114 insertions(+), 9 deletions(-) create mode 100644 app/components/whitelabel/medcryptor/tos-upgrade-mcr.js create mode 100644 app/components/whitelabel/peerio/tos-upgrade-peerio.js diff --git a/app/components/settings/account-upgrade-option.js b/app/components/settings/account-upgrade-option.js index 9ecbb14ce..29bf7626c 100644 --- a/app/components/settings/account-upgrade-option.js +++ b/app/components/settings/account-upgrade-option.js @@ -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'); @@ -66,15 +67,10 @@ class AccountUpgradeOption extends SafeComponent { flexGrow: 1, padding: vars.spacing.large.midi }}> - - {tx(this.paymentInfo)} - + {buttons.roundBlueBgButton(tx('button_upgrade'), this.action, null, null, { width: vars.wideRoundedButtonWidth })} diff --git a/app/components/whitelabel/medcryptor/medcryptor-white-label-components.js b/app/components/whitelabel/medcryptor/medcryptor-white-label-components.js index 02399b6e7..85ab01242 100644 --- a/app/components/whitelabel/medcryptor/medcryptor-white-label-components.js +++ b/app/components/whitelabel/medcryptor/medcryptor-white-label-components.js @@ -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, diff --git a/app/components/whitelabel/medcryptor/tos-upgrade-mcr.js b/app/components/whitelabel/medcryptor/tos-upgrade-mcr.js new file mode 100644 index 000000000..8ff1572a3 --- /dev/null +++ b/app/components/whitelabel/medcryptor/tos-upgrade-mcr.js @@ -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 ( + + + {tx(title === 'title_monthly' ? this.monthly : this.annual)} + + + {tx('title_termsOfUse')} + + + {tx('title_privacyPolicy')} + + + ); + } + + get android() { + return ( + + {tx(this.props.paymentInfo)} + + ); + } + + renderThrow() { + return Platform.OS === 'ios' ? this.ios : this.android; + } +} diff --git a/app/components/whitelabel/peerio/peerio-white-label-components.js b/app/components/whitelabel/peerio/peerio-white-label-components.js index 372dc8035..bc648f35a 100644 --- a/app/components/whitelabel/peerio/peerio-white-label-components.js +++ b/app/components/whitelabel/peerio/peerio-white-label-components.js @@ -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, diff --git a/app/components/whitelabel/peerio/tos-upgrade-peerio.js b/app/components/whitelabel/peerio/tos-upgrade-peerio.js new file mode 100644 index 000000000..88a172915 --- /dev/null +++ b/app/components/whitelabel/peerio/tos-upgrade-peerio.js @@ -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 ( + + {tx(this.props.paymentInfo)} + + ); + } +}