aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/services
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-08-05 13:24:35 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-08-05 13:24:35 +0200
commit76559f2895012803aed3256ce521b9cfff2f63b8 (patch)
treef511ed44ab8cb16af257e58ff960da1fd60c5876 /src/components/services
parentAdd trial onboarding during signup (diff)
downloadferdium-app-76559f2895012803aed3256ce521b9cfff2f63b8.tar.gz
ferdium-app-76559f2895012803aed3256ce521b9cfff2f63b8.tar.zst
ferdium-app-76559f2895012803aed3256ce521b9cfff2f63b8.zip
WIP: add option to activate trial
Diffstat (limited to 'src/components/services')
-rw-r--r--src/components/services/content/Services.js61
1 files changed, 32 insertions, 29 deletions
diff --git a/src/components/services/content/Services.js b/src/components/services/content/Services.js
index 7f1624003..b71ddd8e6 100644
--- a/src/components/services/content/Services.js
+++ b/src/components/services/content/Services.js
@@ -26,7 +26,8 @@ const styles = {
26 confettiContainer: { 26 confettiContainer: {
27 position: 'absolute', 27 position: 'absolute',
28 width: '100%', 28 width: '100%',
29 zIndex: 0, 29 zIndex: 9999,
30 pointerEvents: 'none',
30 }, 31 },
31}; 32};
32 33
@@ -41,6 +42,7 @@ export default @observer @injectSheet(styles) class Services extends Component {
41 openSettings: PropTypes.func.isRequired, 42 openSettings: PropTypes.func.isRequired,
42 update: PropTypes.func.isRequired, 43 update: PropTypes.func.isRequired,
43 userHasCompletedSignup: PropTypes.bool.isRequired, 44 userHasCompletedSignup: PropTypes.bool.isRequired,
45 hasActivatedTrial: PropTypes.bool.isRequired,
44 classes: PropTypes.object.isRequired, 46 classes: PropTypes.object.isRequired,
45 }; 47 };
46 48
@@ -75,6 +77,7 @@ export default @observer @injectSheet(styles) class Services extends Component {
75 openSettings, 77 openSettings,
76 update, 78 update,
77 userHasCompletedSignup, 79 userHasCompletedSignup,
80 hasActivatedTrial,
78 classes, 81 classes,
79 } = this.props; 82 } = this.props;
80 83
@@ -84,37 +87,37 @@ export default @observer @injectSheet(styles) class Services extends Component {
84 87
85 const { intl } = this.context; 88 const { intl } = this.context;
86 89
90 console.log('hasActivatedTrial', hasActivatedTrial, (userHasCompletedSignup || hasActivatedTrial));
91
87 return ( 92 return (
88 <div className="services"> 93 <div className="services">
94 {(userHasCompletedSignup || hasActivatedTrial) && (
95 <div className={classes.confettiContainer}>
96 <Confetti
97 width={window.width}
98 height={window.height}
99 numberOfPieces={showConfetti ? 200 : 0}
100 />
101 </div>
102 )}
89 {services.length === 0 && ( 103 {services.length === 0 && (
90 <> 104 <Appear
91 {userHasCompletedSignup && ( 105 timeout={1500}
92 <div className={classes.confettiContainer}> 106 transitionName="slideUp"
93 <Confetti 107 >
94 width={window.width} 108 <div className="services__no-service">
95 height={window.height} 109 <img src="./assets/images/logo.svg" alt="" />
96 numberOfPieces={showConfetti ? 200 : 0} 110 <h1>{intl.formatMessage(messages.welcome)}</h1>
97 /> 111 <Appear
98 </div> 112 timeout={300}
99 )} 113 transitionName="slideUp"
100 <Appear 114 >
101 timeout={1500} 115 <Link to="/settings/recipes" className="button">
102 transitionName="slideUp" 116 {intl.formatMessage(messages.getStarted)}
103 > 117 </Link>
104 <div className="services__no-service"> 118 </Appear>
105 <img src="./assets/images/logo.svg" alt="" /> 119 </div>
106 <h1>{intl.formatMessage(messages.welcome)}</h1> 120 </Appear>
107 <Appear
108 timeout={300}
109 transitionName="slideUp"
110 >
111 <Link to="/settings/recipes" className="button">
112 {intl.formatMessage(messages.getStarted)}
113 </Link>
114 </Appear>
115 </div>
116 </Appear>
117 </>
118 )} 121 )}
119 {services.map(service => ( 122 {services.map(service => (
120 <ServiceView 123 <ServiceView