diff --git a/CHANGELOG.md b/CHANGELOG.md
index 19b74ca0..2ed53c05 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Statuses count changes when an instance is selected and shows the amount of statuses from an originating instance
- Add a dialog window with a confirmation when a remove button is clicked on the Settings page
+- Disable tab on the Settings page if there are no settings on this tab that can be changed in Admin FE
### Fixed
diff --git a/src/views/settings/components/ActivityPub.vue b/src/views/settings/components/ActivityPub.vue
index 4e5ab1b8..67dee024 100644
--- a/src/views/settings/components/ActivityPub.vue
+++ b/src/views/settings/components/ActivityPub.vue
@@ -3,7 +3,7 @@
-
+
diff --git a/src/views/settings/components/Authentication.vue b/src/views/settings/components/Authentication.vue
index 69e5f143..9b055aad 100644
--- a/src/views/settings/components/Authentication.vue
+++ b/src/views/settings/components/Authentication.vue
@@ -3,15 +3,15 @@
-
+
-
+
-
+
diff --git a/src/views/settings/components/Captcha.vue b/src/views/settings/components/Captcha.vue
index 5e91074a..97f067a6 100644
--- a/src/views/settings/components/Captcha.vue
+++ b/src/views/settings/components/Captcha.vue
@@ -3,7 +3,7 @@
-
+
diff --git a/src/views/settings/components/Frontend.vue b/src/views/settings/components/Frontend.vue
index 2af44656..69f7a4b6 100644
--- a/src/views/settings/components/Frontend.vue
+++ b/src/views/settings/components/Frontend.vue
@@ -6,27 +6,27 @@
-
+
-
-
+
-
-
+
-
+
-
-
-
+
-
+
-
+
diff --git a/src/views/settings/components/Instance.vue b/src/views/settings/components/Instance.vue
index 02abe655..3156c33f 100644
--- a/src/views/settings/components/Instance.vue
+++ b/src/views/settings/components/Instance.vue
@@ -3,27 +3,27 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/src/views/settings/components/Logger.vue b/src/views/settings/components/Logger.vue
index b9fb891e..dc62d153 100644
--- a/src/views/settings/components/Logger.vue
+++ b/src/views/settings/components/Logger.vue
@@ -3,15 +3,15 @@
-
+
-
+
-
+
diff --git a/src/views/settings/components/MRF.vue b/src/views/settings/components/MRF.vue
index 94d3762e..977d1582 100644
--- a/src/views/settings/components/MRF.vue
+++ b/src/views/settings/components/MRF.vue
@@ -3,15 +3,15 @@
-
+
-
+
-
+
@@ -21,19 +21,19 @@
-
+
-
+
-
+
-
+
diff --git a/src/views/settings/components/Mailer.vue b/src/views/settings/components/Mailer.vue
index 0a438693..c62568a9 100644
--- a/src/views/settings/components/Mailer.vue
+++ b/src/views/settings/components/Mailer.vue
@@ -3,11 +3,11 @@
-
+
-
+
diff --git a/src/views/settings/components/Metadata.vue b/src/views/settings/components/Metadata.vue
index b4aef7c8..f0ef71c4 100644
--- a/src/views/settings/components/Metadata.vue
+++ b/src/views/settings/components/Metadata.vue
@@ -3,7 +3,7 @@
-
+
diff --git a/src/views/settings/components/Upload.vue b/src/views/settings/components/Upload.vue
index b557fb5a..97860d75 100644
--- a/src/views/settings/components/Upload.vue
+++ b/src/views/settings/components/Upload.vue
@@ -4,20 +4,20 @@
-
-
+
-
+
diff --git a/src/views/settings/components/tabs.js b/src/views/settings/components/tabs.js
index f9b41621..5c170353 100644
--- a/src/views/settings/components/tabs.js
+++ b/src/views/settings/components/tabs.js
@@ -65,7 +65,7 @@ export const tabs = {
},
'relays': {
label: 'settings.relays',
- settings: []
+ settings: ['relays']
},
'web-push': {
label: 'settings.webPush',
diff --git a/src/views/settings/index.vue b/src/views/settings/index.vue
index ff1b3435..db623184 100644
--- a/src/views/settings/index.vue
+++ b/src/views/settings/index.vue
@@ -33,7 +33,7 @@
@@ -227,6 +227,20 @@ export default {
: { value: `${searchObj.label} in ${searchObj.groupLabel}`, group: searchObj.groupKey, key: searchObj.key }
})
cb(results)
+ },
+ settingsCantBeChanged(settings) {
+ const existingSettings = settings.filter(setting => {
+ if ([':esshd', ':cors_plug', ':http_signatures', ':quack', ':logger', ':swoosh', ':mime'].includes(setting)) {
+ return this.$store.state.settings.description.findIndex(el => el.group === setting) !== -1
+ } else if (setting === 'Pleroma.Web.Auth.Authenticator' || setting === ':admin_token') {
+ return this.$store.state.settings.description.findIndex(el => el.children[0].key === setting) !== -1
+ } else if (setting === 'relays') {
+ return [setting]
+ } else {
+ return this.$store.state.settings.description.findIndex(el => el.key === setting) !== -1
+ }
+ })
+ return existingSettings.length === 0
}
}
}