diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/auth/ChangeServer.js | 9 | ||||
-rw-r--r-- | src/components/auth/Login.js | 20 | ||||
-rw-r--r-- | src/components/settings/account/AccountDashboard.js | 26 | ||||
-rw-r--r-- | src/config.ts | 1 |
4 files changed, 5 insertions, 51 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 ? ( |
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index 32e82940d..8ebf1ac5f 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -8,7 +8,7 @@ import { H1, H2 } from '../../ui/headline'; | |||
8 | import Loader from '../../ui/Loader'; | 8 | import Loader from '../../ui/Loader'; |
9 | import Button from '../../ui/button'; | 9 | import Button from '../../ui/button'; |
10 | import Infobox from '../../ui/Infobox'; | 10 | import Infobox from '../../ui/Infobox'; |
11 | import { LOCAL_SERVER, LIVE_FRANZ_API, LIVE_FERDI_API } from '../../../config'; | 11 | import { LOCAL_SERVER, LIVE_FRANZ_API } from '../../../config'; |
12 | 12 | ||
13 | const messages = defineMessages({ | 13 | const messages = defineMessages({ |
14 | headline: { | 14 | headline: { |
@@ -95,7 +95,6 @@ class AccountDashboard extends Component { | |||
95 | 95 | ||
96 | const isUsingWithoutAccount = server === LOCAL_SERVER; | 96 | const isUsingWithoutAccount = server === LOCAL_SERVER; |
97 | const isUsingFranzServer = server === LIVE_FRANZ_API; | 97 | const isUsingFranzServer = server === LIVE_FRANZ_API; |
98 | const isUsingFerdiServer = server === LIVE_FERDI_API; | ||
99 | 98 | ||
100 | return ( | 99 | return ( |
101 | <div className="settings__main"> | 100 | <div className="settings__main"> |
@@ -211,29 +210,6 @@ class AccountDashboard extends Component { | |||
211 | </div> | 210 | </div> |
212 | </div> | 211 | </div> |
213 | )} | 212 | )} |
214 | {isUsingFerdiServer && ( | ||
215 | <div className="account franz-form"> | ||
216 | <div className="account__box"> | ||
217 | <H2> | ||
218 | {intl.formatMessage(messages.headlineDangerZone)} | ||
219 | </H2> | ||
220 | {!isDeleteAccountSuccessful && ( | ||
221 | <div className="account__subscription"> | ||
222 | <p>{intl.formatMessage(messages.deleteInfo)}</p> | ||
223 | <Button | ||
224 | label={intl.formatMessage(messages.deleteAccount)} | ||
225 | buttonType="danger" | ||
226 | onClick={() => deleteAccount()} | ||
227 | loaded={!isLoadingDeleteAccount} | ||
228 | /> | ||
229 | </div> | ||
230 | )} | ||
231 | {isDeleteAccountSuccessful && ( | ||
232 | <p>{intl.formatMessage(messages.deleteEmailSent)}</p> | ||
233 | )} | ||
234 | </div> | ||
235 | </div> | ||
236 | )} | ||
237 | </> | 213 | </> |
238 | )} | 214 | )} |
239 | </> | 215 | </> |
diff --git a/src/config.ts b/src/config.ts index 1b9aedfce..2df09e03d 100644 --- a/src/config.ts +++ b/src/config.ts | |||
@@ -13,7 +13,6 @@ export const DEV_FRANZ_API = 'https://dev.franzinfra.com'; | |||
13 | 13 | ||
14 | export const LIVE_FERDIUM_API = 'https://api.ferdium.org'; | 14 | export const LIVE_FERDIUM_API = 'https://api.ferdium.org'; |
15 | export const LIVE_FRANZ_API = 'https://api.franzinfra.com'; | 15 | export const LIVE_FRANZ_API = 'https://api.franzinfra.com'; |
16 | export const LIVE_FERDI_API = 'https://api.getferdi.com'; | ||
17 | 16 | ||
18 | // URL used to submit debugger information, see https://github.com/ferdium/debugger | 17 | // URL used to submit debugger information, see https://github.com/ferdium/debugger |
19 | export const DEBUG_API = 'https://debug.ferdium.org'; | 18 | export const DEBUG_API = 'https://debug.ferdium.org'; |