aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-07-13 05:06:33 +0530
committerLibravatar GitHub <noreply@github.com>2022-07-13 00:36:33 +0100
commit90afe49fbf0099ecd797ee4f548d80e82282f149 (patch)
treedc1f976a4261258f8e7e3bd710b1ca9d7ad35d23 /src
parentChange isImage function to link instead of URL (#470) (diff)
downloadferdium-app-90afe49fbf0099ecd797ee4f548d80e82282f149.tar.gz
ferdium-app-90afe49fbf0099ecd797ee4f548d80e82282f149.tar.zst
ferdium-app-90afe49fbf0099ecd797ee4f548d80e82282f149.zip
Handle both ferdi and ferdium servers for transferring from (#473)
Diffstat (limited to 'src')
-rw-r--r--src/api/apiBase.ts16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/api/apiBase.ts b/src/api/apiBase.ts
index 974d513a1..d066d1466 100644
--- a/src/api/apiBase.ts
+++ b/src/api/apiBase.ts
@@ -53,14 +53,18 @@ export function importExportURL() {
53 53
54export function serverBase() { 54export function serverBase() {
55 const serverType = (window as any).ferdium.stores.settings.all.app.server; 55 const serverType = (window as any).ferdium.stores.settings.all.app.server;
56 const noServer = 'You are using Ferdium without a server'; 56 const noServerFerdi = 'You are using Ferdi without a server';
57 const noServerFerdium = 'You are using Ferdium without a server';
57 58
58 let terms; 59 let terms;
59 switch (serverType) { 60 switch (serverType) {
60 case LIVE_FRANZ_API: 61 case LIVE_FRANZ_API:
61 terms = DEV_API_FRANZ_WEBSITE; 62 terms = DEV_API_FRANZ_WEBSITE;
62 break; 63 break;
63 case noServer: 64 case noServerFerdi:
65 terms = LIVE_FERDIUM_API;
66 break;
67 case noServerFerdium:
64 terms = LIVE_FERDIUM_API; 68 terms = LIVE_FERDIUM_API;
65 break; 69 break;
66 default: 70 default:
@@ -72,7 +76,8 @@ export function serverBase() {
72 76
73export function serverName(): string { 77export function serverName(): string {
74 const serverType = (window as any).ferdium.stores.settings.all.app.server; 78 const serverType = (window as any).ferdium.stores.settings.all.app.server;
75 const noServer = 'You are using Ferdium without a server'; 79 const noServerFerdi = 'You are using Ferdi without a server';
80 const noServerFerdium = 'You are using Ferdium without a server';
76 81
77 let nameServer; 82 let nameServer;
78 switch (serverType) { 83 switch (serverType) {
@@ -82,7 +87,10 @@ export function serverName(): string {
82 case LIVE_FERDIUM_API: 87 case LIVE_FERDIUM_API:
83 nameServer = 'Ferdium'; 88 nameServer = 'Ferdium';
84 break; 89 break;
85 case noServer: 90 case noServerFerdi:
91 nameServer = 'No';
92 break;
93 case noServerFerdium:
86 nameServer = 'No'; 94 nameServer = 'No';
87 break; 95 break;
88 default: 96 default: