diff options
author | André Oliveira <37463445+SpecialAro@users.noreply.github.com> | 2022-04-27 15:07:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 14:07:24 +0000 |
commit | c7c774c6318fcc8a13cb7f31e2672eea4ebfc777 (patch) | |
tree | 72b23f2031e00489118add998c3fed6bdbc8b9d8 /src/components/settings | |
parent | 6.0.0-nightly.13 [skip ci] (diff) | |
download | ferdium-app-c7c774c6318fcc8a13cb7f31e2672eea4ebfc777.tar.gz ferdium-app-c7c774c6318fcc8a13cb7f31e2672eea4ebfc777.tar.zst ferdium-app-c7c774c6318fcc8a13cb7f31e2672eea4ebfc777.zip |
Add Ferdi server to hosted services (#49)
* 'SettingsNavigation.js' and 'TeamDashboard.js' also have a call to 'LIVE_FERDI_API', but it handles the teams feature that I think neither Ferdi or Ferdium provide.
* Removes comment on 'apiBase.ts' because I tested and the Terms was redirecting fine on the 'Help' Menu.
Diffstat (limited to 'src/components/settings')
-rw-r--r-- | src/components/settings/account/AccountDashboard.js | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index b500b82cf..78d41a273 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -8,7 +8,7 @@ import { H1, H2 } from '../../ui/headline'; | |||
8 | import Loader from '../../ui/Loader'; | 8 | import Loader from '../../ui/Loader'; |
9 | import Button from '../../ui/Button'; | 9 | import Button from '../../ui/Button'; |
10 | import Infobox from '../../ui/Infobox'; | 10 | import Infobox from '../../ui/Infobox'; |
11 | import { LOCAL_SERVER, LIVE_FRANZ_API } from '../../../config'; | 11 | import { LOCAL_SERVER, LIVE_FRANZ_API, LIVE_FERDI_API } from '../../../config'; |
12 | 12 | ||
13 | const messages = defineMessages({ | 13 | const messages = defineMessages({ |
14 | headline: { | 14 | headline: { |
@@ -95,6 +95,7 @@ class AccountDashboard extends Component { | |||
95 | 95 | ||
96 | const isUsingWithoutAccount = server === LOCAL_SERVER; | 96 | const isUsingWithoutAccount = server === LOCAL_SERVER; |
97 | const isUsingFranzServer = server === LIVE_FRANZ_API; | 97 | const isUsingFranzServer = server === LIVE_FRANZ_API; |
98 | const isUsingFerdiServer = server === LIVE_FERDI_API; | ||
98 | 99 | ||
99 | return ( | 100 | return ( |
100 | <div className="settings__main"> | 101 | <div className="settings__main"> |
@@ -210,6 +211,29 @@ class AccountDashboard extends Component { | |||
210 | </div> | 211 | </div> |
211 | </div> | 212 | </div> |
212 | )} | 213 | )} |
214 | {isUsingFerdiServer && ( | ||
215 | <div className="account franz-form"> | ||
216 | <div className="account__box"> | ||
217 | <H2> | ||
218 | {intl.formatMessage(messages.headlineDangerZone)} | ||
219 | </H2> | ||
220 | {!isDeleteAccountSuccessful && ( | ||
221 | <div className="account__subscription"> | ||
222 | <p>{intl.formatMessage(messages.deleteInfo)}</p> | ||
223 | <Button | ||
224 | label={intl.formatMessage(messages.deleteAccount)} | ||
225 | buttonType="danger" | ||
226 | onClick={() => deleteAccount()} | ||
227 | loaded={!isLoadingDeleteAccount} | ||
228 | /> | ||
229 | </div> | ||
230 | )} | ||
231 | {isDeleteAccountSuccessful && ( | ||
232 | <p>{intl.formatMessage(messages.deleteEmailSent)}</p> | ||
233 | )} | ||
234 | </div> | ||
235 | </div> | ||
236 | )} | ||
213 | </> | 237 | </> |
214 | )} | 238 | )} |
215 | </> | 239 | </> |