diff options
author | 2021-09-13 14:45:46 +0200 | |
---|---|---|
committer | 2021-09-13 14:45:46 +0200 | |
commit | 537697a6e9757f118d09d9e76362ba1ff617e2c6 (patch) | |
tree | bc55447115e385137684e84697a8c15d2199b8d5 /src/components/settings/account | |
parent | Bumped up version to: 5.6.3-nightly.0 [skip ci] (diff) | |
download | ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.tar.gz ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.tar.zst ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.zip |
chore: upgrade intl dependencies (#1920)
Diffstat (limited to 'src/components/settings/account')
-rw-r--r-- | src/components/settings/account/AccountDashboard.js | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index ef7748343..933d47d12 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -1,7 +1,7 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } 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, injectIntl } from 'react-intl'; |
5 | import ReactTooltip from 'react-tooltip'; | 5 | import ReactTooltip from 'react-tooltip'; |
6 | import { H1, H2 } from '@meetfranz/ui'; | 6 | import { H1, H2 } from '@meetfranz/ui'; |
7 | 7 | ||
@@ -13,7 +13,7 @@ import { LOCAL_SERVER, LIVE_FRANZ_API } from '../../../config'; | |||
13 | const messages = defineMessages({ | 13 | const messages = defineMessages({ |
14 | headline: { | 14 | headline: { |
15 | id: 'settings.account.headline', | 15 | id: 'settings.account.headline', |
16 | defaultMessage: '!!!Account', | 16 | defaultMessage: 'Account', |
17 | }, | 17 | }, |
18 | headlineDangerZone: { | 18 | headlineDangerZone: { |
19 | id: 'settings.account.headlineDangerZone', | 19 | id: 'settings.account.headlineDangerZone', |
@@ -21,7 +21,7 @@ const messages = defineMessages({ | |||
21 | }, | 21 | }, |
22 | accountEditButton: { | 22 | accountEditButton: { |
23 | id: 'settings.account.account.editButton', | 23 | id: 'settings.account.account.editButton', |
24 | defaultMessage: '!!!Edit Account', | 24 | defaultMessage: 'Edit Account', |
25 | }, | 25 | }, |
26 | invoicesButton: { | 26 | invoicesButton: { |
27 | id: 'settings.account.headlineInvoices', | 27 | id: 'settings.account.headlineInvoices', |
@@ -29,29 +29,29 @@ const messages = defineMessages({ | |||
29 | }, | 29 | }, |
30 | userInfoRequestFailed: { | 30 | userInfoRequestFailed: { |
31 | id: 'settings.account.userInfoRequestFailed', | 31 | id: 'settings.account.userInfoRequestFailed', |
32 | defaultMessage: '!!!Could not load user information', | 32 | defaultMessage: 'Could not load user information', |
33 | }, | 33 | }, |
34 | tryReloadUserInfoRequest: { | 34 | tryReloadUserInfoRequest: { |
35 | id: 'settings.account.tryReloadUserInfoRequest', | 35 | id: 'settings.account.tryReloadUserInfoRequest', |
36 | defaultMessage: '!!!Try again', | 36 | defaultMessage: 'Try again', |
37 | }, | 37 | }, |
38 | deleteAccount: { | 38 | deleteAccount: { |
39 | id: 'settings.account.deleteAccount', | 39 | id: 'settings.account.deleteAccount', |
40 | defaultMessage: '!!!Delete account', | 40 | defaultMessage: 'Delete account', |
41 | }, | 41 | }, |
42 | deleteInfo: { | 42 | deleteInfo: { |
43 | id: 'settings.account.deleteInfo', | 43 | id: 'settings.account.deleteInfo', |
44 | defaultMessage: | 44 | defaultMessage: |
45 | "!!!If you don't need your Ferdi account any longer, you can delete your account and all related data here.", | 45 | "If you don't need your Ferdi account any longer, you can delete your account and all related data here.", |
46 | }, | 46 | }, |
47 | deleteEmailSent: { | 47 | deleteEmailSent: { |
48 | id: 'settings.account.deleteEmailSent', | 48 | id: 'settings.account.deleteEmailSent', |
49 | defaultMessage: | 49 | defaultMessage: |
50 | '!!!You have received an email with a link to confirm your account deletion. Your account and data cannot be restored!', | 50 | 'You have received an email with a link to confirm your account deletion. Your account and data cannot be restored!', |
51 | }, | 51 | }, |
52 | yourLicense: { | 52 | yourLicense: { |
53 | id: 'settings.account.yourLicense', | 53 | id: 'settings.account.yourLicense', |
54 | defaultMessage: '!!!Your Franz License:', | 54 | defaultMessage: 'Your Franz License:', |
55 | }, | 55 | }, |
56 | accountUnavailable: { | 56 | accountUnavailable: { |
57 | id: 'settings.account.accountUnavailable', | 57 | id: 'settings.account.accountUnavailable', |
@@ -59,7 +59,8 @@ const messages = defineMessages({ | |||
59 | }, | 59 | }, |
60 | accountUnavailableInfo: { | 60 | accountUnavailableInfo: { |
61 | id: 'settings.account.accountUnavailableInfo', | 61 | id: 'settings.account.accountUnavailableInfo', |
62 | defaultMessage: 'You are using Ferdi without an account. If you want to use Ferdi with an account and keep your services synchronized across installations, please select a server in the Settings tab then login.', | 62 | defaultMessage: |
63 | 'You are using Ferdi without an account. If you want to use Ferdi with an account and keep your services synchronized across installations, please select a server in the Settings tab then login.', | ||
63 | }, | 64 | }, |
64 | }); | 65 | }); |
65 | 66 | ||
@@ -78,10 +79,6 @@ class AccountDashboard extends Component { | |||
78 | server: PropTypes.string.isRequired, | 79 | server: PropTypes.string.isRequired, |
79 | }; | 80 | }; |
80 | 81 | ||
81 | static contextTypes = { | ||
82 | intl: intlShape, | ||
83 | }; | ||
84 | |||
85 | render() { | 82 | render() { |
86 | const { | 83 | const { |
87 | user, | 84 | user, |
@@ -95,7 +92,7 @@ class AccountDashboard extends Component { | |||
95 | openInvoices, | 92 | openInvoices, |
96 | server, | 93 | server, |
97 | } = this.props; | 94 | } = this.props; |
98 | const { intl } = this.context; | 95 | const { intl } = this.props; |
99 | 96 | ||
100 | const isUsingWithoutAccount = server === LOCAL_SERVER; | 97 | const isUsingWithoutAccount = server === LOCAL_SERVER; |
101 | const isUsingFranzServer = server === LIVE_FRANZ_API; | 98 | const isUsingFranzServer = server === LIVE_FRANZ_API; |
@@ -182,9 +179,7 @@ class AccountDashboard extends Component { | |||
182 | <div className="account"> | 179 | <div className="account"> |
183 | <div className="account__box"> | 180 | <div className="account__box"> |
184 | <H2>{intl.formatMessage(messages.yourLicense)}</H2> | 181 | <H2>{intl.formatMessage(messages.yourLicense)}</H2> |
185 | <p> | 182 | <p>Franz</p> |
186 | Franz | ||
187 | </p> | ||
188 | <div className="manage-user-links"> | 183 | <div className="manage-user-links"> |
189 | <Button | 184 | <Button |
190 | label={intl.formatMessage( | 185 | label={intl.formatMessage( |
@@ -203,7 +198,9 @@ class AccountDashboard extends Component { | |||
203 | {isUsingFranzServer && ( | 198 | {isUsingFranzServer && ( |
204 | <div className="account franz-form"> | 199 | <div className="account franz-form"> |
205 | <div className="account__box"> | 200 | <div className="account__box"> |
206 | <H2>{intl.formatMessage(messages.headlineDangerZone)}</H2> | 201 | <H2> |
202 | {intl.formatMessage(messages.headlineDangerZone)} | ||
203 | </H2> | ||
207 | {!isDeleteAccountSuccessful && ( | 204 | {!isDeleteAccountSuccessful && ( |
208 | <div className="account__subscription"> | 205 | <div className="account__subscription"> |
209 | <p>{intl.formatMessage(messages.deleteInfo)}</p> | 206 | <p>{intl.formatMessage(messages.deleteInfo)}</p> |
@@ -232,4 +229,4 @@ class AccountDashboard extends Component { | |||
232 | } | 229 | } |
233 | } | 230 | } |
234 | 231 | ||
235 | export default AccountDashboard; | 232 | export default injectIntl(AccountDashboard); |