Skip to content

Commit

Permalink
Add Ferdi server to hosted services
Browse files Browse the repository at this point in the history
  • Loading branch information
SpecialAro committed Apr 27, 2022
1 parent a8cd537 commit 2b1c2f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/auth/ChangeServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Button from '../ui/Button';
import Link from '../ui/Link';
import Infobox from '../ui/Infobox';
import { url, required } from '../../helpers/validation-helpers';
import { LIVE_FERDIUM_API, LIVE_FRANZ_API } from '../../config';
import { LIVE_FERDIUM_API, LIVE_FRANZ_API, LIVE_FERDI_API } from '../../config';
import globalMessages from '../../i18n/globalMessages';

const messages = defineMessages({
Expand Down Expand Up @@ -43,9 +43,11 @@ class ChangeServer extends Component {

ferdiumServer = LIVE_FERDIUM_API;

ferdiServer = LIVE_FERDI_API;

franzServer = LIVE_FRANZ_API;

defaultServers = [this.franzServer, this.ferdiumServer];
defaultServers = [this.ferdiumServer, this.franzServer, this.ferdiServer];

form = new Form(
{
Expand All @@ -54,8 +56,9 @@ class ChangeServer extends Component {
label: this.props.intl.formatMessage(messages.label),
value: this.props.server,
options: [
{ value: this.ferdiumServer, label: 'Ferdium' },
{ value: this.ferdiumServer, label: 'Ferdium (Default)' },
{ value: this.franzServer, label: 'Franz' },
{ value: this.ferdiServer, label: 'Ferdi' },
{
value: this.defaultServers.includes(this.props.server)
? ''
Expand Down Expand Up @@ -108,7 +111,7 @@ class ChangeServer extends Component {
<form className="franz-form auth__form" onSubmit={e => this.submit(e)}>
<Link to='/auth/welcome'><img src="./assets/images/logo.svg" className="auth__logo" alt="" /></Link>
<h1>{intl.formatMessage(messages.headline)}</h1>
{form.$('server').value === this.franzServer && (
{(form.$('server').value === this.franzServer || form.$('server').value === this.ferdiServer) && (
<Infobox type="warning">
{intl.formatMessage(messages.warning)}
</Infobox>
Expand Down
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const DEV_FRANZ_API = 'https://dev.franzinfra.com';

export const LIVE_FERDIUM_API = 'https://api.ferdium.org';
export const LIVE_FRANZ_API = 'https://api.franzinfra.com';
export const LIVE_FERDI_API = 'https://api.getferdi.com';

// URL used to submit debugger information, see https://github.com/ferdium/debugger
export const DEBUG_API = 'https://debug.ferdium.org';
Expand Down

0 comments on commit 2b1c2f6

Please sign in to comment.