From 45373f655f68fdd0b320cde175b6108454ad4731 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 17 Jul 2021 20:32:22 +0530 Subject: Removed Franz paid plans features: - serviceLimit - planSelection - trialStatusBar and other Franz features that were for different tiers of subscription. --- src/components/ui/ActivateTrialButton/index.js | 107 --------------------- src/components/ui/FeatureList.js | 81 ++++------------ src/components/ui/PremiumFeatureContainer/index.js | 101 ------------------- .../ui/PremiumFeatureContainer/styles.js | 34 ------- src/components/ui/UpgradeButton/index.js | 83 ---------------- 5 files changed, 17 insertions(+), 389 deletions(-) delete mode 100644 src/components/ui/ActivateTrialButton/index.js delete mode 100644 src/components/ui/PremiumFeatureContainer/index.js delete mode 100644 src/components/ui/PremiumFeatureContainer/styles.js delete mode 100644 src/components/ui/UpgradeButton/index.js (limited to 'src/components/ui') diff --git a/src/components/ui/ActivateTrialButton/index.js b/src/components/ui/ActivateTrialButton/index.js deleted file mode 100644 index 8f4d21f64..000000000 --- a/src/components/ui/ActivateTrialButton/index.js +++ /dev/null @@ -1,107 +0,0 @@ -import React, { Component } from 'react'; -import PropTypes from 'prop-types'; -import { inject, observer } from 'mobx-react'; -import { defineMessages, intlShape } from 'react-intl'; -import classnames from 'classnames'; - -import { Button } from '@meetfranz/forms'; - -import UserStore from '../../../stores/UserStore'; -import UIStore from '../../../stores/UIStore'; - -const messages = defineMessages({ - action: { - id: 'feature.delayApp.upgrade.action', - defaultMessage: '!!!Get a Franz Supporter License', - }, - actionTrial: { - id: 'feature.delayApp.trial.action', - defaultMessage: '!!!Yes, I want the free 14 day trial of Franz Professional', - }, - shortAction: { - id: 'feature.delayApp.upgrade.actionShort', - defaultMessage: '!!!Upgrade account', - }, - shortActionTrial: { - id: 'feature.delayApp.trial.actionShort', - defaultMessage: '!!!Activate the free Franz Professional trial', - }, - noStringsAttachedHeadline: { - id: 'pricing.trial.terms.headline', - defaultMessage: '!!!No strings attached', - }, - noCreditCard: { - id: 'pricing.trial.terms.noCreditCard', - defaultMessage: '!!!No credit card required', - }, - automaticTrialEnd: { - id: 'pricing.trial.terms.automaticTrialEnd', - defaultMessage: '!!!Your free trial ends automatically after 14 days', - }, -}); - -@inject('stores', 'actions') @observer -class ActivateTrialButton extends Component { - static propTypes = { - className: PropTypes.string, - short: PropTypes.bool, - gaEventInfo: PropTypes.shape({ - category: PropTypes.string.isRequired, - event: PropTypes.string.isRequired, - label: PropTypes.string, - }), - }; - - static defaultProps = { - className: '', - short: false, - gaEventInfo: null, - } - - static contextTypes = { - intl: intlShape, - }; - - handleCTAClick() { - const { actions } = this.props; - - actions.ui.openSettings({ path: 'user' }); - } - - render() { - const { stores, className, short } = this.props; - const { intl } = this.context; - - const { hadSubscription } = stores.user.data; - - let label; - if (hadSubscription) { - label = short ? messages.shortAction : messages.action; - } else { - label = short ? messages.shortActionTrial : messages.actionTrial; - } - - return ( - - -
- {children} -
- - ) : children; - } -} - -PremiumFeatureContainer.wrappedComponent.propTypes = { - children: oneOrManyChildElements.isRequired, - stores: PropTypes.shape({ - user: PropTypes.instanceOf(UserStore).isRequired, - features: PropTypes.instanceOf(FeaturesStore).isRequired, - }).isRequired, - actions: PropTypes.shape({ - ui: PropTypes.instanceOf(UIStore).isRequired, - }).isRequired, -}; - -export default PremiumFeatureContainer; diff --git a/src/components/ui/PremiumFeatureContainer/styles.js b/src/components/ui/PremiumFeatureContainer/styles.js deleted file mode 100644 index 41881e044..000000000 --- a/src/components/ui/PremiumFeatureContainer/styles.js +++ /dev/null @@ -1,34 +0,0 @@ -export default theme => ({ - container: { - background: theme.colorSubscriptionContainerBackground, - border: theme.colorSubscriptionContainerBorder, - margin: [0, 0, 20, -20], - padding: 20, - 'border-radius': theme.borderRadius, - pointerEvents: 'none', - height: 'auto', - }, - titleContainer: { - display: 'flex', - }, - title: { - 'font-weight': 'bold', - color: theme.colorSubscriptionContainerTitle, - }, - actionButton: { - background: theme.colorSubscriptionContainerActionButtonBackground, - color: theme.colorSubscriptionContainerActionButtonColor, - 'margin-left': 'auto', - 'border-radius': theme.borderRadiusSmall, - padding: [4, 8], - 'font-size': 12, - pointerEvents: 'initial', - }, - content: { - opacity: 0.5, - 'margin-top': 20, - '& > :last-child': { - 'margin-bottom': 0, - }, - }, -}); diff --git a/src/components/ui/UpgradeButton/index.js b/src/components/ui/UpgradeButton/index.js deleted file mode 100644 index eade46cfd..000000000 --- a/src/components/ui/UpgradeButton/index.js +++ /dev/null @@ -1,83 +0,0 @@ -import React, { Component } from 'react'; -import PropTypes from 'prop-types'; -import { inject, observer } from 'mobx-react'; -import { defineMessages, intlShape } from 'react-intl'; - -import { Button } from '@meetfranz/forms'; - -import UserStore from '../../../stores/UserStore'; -import ActivateTrialButton from '../ActivateTrialButton'; -import UIStore from '../../../stores/UIStore'; - -const messages = defineMessages({ - upgradeToPro: { - id: 'global.upgradeButton.upgradeToPro', - defaultMessage: '!!!Upgrade to Franz Professional', - }, -}); - -@inject('stores', 'actions') @observer -class UpgradeButton extends Component { - static propTypes = { - // eslint-disable-next-line - classes: PropTypes.object.isRequired, - className: PropTypes.string, - gaEventInfo: PropTypes.shape({ - category: PropTypes.string.isRequired, - event: PropTypes.string.isRequired, - label: PropTypes.string, - }), - requiresPro: PropTypes.bool, - }; - - static defaultProps = { - className: '', - gaEventInfo: null, - requiresPro: false, - } - - static contextTypes = { - intl: intlShape, - }; - - handleCTAClick() { - const { actions } = this.props; - - actions.ui.openSettings({ path: 'user' }); - } - - render() { - const { stores, requiresPro } = this.props; - const { intl } = this.context; - - const { isPremium, isPersonal } = stores.user; - - if (isPremium && isPersonal && requiresPro) { - return ( -