Commit c24f95b4 authored by kaniini's avatar kaniini

mrf transparency panel: refactor to use vuex mapState

parent 6d6b5f3d
Pipeline #19814 passed with stages
in 5 minutes and 24 seconds
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment