diff options
Diffstat (limited to 'src/components/auth')
-rw-r--r-- | src/components/auth/ChangeServer.js | 9 | ||||
-rw-r--r-- | src/components/auth/Login.js | 20 |
2 files changed, 4 insertions, 25 deletions
diff --git a/src/components/auth/ChangeServer.js b/src/components/auth/ChangeServer.js index 61e0aed68..8d0960843 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, LIVE_FERDI_API } from '../../config'; | 12 | import { LIVE_FERDIUM_API, LIVE_FRANZ_API } from '../../config'; |
13 | import globalMessages from '../../i18n/globalMessages'; | 13 | import globalMessages from '../../i18n/globalMessages'; |
14 | import { H1 } from '../ui/headline'; | 14 | import { H1 } from '../ui/headline'; |
15 | 15 | ||
@@ -44,11 +44,9 @@ class ChangeServer extends Component { | |||
44 | 44 | ||
45 | ferdiumServer = LIVE_FERDIUM_API; | 45 | ferdiumServer = LIVE_FERDIUM_API; |
46 | 46 | ||
47 | ferdiServer = LIVE_FERDI_API; | ||
48 | |||
49 | franzServer = LIVE_FRANZ_API; | 47 | franzServer = LIVE_FRANZ_API; |
50 | 48 | ||
51 | defaultServers = [this.ferdiumServer, this.franzServer, this.ferdiServer]; | 49 | defaultServers = [ this.ferdiumServer, this.franzServer ]; |
52 | 50 | ||
53 | form = (() => { | 51 | form = (() => { |
54 | const { intl } = this.props; | 52 | const { intl } = this.props; |
@@ -60,7 +58,6 @@ class ChangeServer extends Component { | |||
60 | options: [ | 58 | options: [ |
61 | { value: this.ferdiumServer, label: 'Ferdium (Default)' }, | 59 | { value: this.ferdiumServer, label: 'Ferdium (Default)' }, |
62 | { value: this.franzServer, label: 'Franz' }, | 60 | { value: this.franzServer, label: 'Franz' }, |
63 | { value: this.ferdiServer, label: 'Ferdi' }, | ||
64 | { | 61 | { |
65 | value: this.defaultServers.includes(this.props.server) | 62 | value: this.defaultServers.includes(this.props.server) |
66 | ? '' | 63 | ? '' |
@@ -114,7 +111,7 @@ class ChangeServer extends Component { | |||
114 | <form className="franz-form auth__form" onSubmit={e => this.submit(e)}> | 111 | <form className="franz-form auth__form" onSubmit={e => this.submit(e)}> |
115 | <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> |
116 | <H1>{intl.formatMessage(messages.headline)}</H1> | 113 | <H1>{intl.formatMessage(messages.headline)}</H1> |
117 | {(form.$('server').value === this.franzServer || form.$('server').value === this.ferdiServer) && ( | 114 | {(form.$('server').value === this.franzServer) && ( |
118 | <Infobox type="warning"> | 115 | <Infobox type="warning"> |
119 | {intl.formatMessage(messages.warning)} | 116 | {intl.formatMessage(messages.warning)} |
120 | </Infobox> | 117 | </Infobox> |
diff --git a/src/components/auth/Login.js b/src/components/auth/Login.js index c6b26a21d..74b9fef47 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, LIVE_FERDI_API } from '../../config'; | 7 | import { LIVE_FRANZ_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'; |
@@ -155,24 +155,6 @@ class Login extends Component { | |||
155 | </Link> | 155 | </Link> |
156 | </p> | 156 | </p> |
157 | )} | 157 | )} |
158 | {window['ferdium'].stores.settings.all.app.server !== | ||
159 | LIVE_FERDI_API && ( | ||
160 | <p className="error-message center"> | ||
161 | {intl.formatMessage(messages.customServerQuestion)}{' '} | ||
162 | <Link | ||
163 | to={`${window[ | ||
164 | 'ferdium' | ||
165 | ].stores.settings.all.app.server.replace( | ||
166 | API_VERSION, | ||
167 | '', | ||
168 | )}/import`} | ||
169 | target="_blank" | ||
170 | style={{ cursor: 'pointer', textDecoration: 'underline' }} | ||
171 | > | ||
172 | {intl.formatMessage(messages.customServerSuggestion)} | ||
173 | </Link> | ||
174 | </p> | ||
175 | )} | ||
176 | </> | 158 | </> |
177 | )} | 159 | )} |
178 | {isSubmitting ? ( | 160 | {isSubmitting ? ( |