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/auth/Login.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/Login.js')
-rw-r--r-- | src/components/auth/Login.js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/components/auth/Login.js b/src/components/auth/Login.js index 3c9c07f0d..ccffd0c6a 100644 --- a/src/components/auth/Login.js +++ b/src/components/auth/Login.js | |||
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; | |||
4 | import { observer, inject } from 'mobx-react'; | 4 | import { observer, inject } from 'mobx-react'; |
5 | import { defineMessages, injectIntl } from 'react-intl'; | 5 | import { defineMessages, injectIntl } from 'react-intl'; |
6 | 6 | ||
7 | import { LIVE_FRANZ_API } from '../../config'; | 7 | import { LIVE_FRANZ_API, LIVE_FERDI_API } from '../../config'; |
8 | import { API_VERSION } from '../../environment-remote'; | 8 | import { API_VERSION } from '../../environment-remote'; |
9 | import Form from '../../lib/Form'; | 9 | import Form from '../../lib/Form'; |
10 | import { required, email } from '../../helpers/validation-helpers'; | 10 | import { required, email } from '../../helpers/validation-helpers'; |
@@ -153,6 +153,24 @@ class Login extends Component { | |||
153 | </Link> | 153 | </Link> |
154 | </p> | 154 | </p> |
155 | )} | 155 | )} |
156 | {window['ferdium'].stores.settings.all.app.server !== | ||
157 | LIVE_FERDI_API && ( | ||
158 | <p className="error-message center"> | ||
159 | {intl.formatMessage(messages.customServerQuestion)}{' '} | ||
160 | <Link | ||
161 | to={`${window[ | ||
162 | 'ferdium' | ||
163 | ].stores.settings.all.app.server.replace( | ||
164 | API_VERSION, | ||
165 | '', | ||
166 | )}/import`} | ||
167 | target="_blank" | ||
168 | style={{ cursor: 'pointer', textDecoration: 'underline' }} | ||
169 | > | ||
170 | {intl.formatMessage(messages.customServerSuggestion)} | ||
171 | </Link> | ||
172 | </p> | ||
173 | )} | ||
156 | </> | 174 | </> |
157 | )} | 175 | )} |
158 | {isSubmitting ? ( | 176 | {isSubmitting ? ( |