Remove Relays from the Settings

This commit is contained in:
Angelina Filippova 2021-03-08 19:42:55 +08:00
parent e3d891612f
commit 6fb956adae
6 changed files with 2 additions and 52 deletions

View file

@ -308,12 +308,6 @@ export const formSearchObject = description => {
key: ':terms_of_services', key: ':terms_of_services',
label: 'Terms of Services', label: 'Terms of Services',
search: ['Terms of Services', ':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) return processedDescription.concat(searchDataForEditableDocs)
} }

View file

@ -80,6 +80,6 @@ export default {
</script> </script>
<style rel='stylesheet/scss' lang='scss'> <style rel='stylesheet/scss' lang='scss'>
@import '../styles/main'; @import '../styles/settings';
@include settings @include settings
</style> </style>

View file

@ -16,6 +16,5 @@ export { default as Metadata } from './Metadata'
export { default as Mrf } from './MRF' export { default as Mrf } from './MRF'
export { default as Other } from './Other' export { default as Other } from './Other'
export { default as RateLimiters } from './RateLimiters' export { default as RateLimiters } from './RateLimiters'
export { default as Relays } from './Relays'
export { default as Upload } from './Upload' export { default as Upload } from './Upload'
export { default as WebPush } from './WebPush' export { default as WebPush } from './WebPush'

View file

@ -68,10 +68,6 @@ export const tabs = description => {
label: 'settings.rateLimiters', label: 'settings.rateLimiters',
settings: [':rate_limit'] settings: [':rate_limit']
}, },
'relays': {
label: 'settings.relays',
settings: ['relays']
},
'web-push': { 'web-push': {
label: 'settings.webPush', label: 'settings.webPush',
settings: [':vapid_details'] settings: [':vapid_details']

View file

@ -83,7 +83,6 @@ import {
Mrf, Mrf,
Other, Other,
RateLimiters, RateLimiters,
Relays,
Upload, Upload,
WebPush WebPush
} from './components' } from './components'
@ -109,7 +108,6 @@ export default {
Mrf, Mrf,
Other, Other,
RateLimiters, RateLimiters,
Relays,
RebootButton, RebootButton,
Upload, Upload,
WebPush WebPush
@ -184,8 +182,6 @@ export default {
return this.$store.state.settings.description.findIndex(el => el.group === setting) !== -1 return this.$store.state.settings.description.findIndex(el => el.group === setting) !== -1
} else if (setting === 'Pleroma.Web.Auth.Authenticator' || setting === ':admin_token') { } else if (setting === 'Pleroma.Web.Auth.Authenticator' || setting === ':admin_token') {
return this.$store.state.settings.description.findIndex(el => el.children[0].key === setting) !== -1 return this.$store.state.settings.description.findIndex(el => el.children[0].key === setting) !== -1
} else if (setting === 'relays') {
return [setting]
} else { } else {
return this.$store.state.settings.description.findIndex(el => el.key === setting) !== -1 return this.$store.state.settings.description.findIndex(el => el.key === setting) !== -1
} }
@ -197,6 +193,6 @@ export default {
</script> </script>
<style rel='stylesheet/scss' lang='scss' scoped> <style rel='stylesheet/scss' lang='scss' scoped>
@import './styles/main'; @import '../styles/settings';
@include settings @include settings
</style> </style>

View file

@ -61,13 +61,6 @@ describe('Form search object', () => {
key: ':terms_of_services', key: ':terms_of_services',
label: 'Terms of Services', label: 'Terms of Services',
search: ['Terms of Services', ':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() expect(_.isEqual(formSearchObject(description), expected)).toBeTruthy()
@ -116,13 +109,6 @@ describe('Form search object', () => {
key: ':terms_of_services', key: ':terms_of_services',
label: 'Terms of Services', label: 'Terms of Services',
search: ['Terms of Services', ':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() expect(_.isEqual(formSearchObject(description), expected)).toBeTruthy()
@ -171,13 +157,6 @@ describe('Form search object', () => {
key: ':terms_of_services', key: ':terms_of_services',
label: 'Terms of Services', label: 'Terms of Services',
search: ['Terms of Services', ':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() expect(_.isEqual(formSearchObject(description), expected)).toBeTruthy()
@ -215,13 +194,6 @@ describe('Form search object', () => {
key: ':terms_of_services', key: ':terms_of_services',
label: 'Terms of Services', label: 'Terms of Services',
search: ['Terms of Services', ':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() expect(_.isEqual(formSearchObject(description), expected)).toBeTruthy()
@ -306,13 +278,6 @@ describe('Form search object', () => {
key: ':terms_of_services', key: ':terms_of_services',
label: 'Terms of Services', label: 'Terms of Services',
search: ['Terms of Services', ':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() expect(_.isEqual(formSearchObject(description), expected)).toBeTruthy()