aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2022-06-16 02:41:14 +0100
committerLibravatar GitHub <noreply@github.com>2022-06-16 01:41:14 +0000
commit4fe7da167b3307b198c3a20bc4a13953c79d2f2f (patch)
tree43d7b54a35af1d4fd483879e45802e03bed24300
parentFix default accent color to Ferdium gradient (#273) (diff)
downloadferdium-app-4fe7da167b3307b198c3a20bc4a13953c79d2f2f.tar.gz
ferdium-app-4fe7da167b3307b198c3a20bc4a13953c79d2f2f.tar.zst
ferdium-app-4fe7da167b3307b198c3a20bc4a13953c79d2f2f.zip
Remove Ferdi Server from available Servers List (#274)
-rw-r--r--src/components/auth/ChangeServer.js9
-rw-r--r--src/components/auth/Login.js20
-rw-r--r--src/components/settings/account/AccountDashboard.js26
-rw-r--r--src/config.ts1
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';
9import Link from '../ui/Link'; 9import Link from '../ui/Link';
10import Infobox from '../ui/Infobox'; 10import Infobox from '../ui/Infobox';
11import { url, required } from '../../helpers/validation-helpers'; 11import { url, required } from '../../helpers/validation-helpers';
12import { LIVE_FERDIUM_API, LIVE_FRANZ_API, LIVE_FERDI_API } from '../../config'; 12import { LIVE_FERDIUM_API, LIVE_FRANZ_API } from '../../config';
13import globalMessages from '../../i18n/globalMessages'; 13import globalMessages from '../../i18n/globalMessages';
14import { H1 } from '../ui/headline'; 14import { 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';
4import { observer, inject } from 'mobx-react'; 4import { observer, inject } from 'mobx-react';
5import { defineMessages, injectIntl } from 'react-intl'; 5import { defineMessages, injectIntl } from 'react-intl';
6 6
7import { LIVE_FRANZ_API, LIVE_FERDI_API } from '../../config'; 7import { LIVE_FRANZ_API } from '../../config';
8import { API_VERSION } from '../../environment-remote'; 8import { API_VERSION } from '../../environment-remote';
9import Form from '../../lib/Form'; 9import Form from '../../lib/Form';
10import { required, email } from '../../helpers/validation-helpers'; 10import { 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';
8import Loader from '../../ui/Loader'; 8import Loader from '../../ui/Loader';
9import Button from '../../ui/button'; 9import Button from '../../ui/button';
10import Infobox from '../../ui/Infobox'; 10import Infobox from '../../ui/Infobox';
11import { LOCAL_SERVER, LIVE_FRANZ_API, LIVE_FERDI_API } from '../../../config'; 11import { LOCAL_SERVER, LIVE_FRANZ_API } from '../../../config';
12 12
13const messages = defineMessages({ 13const 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
14export const LIVE_FERDIUM_API = 'https://api.ferdium.org'; 14export const LIVE_FERDIUM_API = 'https://api.ferdium.org';
15export const LIVE_FRANZ_API = 'https://api.franzinfra.com'; 15export const LIVE_FRANZ_API = 'https://api.franzinfra.com';
16export 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
19export const DEBUG_API = 'https://debug.ferdium.org'; 18export const DEBUG_API = 'https://debug.ferdium.org';