diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-08-05 13:24:35 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-08-05 13:24:35 +0200 |
commit | 76559f2895012803aed3256ce521b9cfff2f63b8 (patch) | |
tree | f511ed44ab8cb16af257e58ff960da1fd60c5876 /src/components/layout | |
parent | Add trial onboarding during signup (diff) | |
download | ferdium-app-76559f2895012803aed3256ce521b9cfff2f63b8.tar.gz ferdium-app-76559f2895012803aed3256ce521b9cfff2f63b8.tar.zst ferdium-app-76559f2895012803aed3256ce521b9cfff2f63b8.zip |
WIP: add option to activate trial
Diffstat (limited to 'src/components/layout')
-rw-r--r-- | src/components/layout/AppLayout.js | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index ebb9849ea..1976f5a50 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -17,6 +17,7 @@ import { isWindows } from '../../environment'; | |||
17 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; | 17 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; |
18 | import { workspaceStore } from '../../features/workspaces'; | 18 | import { workspaceStore } from '../../features/workspaces'; |
19 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; | 19 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; |
20 | import TrialActivationInfoBar from '../TrialActivationInfoBar'; | ||
20 | 21 | ||
21 | function createMarkup(HTMLString) { | 22 | function createMarkup(HTMLString) { |
22 | return { __html: HTMLString }; | 23 | return { __html: HTMLString }; |
@@ -57,7 +58,6 @@ class AppLayout extends Component { | |||
57 | services: PropTypes.element.isRequired, | 58 | services: PropTypes.element.isRequired, |
58 | children: PropTypes.element, | 59 | children: PropTypes.element, |
59 | news: MobxPropTypes.arrayOrObservableArray.isRequired, | 60 | news: MobxPropTypes.arrayOrObservableArray.isRequired, |
60 | // isOnline: PropTypes.bool.isRequired, | ||
61 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, | 61 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, |
62 | appUpdateIsDownloaded: PropTypes.bool.isRequired, | 62 | appUpdateIsDownloaded: PropTypes.bool.isRequired, |
63 | nextAppReleaseVersion: PropTypes.string, | 63 | nextAppReleaseVersion: PropTypes.string, |
@@ -69,6 +69,7 @@ class AppLayout extends Component { | |||
69 | retryRequiredRequests: PropTypes.func.isRequired, | 69 | retryRequiredRequests: PropTypes.func.isRequired, |
70 | areRequiredRequestsLoading: PropTypes.bool.isRequired, | 70 | areRequiredRequestsLoading: PropTypes.bool.isRequired, |
71 | isDelayAppScreenVisible: PropTypes.bool.isRequired, | 71 | isDelayAppScreenVisible: PropTypes.bool.isRequired, |
72 | hasActivatedTrial: PropTypes.bool.isRequired, | ||
72 | }; | 73 | }; |
73 | 74 | ||
74 | static defaultProps = { | 75 | static defaultProps = { |
@@ -88,7 +89,6 @@ class AppLayout extends Component { | |||
88 | sidebar, | 89 | sidebar, |
89 | services, | 90 | services, |
90 | children, | 91 | children, |
91 | // isOnline, | ||
92 | news, | 92 | news, |
93 | showServicesUpdatedInfoBar, | 93 | showServicesUpdatedInfoBar, |
94 | appUpdateIsDownloaded, | 94 | appUpdateIsDownloaded, |
@@ -101,6 +101,7 @@ class AppLayout extends Component { | |||
101 | retryRequiredRequests, | 101 | retryRequiredRequests, |
102 | areRequiredRequestsLoading, | 102 | areRequiredRequestsLoading, |
103 | isDelayAppScreenVisible, | 103 | isDelayAppScreenVisible, |
104 | hasActivatedTrial, | ||
104 | } = this.props; | 105 | } = this.props; |
105 | 106 | ||
106 | const { intl } = this.context; | 107 | const { intl } = this.context; |
@@ -125,26 +126,20 @@ class AppLayout extends Component { | |||
125 | <span dangerouslySetInnerHTML={createMarkup(item.message)} /> | 126 | <span dangerouslySetInnerHTML={createMarkup(item.message)} /> |
126 | </InfoBar> | 127 | </InfoBar> |
127 | ))} | 128 | ))} |
128 | {/* {!isOnline && ( | 129 | {hasActivatedTrial && ( |
129 | <InfoBar | 130 | <TrialActivationInfoBar /> |
130 | type="danger" | 131 | )} |
131 | sticky | ||
132 | > | ||
133 | <span className="mdi mdi-flash" /> | ||
134 | {intl.formatMessage(globalMessages.notConnectedToTheInternet)} | ||
135 | </InfoBar> | ||
136 | )} */} | ||
137 | {!areRequiredRequestsSuccessful && showRequiredRequestsError && ( | 132 | {!areRequiredRequestsSuccessful && showRequiredRequestsError && ( |
138 | <InfoBar | 133 | <InfoBar |
139 | type="danger" | 134 | type="danger" |
140 | ctaLabel="Try again" | 135 | ctaLabel="Try again" |
141 | ctaLoading={areRequiredRequestsLoading} | 136 | ctaLoading={areRequiredRequestsLoading} |
142 | sticky | 137 | sticky |
143 | onClick={retryRequiredRequests} | 138 | onClick={retryRequiredRequests} |
144 | > | 139 | > |
145 | <span className="mdi mdi-flash" /> | 140 | <span className="mdi mdi-flash" /> |
146 | {intl.formatMessage(messages.requiredRequestsFailed)} | 141 | {intl.formatMessage(messages.requiredRequestsFailed)} |
147 | </InfoBar> | 142 | </InfoBar> |
148 | )} | 143 | )} |
149 | {showServicesUpdatedInfoBar && ( | 144 | {showServicesUpdatedInfoBar && ( |
150 | <InfoBar | 145 | <InfoBar |