diff options
Diffstat (limited to 'src/components/auth')
-rw-r--r-- | src/components/auth/AuthLayout.js | 3 | ||||
-rw-r--r-- | src/components/auth/ChangeServer.js | 5 | ||||
-rw-r--r-- | src/components/auth/Login.js | 7 | ||||
-rw-r--r-- | src/components/auth/Signup.js | 8 |
4 files changed, 12 insertions, 11 deletions
diff --git a/src/components/auth/AuthLayout.js b/src/components/auth/AuthLayout.js index 4783fc6a0..6fa3adf92 100644 --- a/src/components/auth/AuthLayout.js +++ b/src/components/auth/AuthLayout.js | |||
@@ -12,6 +12,7 @@ import globalMessages from '../../i18n/globalMessages'; | |||
12 | 12 | ||
13 | import { isWindows } from '../../environment'; | 13 | import { isWindows } from '../../environment'; |
14 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; | 14 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; |
15 | import { GITHUB_FERDI_URL } from '../../config'; | ||
15 | 16 | ||
16 | export default @observer class AuthLayout extends Component { | 17 | export default @observer class AuthLayout extends Component { |
17 | static propTypes = { | 18 | static propTypes = { |
@@ -94,7 +95,7 @@ export default @observer class AuthLayout extends Component { | |||
94 | })} | 95 | })} |
95 | </div> | 96 | </div> |
96 | {/* </div> */} | 97 | {/* </div> */} |
97 | <Link to="https://github.com/getferdi/ferdi" className="auth__adlk" target="_blank"> | 98 | <Link to={`${GITHUB_FERDI_URL}/ferdi`} className="auth__adlk" target="_blank"> |
98 | <img src="./assets/images/adlk.svg" alt="" /> | 99 | <img src="./assets/images/adlk.svg" alt="" /> |
99 | </Link> | 100 | </Link> |
100 | </div> | 101 | </div> |
diff --git a/src/components/auth/ChangeServer.js b/src/components/auth/ChangeServer.js index 68c2303a4..0dedd825a 100644 --- a/src/components/auth/ChangeServer.js +++ b/src/components/auth/ChangeServer.js | |||
@@ -8,6 +8,7 @@ import Select from '../ui/Select'; | |||
8 | import Button from '../ui/Button'; | 8 | import Button from '../ui/Button'; |
9 | import Infobox from '../ui/Infobox'; | 9 | import Infobox from '../ui/Infobox'; |
10 | import { url, required } from '../../helpers/validation-helpers'; | 10 | import { url, required } from '../../helpers/validation-helpers'; |
11 | import { LIVE_FERDI_API, LIVE_FRANZ_API } from '../../config'; | ||
11 | 12 | ||
12 | const messages = defineMessages({ | 13 | const messages = defineMessages({ |
13 | headline: { | 14 | headline: { |
@@ -47,9 +48,9 @@ export default @observer class ChangeServer extends Component { | |||
47 | intl: intlShape, | 48 | intl: intlShape, |
48 | }; | 49 | }; |
49 | 50 | ||
50 | ferdiServer='https://api.getferdi.com'; | 51 | ferdiServer=LIVE_FERDI_API; |
51 | 52 | ||
52 | franzServer='https://api.franzinfra.com'; | 53 | franzServer=LIVE_FRANZ_API; |
53 | 54 | ||
54 | defaultServers=[this.franzServer, this.ferdiServer]; | 55 | defaultServers=[this.franzServer, this.ferdiServer]; |
55 | 56 | ||
diff --git a/src/components/auth/Login.js b/src/components/auth/Login.js index 23fdfcac7..52b09eab6 100644 --- a/src/components/auth/Login.js +++ b/src/components/auth/Login.js | |||
@@ -4,7 +4,8 @@ import PropTypes from 'prop-types'; | |||
4 | import { observer, inject } from 'mobx-react'; | 4 | import { observer, inject } from 'mobx-react'; |
5 | import { defineMessages, intlShape } from 'react-intl'; | 5 | import { defineMessages, intlShape } from 'react-intl'; |
6 | 6 | ||
7 | import { isDevMode, useLiveAPI } from '../../environment'; | 7 | import { LIVE_FRANZ_API } from '../../config'; |
8 | import { API_VERSION, isDevMode, useLiveAPI } from '../../environment'; | ||
8 | import Form from '../../lib/Form'; | 9 | import Form from '../../lib/Form'; |
9 | import { required, email } from '../../helpers/validation-helpers'; | 10 | import { required, email } from '../../helpers/validation-helpers'; |
10 | import serverlessLogin from '../../helpers/serverless-helpers'; | 11 | import serverlessLogin from '../../helpers/serverless-helpers'; |
@@ -164,12 +165,12 @@ export default @inject('actions') @observer class Login extends Component { | |||
164 | {error.code === 'invalid-credentials' && ( | 165 | {error.code === 'invalid-credentials' && ( |
165 | <> | 166 | <> |
166 | <p className="error-message center">{intl.formatMessage(messages.invalidCredentials)}</p> | 167 | <p className="error-message center">{intl.formatMessage(messages.invalidCredentials)}</p> |
167 | { window.ferdi.stores.settings.all.app.server !== 'https://api.franzinfra.com' && ( | 168 | { window.ferdi.stores.settings.all.app.server !== LIVE_FRANZ_API && ( |
168 | <p className="error-message center"> | 169 | <p className="error-message center"> |
169 | {intl.formatMessage(messages.customServerQuestion)} | 170 | {intl.formatMessage(messages.customServerQuestion)} |
170 | {' '} | 171 | {' '} |
171 | <Link | 172 | <Link |
172 | to={`${window.ferdi.stores.settings.all.app.server.replace('v1', '')}/import`} | 173 | to={`${window.ferdi.stores.settings.all.app.server.replace(API_VERSION, '')}/import`} |
173 | target="_blank" | 174 | target="_blank" |
174 | style={{ cursor: 'pointer', textDecoration: 'underline' }} | 175 | style={{ cursor: 'pointer', textDecoration: 'underline' }} |
175 | > | 176 | > |
diff --git a/src/components/auth/Signup.js b/src/components/auth/Signup.js index 6a7db5cde..140867ea1 100644 --- a/src/components/auth/Signup.js +++ b/src/components/auth/Signup.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, intlShape } from 'react-intl'; | 5 | import { defineMessages, intlShape } from 'react-intl'; |
6 | 6 | ||
7 | import { isDevMode, useLiveAPI } from '../../environment'; | 7 | import { isDevMode, termsBase, useLiveAPI } from '../../environment'; |
8 | import Form from '../../lib/Form'; | 8 | import Form from '../../lib/Form'; |
9 | import { required, email, minLength } from '../../helpers/validation-helpers'; | 9 | import { required, email, minLength } from '../../helpers/validation-helpers'; |
10 | import serverlessLogin from '../../helpers/serverless-helpers'; | 10 | import serverlessLogin from '../../helpers/serverless-helpers'; |
@@ -135,8 +135,6 @@ export default @inject('actions') @observer class Signup extends Component { | |||
135 | isSubmitting, loginRoute, error, changeServerRoute, | 135 | isSubmitting, loginRoute, error, changeServerRoute, |
136 | } = this.props; | 136 | } = this.props; |
137 | 137 | ||
138 | const termsBase = window.ferdi.stores.settings.all.app.server !== 'https://api.franzinfra.com' ? window.ferdi.stores.settings.all.app.server : 'https://meetfranz.com'; | ||
139 | |||
140 | return ( | 138 | return ( |
141 | <div className="auth__scroll-container"> | 139 | <div className="auth__scroll-container"> |
142 | <div className="auth__container auth__container--signup"> | 140 | <div className="auth__container auth__container--signup"> |
@@ -183,7 +181,7 @@ export default @inject('actions') @observer class Signup extends Component { | |||
183 | {intl.formatMessage(messages.legalInfo)} | 181 | {intl.formatMessage(messages.legalInfo)} |
184 | <br /> | 182 | <br /> |
185 | <Link | 183 | <Link |
186 | to={`${termsBase}/terms`} | 184 | to={`${termsBase()}/terms`} |
187 | target="_blank" | 185 | target="_blank" |
188 | className="link" | 186 | className="link" |
189 | > | 187 | > |
@@ -191,7 +189,7 @@ export default @inject('actions') @observer class Signup extends Component { | |||
191 | </Link> | 189 | </Link> |
192 | & | 190 | & |
193 | <Link | 191 | <Link |
194 | to={`${termsBase}/privacy`} | 192 | to={`${termsBase()}/privacy`} |
195 | target="_blank" | 193 | target="_blank" |
196 | className="link" | 194 | className="link" |
197 | > | 195 | > |