From c372530ed189eb36d786bfb5a42d785a7dd8a4e8 Mon Sep 17 00:00:00 2001
From: André Oliveira <37463445+SpecialAro@users.noreply.github.com>
Date: Tue, 5 Jul 2022 11:04:19 +0100
Subject: Add Server Information to About Dialog and to Global Messages (#425)
Add Server Information to About Dialog and to Global Messages
---
src/api/apiBase.ts | 8 ++++----
src/components/auth/AuthLayout.js | 8 +++++++-
src/components/auth/Welcome.js | 6 ++++--
src/i18n/globalMessages.ts | 2 +-
src/i18n/locales/en-US.json | 6 +++---
src/lib/Menu.js | 3 ++-
6 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/src/api/apiBase.ts b/src/api/apiBase.ts
index c6e3c0ed8..918213542 100644
--- a/src/api/apiBase.ts
+++ b/src/api/apiBase.ts
@@ -61,16 +61,16 @@ export function serverName(): string {
let nameServer;
switch (serverType) {
case LIVE_FRANZ_API:
- nameServer = 'Franz Server';
+ nameServer = 'Franz';
break;
case LIVE_FERDIUM_API:
- nameServer = 'Ferdium Server';
+ nameServer = 'Ferdium';
break;
case noServer:
- nameServer = 'no Server';
+ nameServer = 'No';
break;
default:
- nameServer = 'a Custom Server';
+ nameServer = 'Custom';
}
return nameServer;
diff --git a/src/components/auth/AuthLayout.js b/src/components/auth/AuthLayout.js
index 77b91fa1c..41bda2f67 100644
--- a/src/components/auth/AuthLayout.js
+++ b/src/components/auth/AuthLayout.js
@@ -21,6 +21,8 @@ import AppUpdateInfoBar from '../AppUpdateInfoBar';
import { GITHUB_FERDIUM_URL } from '../../config';
import Icon from '../ui/icon';
+import { serverName } from '../../api/apiBase';
+
class AuthLayout extends Component {
static propTypes = {
children: oneOrManyChildElements.isRequired,
@@ -53,6 +55,10 @@ class AuthLayout extends Component {
const { intl } = this.props;
+ let serverNameParse = serverName();
+ serverNameParse =
+ serverNameParse === 'Custom' ? 'your Custom Server' : serverNameParse;
+
return (
<>
{isWindows && !isFullScreen && (
@@ -85,7 +91,7 @@ class AuthLayout extends Component {
onClick={retryHealthCheck}
>
Ferdium Workspaces let you focus on what’s important right now. Set up different sets of services and easily switch between them at any time.
You decide which services you need when and where, so we can help you stay on top of your game - or easily switch off from work whenever you want.
", "workspaceDrawer.workspacesSettingsTooltip": "Edit workspaces settings", "workspaces.switchingIndicator.switchingTo": "Switching to" -} \ No newline at end of file +} diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 9e063e24c..0272f39c3 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js @@ -37,7 +37,7 @@ import { ferdiumVersion } from '../environment-remote'; import { todoActions } from '../features/todos/actions'; import workspaceActions from '../features/workspaces/actions'; import { workspaceStore } from '../features/workspaces/index'; -import apiBase, { serverBase } from '../api/apiBase'; +import apiBase, { serverBase, serverName } from '../api/apiBase'; import { openExternalUrl } from '../helpers/url-helpers'; import globalMessages from '../i18n/globalMessages'; @@ -870,6 +870,7 @@ class FranzMenu { const aboutAppDetails = [ `Version: ${ferdiumVersion}`, + `Server: ${serverName()} Server`, `Electron: ${electronVersion}`, `Chrome: ${chromeVersion}`, `Node.js: ${nodeVersion}`, -- cgit v1.2.3-54-g00ecf