aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/apiBase.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/apiBase.ts')
-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}