diff options
Diffstat (limited to 'src/components/settings/account/AccountDashboard.js')
-rw-r--r-- | src/components/settings/account/AccountDashboard.js | 48 |
1 files changed, 17 insertions, 31 deletions
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index 06c7074dd..9c9543749 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -1,4 +1,4 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component, Fragment } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; | 3 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; |
4 | import { defineMessages, intlShape } from 'react-intl'; | 4 | import { defineMessages, intlShape } from 'react-intl'; |
@@ -132,21 +132,19 @@ export default @observer class AccountDashboard extends Component { | |||
132 | )} | 132 | )} |
133 | 133 | ||
134 | {!isLoading && userInfoRequestFailed && ( | 134 | {!isLoading && userInfoRequestFailed && ( |
135 | <div> | 135 | <Infobox |
136 | <Infobox | 136 | icon="alert" |
137 | icon="alert" | 137 | type="danger" |
138 | type="danger" | 138 | ctaLabel={intl.formatMessage(messages.tryReloadUserInfoRequest)} |
139 | ctaLabel={intl.formatMessage(messages.tryReloadUserInfoRequest)} | 139 | ctaLoading={isLoading} |
140 | ctaLoading={isLoading} | 140 | ctaOnClick={retryUserInfoRequest} |
141 | ctaOnClick={retryUserInfoRequest} | 141 | > |
142 | > | 142 | {intl.formatMessage(messages.userInfoRequestFailed)} |
143 | {intl.formatMessage(messages.userInfoRequestFailed)} | 143 | </Infobox> |
144 | </Infobox> | ||
145 | </div> | ||
146 | )} | 144 | )} |
147 | 145 | ||
148 | {!userInfoRequestFailed && ( | 146 | {!userInfoRequestFailed && ( |
149 | <div> | 147 | <Fragment> |
150 | {!isLoading && ( | 148 | {!isLoading && ( |
151 | <div className="account"> | 149 | <div className="account"> |
152 | <div className="account__box account__box--flex"> | 150 | <div className="account__box account__box--flex"> |
@@ -169,7 +167,8 @@ export default @observer class AccountDashboard extends Component { | |||
169 | {`${user.firstname} ${user.lastname}`} | 167 | {`${user.firstname} ${user.lastname}`} |
170 | </h2> | 168 | </h2> |
171 | {user.organization && `${user.organization}, `} | 169 | {user.organization && `${user.organization}, `} |
172 | {user.email}<br /> | 170 | {user.email} |
171 | <br /> | ||
173 | {!user.isEnterprise && !user.isPremium && ( | 172 | {!user.isEnterprise && !user.isPremium && ( |
174 | <span className="badge badge">{intl.formatMessage(messages.accountTypeBasic)}</span> | 173 | <span className="badge badge">{intl.formatMessage(messages.accountTypeBasic)}</span> |
175 | )} | 174 | )} |
@@ -194,7 +193,7 @@ export default @observer class AccountDashboard extends Component { | |||
194 | ) : ( | 193 | ) : ( |
195 | <div className="account franz-form"> | 194 | <div className="account franz-form"> |
196 | {orders.length > 0 && ( | 195 | {orders.length > 0 && ( |
197 | <div> | 196 | <Fragment> |
198 | <div className="account__box"> | 197 | <div className="account__box"> |
199 | <h2>{intl.formatMessage(messages.headlineSubscription)}</h2> | 198 | <h2>{intl.formatMessage(messages.headlineSubscription)}</h2> |
200 | <div className="account__subscription"> | 199 | <div className="account__subscription"> |
@@ -219,6 +218,7 @@ export default @observer class AccountDashboard extends Component { | |||
219 | </td> | 218 | </td> |
220 | <td className="invoices__action"> | 219 | <td className="invoices__action"> |
221 | <button | 220 | <button |
221 | type="button" | ||
222 | onClick={() => openExternalUrl(order.invoiceUrl)} | 222 | onClick={() => openExternalUrl(order.invoiceUrl)} |
223 | > | 223 | > |
224 | {intl.formatMessage(messages.invoiceDownload)} | 224 | {intl.formatMessage(messages.invoiceDownload)} |
@@ -229,7 +229,7 @@ export default @observer class AccountDashboard extends Component { | |||
229 | </tbody> | 229 | </tbody> |
230 | </table> | 230 | </table> |
231 | </div> | 231 | </div> |
232 | </div> | 232 | </Fragment> |
233 | )} | 233 | )} |
234 | </div> | 234 | </div> |
235 | ) | 235 | ) |
@@ -262,20 +262,6 @@ export default @observer class AccountDashboard extends Component { | |||
262 | </div> | 262 | </div> |
263 | )} | 263 | )} |
264 | 264 | ||
265 | {user.isMiner && ( | ||
266 | <div className="account franz-form"> | ||
267 | <div className="account__box account__box"> | ||
268 | <h2>Miner Info</h2> | ||
269 | <div className="account__subscription"> | ||
270 | <div> | ||
271 | <p>To maintain a high security level for all our Franz users, we had to remove the miner. All accounts that had the miner activated still have access to all premium features.</p> | ||
272 | <p>Every financial support is still much appreciated.</p> | ||
273 | </div> | ||
274 | </div> | ||
275 | </div> | ||
276 | </div> | ||
277 | )} | ||
278 | |||
279 | {!user.isEnterprise && !user.isPremium && ( | 265 | {!user.isEnterprise && !user.isPremium && ( |
280 | isLoadingPlans ? ( | 266 | isLoadingPlans ? ( |
281 | <Loader /> | 267 | <Loader /> |
@@ -312,7 +298,7 @@ export default @observer class AccountDashboard extends Component { | |||
312 | </div> | 298 | </div> |
313 | </div> | 299 | </div> |
314 | )} | 300 | )} |
315 | </div> | 301 | </Fragment> |
316 | )} | 302 | )} |
317 | </div> | 303 | </div> |
318 | <ReactTooltip place="right" type="dark" effect="solid" /> | 304 | <ReactTooltip place="right" type="dark" effect="solid" /> |