diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-09-07 00:05:46 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-09-07 00:05:46 +0200 |
commit | 31d2d5a11cbf9f6fd41bff273aad1d23e014caa8 (patch) | |
tree | a185ed33e104844737a2a22015110463254b6583 /src | |
parent | Update CHANGELOG.md (diff) | |
download | ferdium-app-31d2d5a11cbf9f6fd41bff273aad1d23e014caa8.tar.gz ferdium-app-31d2d5a11cbf9f6fd41bff273aad1d23e014caa8.tar.zst ferdium-app-31d2d5a11cbf9f6fd41bff273aad1d23e014caa8.zip |
Make trial activation more obvious
Diffstat (limited to 'src')
-rw-r--r-- | src/components/ui/ActivateTrialButton/index.js | 24 | ||||
-rw-r--r-- | src/i18n/messages/src/components/ui/ActivateTrialButton/index.json | 55 |
2 files changed, 65 insertions, 14 deletions
diff --git a/src/components/ui/ActivateTrialButton/index.js b/src/components/ui/ActivateTrialButton/index.js index c3e5f4a6f..151d7cc6d 100644 --- a/src/components/ui/ActivateTrialButton/index.js +++ b/src/components/ui/ActivateTrialButton/index.js | |||
@@ -5,9 +5,11 @@ import { defineMessages, intlShape } from 'react-intl'; | |||
5 | import classnames from 'classnames'; | 5 | import classnames from 'classnames'; |
6 | 6 | ||
7 | import { Button } from '@meetfranz/forms'; | 7 | import { Button } from '@meetfranz/forms'; |
8 | import { H2 } from '@meetfranz/ui'; | ||
8 | import { gaEvent } from '../../../lib/analytics'; | 9 | import { gaEvent } from '../../../lib/analytics'; |
9 | 10 | ||
10 | import UserStore from '../../../stores/UserStore'; | 11 | import UserStore from '../../../stores/UserStore'; |
12 | import FeatureItem from '../FeatureItem'; | ||
11 | 13 | ||
12 | const messages = defineMessages({ | 14 | const messages = defineMessages({ |
13 | action: { | 15 | action: { |
@@ -26,13 +28,23 @@ const messages = defineMessages({ | |||
26 | id: 'feature.delayApp.trial.actionShort', | 28 | id: 'feature.delayApp.trial.actionShort', |
27 | defaultMessage: '!!!Activate the free Franz Professional trial', | 29 | defaultMessage: '!!!Activate the free Franz Professional trial', |
28 | }, | 30 | }, |
31 | noStringsAttachedHeadline: { | ||
32 | id: 'pricing.trial.terms.headline', | ||
33 | defaultMessage: '!!!No strings attached', | ||
34 | }, | ||
35 | noCreditCard: { | ||
36 | id: 'pricing.trial.terms.noCreditCard', | ||
37 | defaultMessage: '!!!No credit card required', | ||
38 | }, | ||
39 | automaticTrialEnd: { | ||
40 | id: 'pricing.trial.terms.automaticTrialEnd', | ||
41 | defaultMessage: '!!!Your free trial ends automatically after 14 days', | ||
42 | }, | ||
29 | }); | 43 | }); |
30 | 44 | ||
31 | @inject('stores', 'actions') @observer | 45 | @inject('stores', 'actions') @observer |
32 | class ActivateTrialButton extends Component { | 46 | class ActivateTrialButton extends Component { |
33 | static propTypes = { | 47 | static propTypes = { |
34 | // eslint-disable-next-line | ||
35 | classes: PropTypes.object.isRequired, | ||
36 | className: PropTypes.string, | 48 | className: PropTypes.string, |
37 | short: PropTypes.bool, | 49 | short: PropTypes.bool, |
38 | gaEventInfo: PropTypes.shape({ | 50 | gaEventInfo: PropTypes.shape({ |
@@ -55,19 +67,19 @@ class ActivateTrialButton extends Component { | |||
55 | handleCTAClick() { | 67 | handleCTAClick() { |
56 | const { actions, stores, gaEventInfo } = this.props; | 68 | const { actions, stores, gaEventInfo } = this.props; |
57 | const { hadSubscription } = stores.user.data; | 69 | const { hadSubscription } = stores.user.data; |
58 | const { defaultTrialPlan } = stores.features.features; | 70 | // const { defaultTrialPlan } = stores.features.features; |
59 | 71 | ||
60 | let label = ''; | 72 | let label = ''; |
61 | if (!hadSubscription) { | 73 | if (!hadSubscription) { |
62 | actions.user.activateTrial({ planId: defaultTrialPlan }); | 74 | // actions.user.activateTrial({ planId: defaultTrialPlan }); |
63 | 75 | ||
64 | label = 'Start Trial'; | 76 | label = 'Start Trial'; |
65 | } else { | 77 | } else { |
66 | actions.ui.openSettings({ path: 'user' }); | ||
67 | |||
68 | label = 'Upgrade Account'; | 78 | label = 'Upgrade Account'; |
69 | } | 79 | } |
70 | 80 | ||
81 | actions.ui.openSettings({ path: 'user' }); | ||
82 | |||
71 | if (gaEventInfo) { | 83 | if (gaEventInfo) { |
72 | const { category, event } = gaEventInfo; | 84 | const { category, event } = gaEventInfo; |
73 | gaEvent(category, event, label); | 85 | gaEvent(category, event, label); |
diff --git a/src/i18n/messages/src/components/ui/ActivateTrialButton/index.json b/src/i18n/messages/src/components/ui/ActivateTrialButton/index.json index 08c1a9293..464de5c63 100644 --- a/src/i18n/messages/src/components/ui/ActivateTrialButton/index.json +++ b/src/i18n/messages/src/components/ui/ActivateTrialButton/index.json | |||
@@ -4,11 +4,11 @@ | |||
4 | "defaultMessage": "!!!Get a Franz Supporter License", | 4 | "defaultMessage": "!!!Get a Franz Supporter License", |
5 | "file": "src/components/ui/ActivateTrialButton/index.js", | 5 | "file": "src/components/ui/ActivateTrialButton/index.js", |
6 | "start": { | 6 | "start": { |
7 | "line": 13, | 7 | "line": 15, |
8 | "column": 10 | 8 | "column": 10 |
9 | }, | 9 | }, |
10 | "end": { | 10 | "end": { |
11 | "line": 16, | 11 | "line": 18, |
12 | "column": 3 | 12 | "column": 3 |
13 | } | 13 | } |
14 | }, | 14 | }, |
@@ -17,11 +17,11 @@ | |||
17 | "defaultMessage": "!!!Yes, I want the free 14 day trial of Franz Professional", | 17 | "defaultMessage": "!!!Yes, I want the free 14 day trial of Franz Professional", |
18 | "file": "src/components/ui/ActivateTrialButton/index.js", | 18 | "file": "src/components/ui/ActivateTrialButton/index.js", |
19 | "start": { | 19 | "start": { |
20 | "line": 17, | 20 | "line": 19, |
21 | "column": 15 | 21 | "column": 15 |
22 | }, | 22 | }, |
23 | "end": { | 23 | "end": { |
24 | "line": 20, | 24 | "line": 22, |
25 | "column": 3 | 25 | "column": 3 |
26 | } | 26 | } |
27 | }, | 27 | }, |
@@ -30,11 +30,11 @@ | |||
30 | "defaultMessage": "!!!Upgrade account", | 30 | "defaultMessage": "!!!Upgrade account", |
31 | "file": "src/components/ui/ActivateTrialButton/index.js", | 31 | "file": "src/components/ui/ActivateTrialButton/index.js", |
32 | "start": { | 32 | "start": { |
33 | "line": 21, | 33 | "line": 23, |
34 | "column": 15 | 34 | "column": 15 |
35 | }, | 35 | }, |
36 | "end": { | 36 | "end": { |
37 | "line": 24, | 37 | "line": 26, |
38 | "column": 3 | 38 | "column": 3 |
39 | } | 39 | } |
40 | }, | 40 | }, |
@@ -43,11 +43,50 @@ | |||
43 | "defaultMessage": "!!!Activate the free Franz Professional trial", | 43 | "defaultMessage": "!!!Activate the free Franz Professional trial", |
44 | "file": "src/components/ui/ActivateTrialButton/index.js", | 44 | "file": "src/components/ui/ActivateTrialButton/index.js", |
45 | "start": { | 45 | "start": { |
46 | "line": 25, | 46 | "line": 27, |
47 | "column": 20 | 47 | "column": 20 |
48 | }, | 48 | }, |
49 | "end": { | 49 | "end": { |
50 | "line": 28, | 50 | "line": 30, |
51 | "column": 3 | ||
52 | } | ||
53 | }, | ||
54 | { | ||
55 | "id": "pricing.trial.terms.headline", | ||
56 | "defaultMessage": "!!!No strings attached", | ||
57 | "file": "src/components/ui/ActivateTrialButton/index.js", | ||
58 | "start": { | ||
59 | "line": 31, | ||
60 | "column": 29 | ||
61 | }, | ||
62 | "end": { | ||
63 | "line": 34, | ||
64 | "column": 3 | ||
65 | } | ||
66 | }, | ||
67 | { | ||
68 | "id": "pricing.trial.terms.noCreditCard", | ||
69 | "defaultMessage": "!!!No credit card required", | ||
70 | "file": "src/components/ui/ActivateTrialButton/index.js", | ||
71 | "start": { | ||
72 | "line": 35, | ||
73 | "column": 16 | ||
74 | }, | ||
75 | "end": { | ||
76 | "line": 38, | ||
77 | "column": 3 | ||
78 | } | ||
79 | }, | ||
80 | { | ||
81 | "id": "pricing.trial.terms.automaticTrialEnd", | ||
82 | "defaultMessage": "!!!Your free trial ends automatically after 14 days", | ||
83 | "file": "src/components/ui/ActivateTrialButton/index.js", | ||
84 | "start": { | ||
85 | "line": 39, | ||
86 | "column": 21 | ||
87 | }, | ||
88 | "end": { | ||
89 | "line": 42, | ||
51 | "column": 3 | 90 | "column": 3 |
52 | } | 91 | } |
53 | } | 92 | } |