aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modern/src/common/attributes/useServerAttributes.js4
-rw-r--r--modern/src/login/LoginPage.js3
-rw-r--r--modern/src/resources/l10n/en.json1
3 files changed, 7 insertions, 1 deletions
diff --git a/modern/src/common/attributes/useServerAttributes.js b/modern/src/common/attributes/useServerAttributes.js
index e87d1d7e..f70fd220 100644
--- a/modern/src/common/attributes/useServerAttributes.js
+++ b/modern/src/common/attributes/useServerAttributes.js
@@ -23,6 +23,10 @@ export default (t) => useMemo(() => ({
type: 'string',
subtype: 'color',
},
+ disableChange: {
+ name: t('serverChangeDisable'),
+ type: 'boolean',
+ },
'ui.disableLoginLanguage': {
name: t('attributeUiDisableLoginLanguage'),
type: 'boolean',
diff --git a/modern/src/login/LoginPage.js b/modern/src/login/LoginPage.js
index 59e64bed..54fd09fb 100644
--- a/modern/src/login/LoginPage.js
+++ b/modern/src/login/LoginPage.js
@@ -59,6 +59,7 @@ const LoginPage = () => {
const registrationEnabled = useSelector((state) => state.session.server.registration);
const languageEnabled = useSelector((state) => !state.session.server.attributes['ui.disableLoginLanguage']);
+ const changeEnabled = useSelector((state) => !state.session.server.attributes.disableChange);
const emailEnabled = useSelector((state) => state.session.server.emailEnabled);
const openIdEnabled = useSelector((state) => state.session.server.openIdEnabled);
const openIdForced = useSelector((state) => state.session.server.openIdEnabled && state.session.server.openIdForce);
@@ -143,7 +144,7 @@ const LoginPage = () => {
return (
<LoginLayout>
<div className={classes.options}>
- {nativeEnvironment && (
+ {nativeEnvironment && changeEnabled && (
<Tooltip title={t('settingsServer')}>
<IconButton onClick={() => navigate('/change-server')}>
<LockOpenIcon />
diff --git a/modern/src/resources/l10n/en.json b/modern/src/resources/l10n/en.json
index 8791c530..d5125657 100644
--- a/modern/src/resources/l10n/en.json
+++ b/modern/src/resources/l10n/en.json
@@ -311,6 +311,7 @@
"serverColorPrimary": "Color Primary",
"serverColorSecondary": "Color Secondary",
"serverLogo": "Logo Image",
+ "serverChangeDisable": "Disable Server Change",
"mapTitle": "Map",
"mapActive": "Active Maps",
"mapOverlay": "Map Overlay",