diff options
author | 2021-08-13 00:45:01 +0530 | |
---|---|---|
committer | 2021-08-13 00:45:01 +0530 | |
commit | 2d27d5e66649d4f5baf127a53ee5ae524eae3a59 (patch) | |
tree | c592ea219ac8cd987fc367f57b54034c450ab2ab /src/components/subscription/TrialForm.js | |
parent | Ferdi v5.6.0 (diff) | |
parent | 5.6.1-nightly.24 [skip ci] (diff) | |
download | ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.gz ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.zst ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.zip |
chore: merge from nightly branch into release branch in prep for next beta
Diffstat (limited to 'src/components/subscription/TrialForm.js')
-rw-r--r-- | src/components/subscription/TrialForm.js | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/src/components/subscription/TrialForm.js b/src/components/subscription/TrialForm.js deleted file mode 100644 index d61b779ed..000000000 --- a/src/components/subscription/TrialForm.js +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import { defineMessages, intlShape } from 'react-intl'; | ||
5 | import injectSheet from 'react-jss'; | ||
6 | |||
7 | import { H3, H2 } from '@meetfranz/ui'; | ||
8 | |||
9 | import { Button } from '@meetfranz/forms'; | ||
10 | import { FeatureList } from '../ui/FeatureList'; | ||
11 | import { FeatureItem } from '../ui/FeatureItem'; | ||
12 | |||
13 | const messages = defineMessages({ | ||
14 | submitButtonLabel: { | ||
15 | id: 'subscription.cta.activateTrial', | ||
16 | defaultMessage: '!!!Yes, start the free Franz Professional trial', | ||
17 | }, | ||
18 | allOptionsButton: { | ||
19 | id: 'subscription.cta.allOptions', | ||
20 | defaultMessage: '!!!See all options', | ||
21 | }, | ||
22 | teaserHeadline: { | ||
23 | id: 'settings.account.headlineTrialUpgrade', | ||
24 | defaultMessage: '!!!Get the free 14 day Franz Professional Trial', | ||
25 | }, | ||
26 | includedFeatures: { | ||
27 | id: 'subscription.includedProFeatures', | ||
28 | defaultMessage: '!!!The Franz Professional Plan includes:', | ||
29 | }, | ||
30 | noStringsAttachedHeadline: { | ||
31 | id: 'pricing.trial.terms.headline', | ||
32 | defaultMessage: '!!!No strings attached', | ||
33 | }, | ||
34 | noCreditCard: { | ||
35 | id: 'pricing.trial.terms.noCreditCard', | ||
36 | defaultMessage: '!!!No credit card required', | ||
37 | }, | ||
38 | automaticTrialEnd: { | ||
39 | id: 'pricing.trial.terms.automaticTrialEnd', | ||
40 | defaultMessage: '!!!Your free trial ends automatically after 14 days', | ||
41 | }, | ||
42 | }); | ||
43 | |||
44 | const styles = theme => ({ | ||
45 | activateTrialButton: { | ||
46 | margin: [40, 'auto', 10], | ||
47 | display: 'flex', | ||
48 | }, | ||
49 | allOptionsButton: { | ||
50 | margin: [0, 0, 40], | ||
51 | background: 'none', | ||
52 | border: 'none', | ||
53 | color: theme.colorText, | ||
54 | }, | ||
55 | keyTerms: { | ||
56 | marginTop: 20, | ||
57 | }, | ||
58 | }); | ||
59 | |||
60 | export default @injectSheet(styles) @observer class TrialForm extends Component { | ||
61 | static propTypes = { | ||
62 | activateTrial: PropTypes.func.isRequired, | ||
63 | isActivatingTrial: PropTypes.bool.isRequired, | ||
64 | showAllOptions: PropTypes.func.isRequired, | ||
65 | classes: PropTypes.object.isRequired, | ||
66 | }; | ||
67 | |||
68 | static contextTypes = { | ||
69 | intl: intlShape, | ||
70 | }; | ||
71 | |||
72 | render() { | ||
73 | const { | ||
74 | isActivatingTrial, | ||
75 | activateTrial, | ||
76 | showAllOptions, | ||
77 | classes, | ||
78 | } = this.props; | ||
79 | const { intl } = this.context; | ||
80 | |||
81 | return ( | ||
82 | <> | ||
83 | <H2>{intl.formatMessage(messages.teaserHeadline)}</H2> | ||
84 | <H3 className={classes.keyTerms}> | ||
85 | {intl.formatMessage(messages.noStringsAttachedHeadline)} | ||
86 | </H3> | ||
87 | <ul> | ||
88 | <FeatureItem icon="👉" name={intl.formatMessage(messages.noCreditCard)} /> | ||
89 | <FeatureItem icon="👉" name={intl.formatMessage(messages.automaticTrialEnd)} /> | ||
90 | </ul> | ||
91 | |||
92 | <Button | ||
93 | label={intl.formatMessage(messages.submitButtonLabel)} | ||
94 | className={classes.activateTrialButton} | ||
95 | busy={isActivatingTrial} | ||
96 | onClick={activateTrial} | ||
97 | /> | ||
98 | <Button | ||
99 | label={intl.formatMessage(messages.allOptionsButton)} | ||
100 | className={classes.allOptionsButton} | ||
101 | onClick={showAllOptions} | ||
102 | stretch | ||
103 | /> | ||
104 | <div className="subscription__premium-info"> | ||
105 | <H3> | ||
106 | {intl.formatMessage(messages.includedFeatures)} | ||
107 | </H3> | ||
108 | <div className="subscription"> | ||
109 | <FeatureList /> | ||
110 | </div> | ||
111 | </div> | ||
112 | </> | ||
113 | ); | ||
114 | } | ||
115 | } | ||