From 6fb956adaea68ed114ee4aa5bf4ebb5c14616b9f Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Mon, 8 Mar 2021 19:42:55 +0800 Subject: [PATCH] Remove Relays from the Settings --- src/store/modules/normalizers.js | 6 ---- .../Relays.vue => relays/index.vue} | 2 +- src/views/settings/components/index.js | 1 - src/views/settings/components/tabs.js | 4 --- src/views/settings/index.vue | 6 +--- test/views/settings/formSearchObject.test.js | 35 ------------------- 6 files changed, 2 insertions(+), 52 deletions(-) rename src/views/{settings/components/Relays.vue => relays/index.vue} (98%) diff --git a/src/store/modules/normalizers.js b/src/store/modules/normalizers.js index 8379a8b0..150865d0 100644 --- a/src/store/modules/normalizers.js +++ b/src/store/modules/normalizers.js @@ -308,12 +308,6 @@ export const formSearchObject = description => { key: ':terms_of_services', label: 'Terms of Services', search: ['Terms of Services', ':terms_of_services'] - }, { - groupKey: 'relays', - groupLabel: 'Relays', - key: ':relays', - label: 'Relays', - search: ['Relays', ':relays'] }] return processedDescription.concat(searchDataForEditableDocs) } diff --git a/src/views/settings/components/Relays.vue b/src/views/relays/index.vue similarity index 98% rename from src/views/settings/components/Relays.vue rename to src/views/relays/index.vue index 9e8d16a8..9bef9835 100644 --- a/src/views/settings/components/Relays.vue +++ b/src/views/relays/index.vue @@ -80,6 +80,6 @@ export default { diff --git a/src/views/settings/components/index.js b/src/views/settings/components/index.js index e3c5c4a8..8d0e6348 100644 --- a/src/views/settings/components/index.js +++ b/src/views/settings/components/index.js @@ -16,6 +16,5 @@ export { default as Metadata } from './Metadata' export { default as Mrf } from './MRF' export { default as Other } from './Other' export { default as RateLimiters } from './RateLimiters' -export { default as Relays } from './Relays' export { default as Upload } from './Upload' export { default as WebPush } from './WebPush' diff --git a/src/views/settings/components/tabs.js b/src/views/settings/components/tabs.js index 3c83feb3..19dccb91 100644 --- a/src/views/settings/components/tabs.js +++ b/src/views/settings/components/tabs.js @@ -68,10 +68,6 @@ export const tabs = description => { label: 'settings.rateLimiters', settings: [':rate_limit'] }, - 'relays': { - label: 'settings.relays', - settings: ['relays'] - }, 'web-push': { label: 'settings.webPush', settings: [':vapid_details'] diff --git a/src/views/settings/index.vue b/src/views/settings/index.vue index cc31d76a..52816107 100644 --- a/src/views/settings/index.vue +++ b/src/views/settings/index.vue @@ -83,7 +83,6 @@ import { Mrf, Other, RateLimiters, - Relays, Upload, WebPush } from './components' @@ -109,7 +108,6 @@ export default { Mrf, Other, RateLimiters, - Relays, RebootButton, Upload, WebPush @@ -184,8 +182,6 @@ export default { 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 } @@ -197,6 +193,6 @@ export default { diff --git a/test/views/settings/formSearchObject.test.js b/test/views/settings/formSearchObject.test.js index c5bbeebb..140da88b 100644 --- a/test/views/settings/formSearchObject.test.js +++ b/test/views/settings/formSearchObject.test.js @@ -61,13 +61,6 @@ describe('Form search object', () => { key: ':terms_of_services', label: 'Terms of Services', search: ['Terms of Services', ':terms_of_services'] - }, - { - groupKey: 'relays', - groupLabel: 'Relays', - key: ':relays', - label: 'Relays', - search: ['Relays', ':relays'] } ] expect(_.isEqual(formSearchObject(description), expected)).toBeTruthy() @@ -116,13 +109,6 @@ describe('Form search object', () => { key: ':terms_of_services', label: 'Terms of Services', search: ['Terms of Services', ':terms_of_services'] - }, - { - groupKey: 'relays', - groupLabel: 'Relays', - key: ':relays', - label: 'Relays', - search: ['Relays', ':relays'] } ] expect(_.isEqual(formSearchObject(description), expected)).toBeTruthy() @@ -171,13 +157,6 @@ describe('Form search object', () => { key: ':terms_of_services', label: 'Terms of Services', search: ['Terms of Services', ':terms_of_services'] - }, - { - groupKey: 'relays', - groupLabel: 'Relays', - key: ':relays', - label: 'Relays', - search: ['Relays', ':relays'] } ] expect(_.isEqual(formSearchObject(description), expected)).toBeTruthy() @@ -215,13 +194,6 @@ describe('Form search object', () => { key: ':terms_of_services', label: 'Terms of Services', search: ['Terms of Services', ':terms_of_services'] - }, - { - groupKey: 'relays', - groupLabel: 'Relays', - key: ':relays', - label: 'Relays', - search: ['Relays', ':relays'] } ] expect(_.isEqual(formSearchObject(description), expected)).toBeTruthy() @@ -306,13 +278,6 @@ describe('Form search object', () => { key: ':terms_of_services', label: 'Terms of Services', search: ['Terms of Services', ':terms_of_services'] - }, - { - groupKey: 'relays', - groupLabel: 'Relays', - key: ':relays', - label: 'Relays', - search: ['Relays', ':relays'] } ] expect(_.isEqual(formSearchObject(description), expected)).toBeTruthy()