diff options
author | André Oliveira <37463445+SpecialAro@users.noreply.github.com> | 2022-07-05 11:04:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-05 11:04:19 +0100 |
commit | c372530ed189eb36d786bfb5a42d785a7dd8a4e8 (patch) | |
tree | bcc056023f70037fa87ef88b4441c24f3d6ed110 /src/components | |
parent | 6.0.0-nightly.89 [skip ci] (diff) | |
download | ferdium-app-c372530ed189eb36d786bfb5a42d785a7dd8a4e8.tar.gz ferdium-app-c372530ed189eb36d786bfb5a42d785a7dd8a4e8.tar.zst ferdium-app-c372530ed189eb36d786bfb5a42d785a7dd8a4e8.zip |
Add Server Information to About Dialog and to Global Messages (#425)
Add Server Information to About Dialog and to Global Messages
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/auth/AuthLayout.js | 8 | ||||
-rw-r--r-- | src/components/auth/Welcome.js | 6 |
2 files changed, 11 insertions, 3 deletions
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'; | |||
21 | import { GITHUB_FERDIUM_URL } from '../../config'; | 21 | import { GITHUB_FERDIUM_URL } from '../../config'; |
22 | import Icon from '../ui/icon'; | 22 | import Icon from '../ui/icon'; |
23 | 23 | ||
24 | import { serverName } from '../../api/apiBase'; | ||
25 | |||
24 | class AuthLayout extends Component { | 26 | class AuthLayout extends Component { |
25 | static propTypes = { | 27 | static propTypes = { |
26 | children: oneOrManyChildElements.isRequired, | 28 | children: oneOrManyChildElements.isRequired, |
@@ -53,6 +55,10 @@ class AuthLayout extends Component { | |||
53 | 55 | ||
54 | const { intl } = this.props; | 56 | const { intl } = this.props; |
55 | 57 | ||
58 | let serverNameParse = serverName(); | ||
59 | serverNameParse = | ||
60 | serverNameParse === 'Custom' ? 'your Custom Server' : serverNameParse; | ||
61 | |||
56 | return ( | 62 | return ( |
57 | <> | 63 | <> |
58 | {isWindows && !isFullScreen && ( | 64 | {isWindows && !isFullScreen && ( |
@@ -85,7 +91,7 @@ class AuthLayout extends Component { | |||
85 | onClick={retryHealthCheck} | 91 | onClick={retryHealthCheck} |
86 | > | 92 | > |
87 | <Icon icon={mdiFlash} /> | 93 | <Icon icon={mdiFlash} /> |
88 | {intl.formatMessage(globalMessages.APIUnhealthy)} | 94 | {intl.formatMessage(globalMessages.APIUnhealthy, { serverNameParse })} |
89 | </InfoBar> | 95 | </InfoBar> |
90 | )} | 96 | )} |
91 | <div className="auth__layout"> | 97 | <div className="auth__layout"> |
diff --git a/src/components/auth/Welcome.js b/src/components/auth/Welcome.js index 830501ac3..c9d592a88 100644 --- a/src/components/auth/Welcome.js +++ b/src/components/auth/Welcome.js | |||
@@ -21,7 +21,7 @@ const messages = defineMessages({ | |||
21 | }, | 21 | }, |
22 | changeServerMessage: { | 22 | changeServerMessage: { |
23 | id: 'login.changeServerMessage', | 23 | id: 'login.changeServerMessage', |
24 | defaultMessage: 'You are using {serverNameParse}, do you want to switch?' | 24 | defaultMessage: 'You are using {serverNameParse} Server, do you want to switch?' |
25 | }, | 25 | }, |
26 | changeServer: { | 26 | changeServer: { |
27 | id: 'login.changeServer', | 27 | id: 'login.changeServer', |
@@ -53,7 +53,9 @@ class Welcome extends Component { | |||
53 | recipes = shuffleArray(recipes); | 53 | recipes = shuffleArray(recipes); |
54 | recipes.length = 8 * 2; | 54 | recipes.length = 8 * 2; |
55 | 55 | ||
56 | const serverNameParse = serverName(); | 56 | let serverNameParse = serverName(); |
57 | serverNameParse = | ||
58 | serverNameParse === 'Custom' ? 'a Custom' : serverNameParse; | ||
57 | 59 | ||
58 | return ( | 60 | return ( |
59 | <div className="welcome"> | 61 | <div className="welcome"> |