diff options
author | 2022-04-27 15:07:24 +0100 | |
---|---|---|
committer | 2022-04-27 14:07:24 +0000 | |
commit | c7c774c6318fcc8a13cb7f31e2672eea4ebfc777 (patch) | |
tree | 72b23f2031e00489118add998c3fed6bdbc8b9d8 /src/components/auth/ChangeServer.js | |
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/auth/ChangeServer.js')
-rw-r--r-- | src/components/auth/ChangeServer.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/components/auth/ChangeServer.js b/src/components/auth/ChangeServer.js index 682f6512c..7e74fe779 100644 --- a/src/components/auth/ChangeServer.js +++ b/src/components/auth/ChangeServer.js | |||
@@ -9,7 +9,7 @@ import Button from '../ui/Button'; | |||
9 | import Link from '../ui/Link'; | 9 | import Link from '../ui/Link'; |
10 | import Infobox from '../ui/Infobox'; | 10 | import Infobox from '../ui/Infobox'; |
11 | import { url, required } from '../../helpers/validation-helpers'; | 11 | import { url, required } from '../../helpers/validation-helpers'; |
12 | import { LIVE_FERDIUM_API, LIVE_FRANZ_API } from '../../config'; | 12 | import { LIVE_FERDIUM_API, LIVE_FRANZ_API, LIVE_FERDI_API } from '../../config'; |
13 | import globalMessages from '../../i18n/globalMessages'; | 13 | import globalMessages from '../../i18n/globalMessages'; |
14 | 14 | ||
15 | const messages = defineMessages({ | 15 | const messages = defineMessages({ |
@@ -43,9 +43,11 @@ class ChangeServer extends Component { | |||
43 | 43 | ||
44 | ferdiumServer = LIVE_FERDIUM_API; | 44 | ferdiumServer = LIVE_FERDIUM_API; |
45 | 45 | ||
46 | ferdiServer = LIVE_FERDI_API; | ||
47 | |||
46 | franzServer = LIVE_FRANZ_API; | 48 | franzServer = LIVE_FRANZ_API; |
47 | 49 | ||
48 | defaultServers = [this.franzServer, this.ferdiumServer]; | 50 | defaultServers = [this.ferdiumServer, this.franzServer, this.ferdiServer]; |
49 | 51 | ||
50 | form = new Form( | 52 | form = new Form( |
51 | { | 53 | { |
@@ -54,8 +56,9 @@ class ChangeServer extends Component { | |||
54 | label: this.props.intl.formatMessage(messages.label), | 56 | label: this.props.intl.formatMessage(messages.label), |
55 | value: this.props.server, | 57 | value: this.props.server, |
56 | options: [ | 58 | options: [ |
57 | { value: this.ferdiumServer, label: 'Ferdium' }, | 59 | { value: this.ferdiumServer, label: 'Ferdium (Default)' }, |
58 | { value: this.franzServer, label: 'Franz' }, | 60 | { value: this.franzServer, label: 'Franz' }, |
61 | { value: this.ferdiServer, label: 'Ferdi' }, | ||
59 | { | 62 | { |
60 | value: this.defaultServers.includes(this.props.server) | 63 | value: this.defaultServers.includes(this.props.server) |
61 | ? '' | 64 | ? '' |
@@ -108,7 +111,7 @@ class ChangeServer extends Component { | |||
108 | <form className="franz-form auth__form" onSubmit={e => this.submit(e)}> | 111 | <form className="franz-form auth__form" onSubmit={e => this.submit(e)}> |
109 | <Link to='/auth/welcome'><img src="./assets/images/logo.svg" className="auth__logo" alt="" /></Link> | 112 | <Link to='/auth/welcome'><img src="./assets/images/logo.svg" className="auth__logo" alt="" /></Link> |
110 | <h1>{intl.formatMessage(messages.headline)}</h1> | 113 | <h1>{intl.formatMessage(messages.headline)}</h1> |
111 | {form.$('server').value === this.franzServer && ( | 114 | {(form.$('server').value === this.franzServer || form.$('server').value === this.ferdiServer) && ( |
112 | <Infobox type="warning"> | 115 | <Infobox type="warning"> |
113 | {intl.formatMessage(messages.warning)} | 116 | {intl.formatMessage(messages.warning)} |
114 | </Infobox> | 117 | </Infobox> |