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',
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)
}

View file

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

View file

@ -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'

View file

@ -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']

View file

@ -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 {
</script>
<style rel='stylesheet/scss' lang='scss' scoped>
@import './styles/main';
@import '../styles/settings';
@include settings
</style>

View file

@ -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()