diff options
-rw-r--r-- | src/api/apiBase.ts | 2 | ||||
-rw-r--r-- | src/components/auth/Login.js | 11 | ||||
-rw-r--r-- | src/components/auth/Signup.js | 6 | ||||
-rw-r--r-- | src/lib/Menu.js | 6 |
4 files changed, 15 insertions, 10 deletions
diff --git a/src/api/apiBase.ts b/src/api/apiBase.ts index f66c387a5..80ab99ac6 100644 --- a/src/api/apiBase.ts +++ b/src/api/apiBase.ts | |||
@@ -35,7 +35,7 @@ const apiBase = (withVersion = true) => { | |||
35 | 35 | ||
36 | export default apiBase; | 36 | export default apiBase; |
37 | 37 | ||
38 | export function termsBase() { | 38 | export function serverBase() { |
39 | 39 | ||
40 | const serverType = (window as any).ferdium.stores.settings.all.app.server; | 40 | const serverType = (window as any).ferdium.stores.settings.all.app.server; |
41 | const noServer = 'You are using Ferdium without a server'; | 41 | const noServer = 'You are using Ferdium without a server'; |
diff --git a/src/components/auth/Login.js b/src/components/auth/Login.js index 74b9fef47..3de576ca6 100644 --- a/src/components/auth/Login.js +++ b/src/components/auth/Login.js | |||
@@ -6,6 +6,7 @@ import { defineMessages, injectIntl } from 'react-intl'; | |||
6 | 6 | ||
7 | import { LIVE_FRANZ_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 { serverBase } from '../../api/apiBase'; // TODO: Remove this line after fixing password recovery in-app | ||
9 | import Form from '../../lib/Form'; | 10 | import Form from '../../lib/Form'; |
10 | import { required, email } from '../../helpers/validation-helpers'; | 11 | import { required, email } from '../../helpers/validation-helpers'; |
11 | import Input from '../ui/Input'; | 12 | import Input from '../ui/Input'; |
@@ -69,7 +70,7 @@ class Login extends Component { | |||
69 | isTokenExpired: PropTypes.bool.isRequired, | 70 | isTokenExpired: PropTypes.bool.isRequired, |
70 | isServerLogout: PropTypes.bool.isRequired, | 71 | isServerLogout: PropTypes.bool.isRequired, |
71 | signupRoute: PropTypes.string.isRequired, | 72 | signupRoute: PropTypes.string.isRequired, |
72 | passwordRoute: PropTypes.string.isRequired, | 73 | // passwordRoute: PropTypes.string.isRequired, // TODO: Uncomment this line after fixing password recovery in-app |
73 | error: globalErrorPropType.isRequired, | 74 | error: globalErrorPropType.isRequired, |
74 | }; | 75 | }; |
75 | 76 | ||
@@ -111,7 +112,7 @@ class Login extends Component { | |||
111 | isTokenExpired, | 112 | isTokenExpired, |
112 | isServerLogout, | 113 | isServerLogout, |
113 | signupRoute, | 114 | signupRoute, |
114 | passwordRoute, | 115 | // passwordRoute, // TODO: Uncomment this line after fixing password recovery in-app |
115 | error, | 116 | error, |
116 | } = this.props; | 117 | } = this.props; |
117 | 118 | ||
@@ -177,7 +178,11 @@ class Login extends Component { | |||
177 | <Link to={signupRoute}> | 178 | <Link to={signupRoute}> |
178 | {intl.formatMessage(messages.signupLink)} | 179 | {intl.formatMessage(messages.signupLink)} |
179 | </Link> | 180 | </Link> |
180 | <Link to={passwordRoute}> | 181 | <Link |
182 | // to={passwordRoute} // TODO: Uncomment this line after fixing password recovery in-app | ||
183 | to={`${serverBase()}/user/forgot`} // TODO: Remove this line after fixing password recovery in-app | ||
184 | target='_blank' // TODO: Remove this line after fixing password recovery in-app | ||
185 | > | ||
181 | {intl.formatMessage(messages.passwordLink)} | 186 | {intl.formatMessage(messages.passwordLink)} |
182 | </Link> | 187 | </Link> |
183 | </div> | 188 | </div> |
diff --git a/src/components/auth/Signup.js b/src/components/auth/Signup.js index 05b6576fa..eaa68f918 100644 --- a/src/components/auth/Signup.js +++ b/src/components/auth/Signup.js | |||
@@ -11,7 +11,7 @@ import Button from '../ui/button'; | |||
11 | import Link from '../ui/Link'; | 11 | import Link from '../ui/Link'; |
12 | 12 | ||
13 | import { globalError as globalErrorPropType } from '../../prop-types'; | 13 | import { globalError as globalErrorPropType } from '../../prop-types'; |
14 | import { termsBase } from '../../api/apiBase'; | 14 | import { serverBase } from '../../api/apiBase'; |
15 | import { H1 } from '../ui/headline'; | 15 | import { H1 } from '../ui/headline'; |
16 | 16 | ||
17 | const messages = defineMessages({ | 17 | const messages = defineMessages({ |
@@ -160,7 +160,7 @@ class Signup extends Component { | |||
160 | {intl.formatMessage(messages.legalInfo)} | 160 | {intl.formatMessage(messages.legalInfo)} |
161 | <br /> | 161 | <br /> |
162 | <Link | 162 | <Link |
163 | to={`${termsBase()}/terms`} | 163 | to={`${serverBase()}/terms`} |
164 | target="_blank" | 164 | target="_blank" |
165 | className="link" | 165 | className="link" |
166 | > | 166 | > |
@@ -168,7 +168,7 @@ class Signup extends Component { | |||
168 | </Link> | 168 | </Link> |
169 | & | 169 | & |
170 | <Link | 170 | <Link |
171 | to={`${termsBase()}/privacy`} | 171 | to={`${serverBase()}/privacy`} |
172 | target="_blank" | 172 | target="_blank" |
173 | className="link" | 173 | className="link" |
174 | > | 174 | > |
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 98de80884..900375c2f 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -31,7 +31,7 @@ import { aboutAppDetails, ferdiumVersion } from '../environment-remote'; | |||
31 | import { todoActions } from '../features/todos/actions'; | 31 | import { todoActions } from '../features/todos/actions'; |
32 | import { workspaceActions } from '../features/workspaces/actions'; | 32 | import { workspaceActions } from '../features/workspaces/actions'; |
33 | import { workspaceStore } from '../features/workspaces/index'; | 33 | import { workspaceStore } from '../features/workspaces/index'; |
34 | import apiBase, { termsBase } from '../api/apiBase'; | 34 | import apiBase, { serverBase } from '../api/apiBase'; |
35 | import { openExternalUrl } from '../helpers/url-helpers'; | 35 | import { openExternalUrl } from '../helpers/url-helpers'; |
36 | import globalMessages from '../i18n/globalMessages'; | 36 | import globalMessages from '../i18n/globalMessages'; |
37 | 37 | ||
@@ -567,13 +567,13 @@ const _titleBarTemplateFactory = (intl, locked) => [ | |||
567 | { | 567 | { |
568 | label: intl.formatMessage(menuItems.tos), | 568 | label: intl.formatMessage(menuItems.tos), |
569 | click() { | 569 | click() { |
570 | openExternalUrl(`${termsBase()}/terms`, true); | 570 | openExternalUrl(`${serverBase()}/terms`, true); |
571 | }, | 571 | }, |
572 | }, | 572 | }, |
573 | { | 573 | { |
574 | label: intl.formatMessage(menuItems.privacy), | 574 | label: intl.formatMessage(menuItems.privacy), |
575 | click() { | 575 | click() { |
576 | openExternalUrl(`${termsBase()}/privacy`, true); | 576 | openExternalUrl(`${serverBase()}/privacy`, true); |
577 | }, | 577 | }, |
578 | }, | 578 | }, |
579 | ], | 579 | ], |