diff options
author | 2021-07-17 20:32:22 +0530 | |
---|---|---|
committer | 2021-07-20 16:02:15 +0000 | |
commit | 45373f655f68fdd0b320cde175b6108454ad4731 (patch) | |
tree | c1ccb0c73639d754b68a36a1977b74471fe4b566 /src/components/ui/ActivateTrialButton | |
parent | New Crowdin updates (#1668) (diff) | |
download | ferdium-app-45373f655f68fdd0b320cde175b6108454ad4731.tar.gz ferdium-app-45373f655f68fdd0b320cde175b6108454ad4731.tar.zst ferdium-app-45373f655f68fdd0b320cde175b6108454ad4731.zip |
Removed Franz paid plans features:
- serviceLimit
- planSelection
- trialStatusBar
and other Franz features that were for different tiers of subscription.
Diffstat (limited to 'src/components/ui/ActivateTrialButton')
-rw-r--r-- | src/components/ui/ActivateTrialButton/index.js | 107 |
1 files changed, 0 insertions, 107 deletions
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 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { inject, observer } from 'mobx-react'; | ||
4 | import { defineMessages, intlShape } from 'react-intl'; | ||
5 | import classnames from 'classnames'; | ||
6 | |||
7 | import { Button } from '@meetfranz/forms'; | ||
8 | |||
9 | import UserStore from '../../../stores/UserStore'; | ||
10 | import UIStore from '../../../stores/UIStore'; | ||
11 | |||
12 | const messages = defineMessages({ | ||
13 | action: { | ||
14 | id: 'feature.delayApp.upgrade.action', | ||
15 | defaultMessage: '!!!Get a Franz Supporter License', | ||
16 | }, | ||
17 | actionTrial: { | ||
18 | id: 'feature.delayApp.trial.action', | ||
19 | defaultMessage: '!!!Yes, I want the free 14 day trial of Franz Professional', | ||
20 | }, | ||
21 | shortAction: { | ||
22 | id: 'feature.delayApp.upgrade.actionShort', | ||
23 | defaultMessage: '!!!Upgrade account', | ||
24 | }, | ||
25 | shortActionTrial: { | ||
26 | id: 'feature.delayApp.trial.actionShort', | ||
27 | defaultMessage: '!!!Activate the free Franz Professional trial', | ||
28 | }, | ||
29 | noStringsAttachedHeadline: { | ||
30 | id: 'pricing.trial.terms.headline', | ||
31 | defaultMessage: '!!!No strings attached', | ||
32 | }, | ||
33 | noCreditCard: { | ||
34 | id: 'pricing.trial.terms.noCreditCard', | ||
35 | defaultMessage: '!!!No credit card required', | ||
36 | }, | ||
37 | automaticTrialEnd: { | ||
38 | id: 'pricing.trial.terms.automaticTrialEnd', | ||
39 | defaultMessage: '!!!Your free trial ends automatically after 14 days', | ||
40 | }, | ||
41 | }); | ||
42 | |||
43 | @inject('stores', 'actions') @observer | ||
44 | class ActivateTrialButton extends Component { | ||
45 | static propTypes = { | ||
46 | className: PropTypes.string, | ||
47 | short: PropTypes.bool, | ||
48 | gaEventInfo: PropTypes.shape({ | ||
49 | category: PropTypes.string.isRequired, | ||
50 | event: PropTypes.string.isRequired, | ||
51 | label: PropTypes.string, | ||
52 | }), | ||
53 | }; | ||
54 | |||
55 | static defaultProps = { | ||
56 | className: '', | ||
57 | short: false, | ||
58 | gaEventInfo: null, | ||
59 | } | ||
60 | |||
61 | static contextTypes = { | ||
62 | intl: intlShape, | ||
63 | }; | ||
64 | |||
65 | handleCTAClick() { | ||
66 | const { actions } = this.props; | ||
67 | |||
68 | actions.ui.openSettings({ path: 'user' }); | ||
69 | } | ||
70 | |||
71 | render() { | ||
72 | const { stores, className, short } = this.props; | ||
73 | const { intl } = this.context; | ||
74 | |||
75 | const { hadSubscription } = stores.user.data; | ||
76 | |||
77 | let label; | ||
78 | if (hadSubscription) { | ||
79 | label = short ? messages.shortAction : messages.action; | ||
80 | } else { | ||
81 | label = short ? messages.shortActionTrial : messages.actionTrial; | ||
82 | } | ||
83 | |||
84 | return ( | ||
85 | <Button | ||
86 | label={intl.formatMessage(label)} | ||
87 | className={classnames({ | ||
88 | [className]: className, | ||
89 | })} | ||
90 | buttonType="inverted" | ||
91 | onClick={this.handleCTAClick.bind(this)} | ||
92 | busy={stores.user.activateTrialRequest.isExecuting} | ||
93 | /> | ||
94 | ); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | export default ActivateTrialButton; | ||
99 | |||
100 | ActivateTrialButton.wrappedComponent.propTypes = { | ||
101 | stores: PropTypes.shape({ | ||
102 | user: PropTypes.instanceOf(UserStore).isRequired, | ||
103 | }).isRequired, | ||
104 | actions: PropTypes.shape({ | ||
105 | ui: PropTypes.instanceOf(UIStore).isRequired, | ||
106 | }).isRequired, | ||
107 | }; | ||