aboutsummaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2022-06-23 17:44:17 +0100
committerLibravatar GitHub <noreply@github.com>2022-06-23 16:44:17 +0000
commit393c5c673acc8f674c9beb052754c0ff08453a2a (patch)
tree830c7f101e7d15f53881f8f10e122c887192ab89 /src/api
parentchore: servicesStore + models into typescript (#344) (diff)
downloadferdium-app-393c5c673acc8f674c9beb052754c0ff08453a2a.tar.gz
ferdium-app-393c5c673acc8f674c9beb052754c0ff08453a2a.tar.zst
ferdium-app-393c5c673acc8f674c9beb052754c0ff08453a2a.zip
Change login screen layout (#345)
Diffstat (limited to 'src/api')
-rw-r--r--src/api/apiBase.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/api/apiBase.ts b/src/api/apiBase.ts
index 80ab99ac6..d7cc9b810 100644
--- a/src/api/apiBase.ts
+++ b/src/api/apiBase.ts
@@ -54,3 +54,26 @@ export function serverBase() {
54 54
55 return fixUrl(terms); 55 return fixUrl(terms);
56} 56}
57
58export function serverName(): string {
59
60 const serverType = (window as any).ferdium.stores.settings.all.app.server;
61 const noServer = 'You are using Ferdium without a server';
62
63 let nameServer;
64 switch (serverType) {
65 case LIVE_FRANZ_API:
66 nameServer = 'Franz Server';
67 break;
68 case LIVE_FERDIUM_API:
69 nameServer = 'Ferdium Server';
70 break;
71 case noServer:
72 nameServer = 'no Server';
73 break;
74 default:
75 nameServer = 'a Custom Server';
76 }
77
78 return nameServer;
79}