Replace getters by computed values on activitypub, auth and captcha tabs
This commit is contained in:
parent
9380a8735c
commit
a14b74f975
3 changed files with 40 additions and 21 deletions
|
@ -23,23 +23,28 @@ export default {
|
|||
components: { Setting },
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'activitypubData',
|
||||
'userData'
|
||||
'settings'
|
||||
]),
|
||||
activitypub() {
|
||||
return this.$store.state.settings.description.find(setting => setting.key === ':activitypub')
|
||||
return this.settings.description.find(setting => setting.key === ':activitypub')
|
||||
},
|
||||
activitypubData() {
|
||||
return this.settings.settings[':activitypub']
|
||||
},
|
||||
isMobile() {
|
||||
return this.$store.state.app.device === 'mobile'
|
||||
},
|
||||
labelWidth() {
|
||||
return this.isMobile ? '100px' : '210px'
|
||||
return this.isMobile ? '100px' : '240px'
|
||||
},
|
||||
loading() {
|
||||
return this.$store.state.settings.loading
|
||||
},
|
||||
user() {
|
||||
return this.$store.state.settings.description.find(setting => setting.key === ':user')
|
||||
return this.settings.description.find(setting => setting.key === ':user')
|
||||
},
|
||||
userData() {
|
||||
return this.settings.settings[':user']
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -31,31 +31,40 @@ export default {
|
|||
components: { Setting },
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'pleromaAuthenticatorData',
|
||||
'ldapData',
|
||||
'authData',
|
||||
'oauth2Data'
|
||||
'settings'
|
||||
]),
|
||||
auth() {
|
||||
return this.$store.state.settings.description.find(setting => setting.key === ':auth')
|
||||
return this.settings.description.find(setting => setting.key === ':auth')
|
||||
},
|
||||
authData() {
|
||||
return this.settings.settings[':auth']
|
||||
},
|
||||
isMobile() {
|
||||
return this.$store.state.app.device === 'mobile'
|
||||
},
|
||||
labelWidth() {
|
||||
return this.isMobile ? '100px' : '210px'
|
||||
return this.isMobile ? '100px' : '240px'
|
||||
},
|
||||
ldap() {
|
||||
return this.$store.state.settings.description.find(setting => setting.key === ':ldap')
|
||||
return this.settings.description.find(setting => setting.key === ':ldap')
|
||||
},
|
||||
ldapData() {
|
||||
return this.settings.settings[':ldap']
|
||||
},
|
||||
loading() {
|
||||
return this.$store.state.settings.loading
|
||||
return this.settings.loading
|
||||
},
|
||||
oauth2() {
|
||||
return this.$store.state.settings.description.find(setting => setting.key === ':oauth2')
|
||||
return this.settings.description.find(setting => setting.key === ':oauth2')
|
||||
},
|
||||
oauth2Data() {
|
||||
return this.settings.settings[':oauth2']
|
||||
},
|
||||
pleromaAuthenticator() {
|
||||
return this.$store.state.settings.description.find(setting => setting.description === 'Authenticator')
|
||||
return this.settings.description.find(setting => setting.description === 'Authenticator')
|
||||
},
|
||||
pleromaAuthenticatorData() {
|
||||
return this.settings.settings['']
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -23,23 +23,28 @@ export default {
|
|||
components: { Setting },
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'captchaData',
|
||||
'kocaptchaData'
|
||||
'settings'
|
||||
]),
|
||||
captcha() {
|
||||
return this.$store.state.settings.description.find(setting => setting.key === 'Pleroma.Captcha')
|
||||
return this.settings.description.find(setting => setting.key === 'Pleroma.Captcha')
|
||||
},
|
||||
captchaData() {
|
||||
return this.settings.settings['Pleroma.Captcha']
|
||||
},
|
||||
isMobile() {
|
||||
return this.$store.state.app.device === 'mobile'
|
||||
},
|
||||
kocaptcha() {
|
||||
return this.$store.state.settings.description.find(setting => setting.key === 'Pleroma.Captcha.Kocaptcha')
|
||||
return this.settings.description.find(setting => setting.key === 'Pleroma.Captcha.Kocaptcha')
|
||||
},
|
||||
kocaptchaData() {
|
||||
return this.settings.settings['Pleroma.Captcha.Kocaptcha']
|
||||
},
|
||||
labelWidth() {
|
||||
return this.isMobile ? '100px' : '210px'
|
||||
return this.isMobile ? '100px' : '240px'
|
||||
},
|
||||
loading() {
|
||||
return this.$store.state.settings.loading
|
||||
return this.settings.loading
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Reference in a new issue