forked from AkkomaGang/akkoma-fe
mrf transparency panel: refactor to use vuex mapState
This commit is contained in:
parent
6d6b5f3dbb
commit
c24f95b498
1 changed files with 12 additions and 26 deletions
|
@ -1,30 +1,16 @@
|
|||
import { mapState } from 'vuex'
|
||||
|
||||
const MRFTransparencyPanel = {
|
||||
computed: {
|
||||
federationPolicy () {
|
||||
return this.$store.state.instance.federationPolicy
|
||||
},
|
||||
mrfPolicies () {
|
||||
return this.$store.state.instance.federationPolicy.mrf_policies
|
||||
},
|
||||
acceptInstances () {
|
||||
return this.$store.state.instance.federationPolicy.mrf_simple.accept
|
||||
},
|
||||
rejectInstances () {
|
||||
return this.$store.state.instance.federationPolicy.mrf_simple.reject
|
||||
},
|
||||
quarantineInstances () {
|
||||
return this.$store.state.instance.federationPolicy.quarantined_instances
|
||||
},
|
||||
ftlRemovalInstances () {
|
||||
return this.$store.state.instance.federationPolicy.mrf_simple.federated_timeline_removal
|
||||
},
|
||||
mediaNsfwInstances () {
|
||||
return this.$store.state.instance.federationPolicy.mrf_simple.media_nsfw
|
||||
},
|
||||
mediaRemovalInstances () {
|
||||
return this.$store.state.instance.federationPolicy.mrf_simple.media_removal
|
||||
}
|
||||
}
|
||||
computed: mapState({
|
||||
federationPolicy: state => state.instance.federationPolicy,
|
||||
mrfPolicies: state => state.instance.federationPolicy.mrf_policies,
|
||||
acceptInstances: state => state.instance.federationPolicy.mrf_simple.accept,
|
||||
rejectInstances: state => state.instance.federationPolicy.mrf_simple.reject,
|
||||
quarantineInstances: state => state.instance.federationPolicy.quarantined_instances,
|
||||
ftlRemovalInstances: state => state.instance.federationPolicy.mrf_simple.federated_timeline_removal,
|
||||
mediaNsfwInstances: state => state.instance.federationPolicy.mrf_simple.media_nsfw,
|
||||
mediaRemovalInstances: state => state.instance.federationPolicy.mrf_simple.media_removal
|
||||
})
|
||||
}
|
||||
|
||||
export default MRFTransparencyPanel
|
||||
|
|
Loading…
Reference in a new issue