about: add MRF transparency panel

This commit is contained in:
Ariadne Conill 2019-11-09 00:09:32 -06:00
parent 20ccd93a17
commit 90f764224d
6 changed files with 148 additions and 2 deletions

View file

@ -227,6 +227,9 @@ const getNodeInfo = async ({ store }) => {
store.dispatch('setInstanceOption', { name: 'frontendVersion', value: frontendVersion })
store.dispatch('setInstanceOption', { name: 'tagPolicyAvailable', value: metadata.federation.mrf_policies.includes('TagPolicy') })
const federation = metadata.federation
store.dispatch('setInstanceOption', { name: 'federationPolicy', value: federation })
const accounts = metadata.staffAccounts
await resolveStaffAccounts({ store, accounts })
} else {

View file

@ -2,13 +2,15 @@ import InstanceSpecificPanel from '../instance_specific_panel/instance_specific_
import FeaturesPanel from '../features_panel/features_panel.vue'
import TermsOfServicePanel from '../terms_of_service_panel/terms_of_service_panel.vue'
import StaffPanel from '../staff_panel/staff_panel.vue'
import MRFTransparencyPanel from '../mrf_transparency_panel/mrf_transparency_panel.vue'
const About = {
components: {
InstanceSpecificPanel,
FeaturesPanel,
TermsOfServicePanel,
StaffPanel
StaffPanel,
MRFTransparencyPanel
},
computed: {
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },

View file

@ -3,6 +3,7 @@
<instance-specific-panel v-if="showInstanceSpecificPanel" />
<staff-panel />
<terms-of-service-panel />
<MRFTransparencyPanel />
<features-panel v-if="showFeaturesPanel" />
</div>
</template>

View file

@ -0,0 +1,33 @@
const MRFTransparencyPanel = {
components: {
},
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
}
}
}
export default MRFTransparencyPanel

View file

@ -0,0 +1,91 @@
<template>
<div class="mrf-transparency-panel" v-if="federationPolicy">
<div class="panel panel-default base01-background">
<div class="panel-heading timeline-heading base02-background">
<div class="title">
{{ $t("about.federation") }}
</div>
</div>
<div class="panel-body">
<div class="mrf-section">
<h2>{{ $t("about.mrf_policies") }}</h2>
<p>{{ $t("about.mrf_policies_desc") }}</p>
<ul>
<li v-for="policy in mrfPolicies" v-bind:key="policy" v-text="policy" />
</ul>
<h2>{{ $t("about.mrf_policy_simple") }}</h2>
<div v-if="acceptInstances.length">
<h4>{{ $t("about.mrf_policy_simple_accept") }}</h4>
<p>{{ $t("about.mrf_policy_simple_accept_desc") }}</p>
<ul>
<li v-for="instance in acceptInstances" v-bind:key="instance" v-text="instance" />
</ul>
</div>
<div v-if="rejectInstances.length">
<h4>{{ $t("about.mrf_policy_simple_reject") }}</h4>
<p>{{ $t("about.mrf_policy_simple_reject_desc") }}</p>
<ul>
<li v-for="instance in rejectInstances" v-bind:key="instance" v-text="instance" />
</ul>
</div>
<div v-if="quarantineInstances.length">
<h4>{{ $t("about.mrf_policy_simple_quarantine") }}</h4>
<p>{{ $t("about.mrf_policy_simple_quarantine_desc") }}</p>
<ul>
<li v-for="instance in quarantineInstances" v-bind:key="instance" v-text="instance" />
</ul>
</div>
<div v-if="ftlRemovalInstances.length">
<h4>{{ $t("about.mrf_policy_simple_ftl_removal") }}</h4>
<p>{{ $t("about.mrf_policy_simple_ftl_removal_desc") }}</p>
<ul>
<li v-for="instance in ftlRemovalInstances" v-bind:key="instance" v-text="instance" />
</ul>
</div>
<div v-if="mediaNsfwInstances.length">
<h4>{{ $t("about.mrf_policy_simple_media_nsfw") }}</h4>
<p>{{ $t("about.mrf_policy_simple_media_nsfw_desc") }}</p>
<ul>
<li v-for="instance in mediaNsfwInstances" v-bind:key="instance" v-text="instance" />
</ul>
</div>
<div v-if="mediaRemovalInstances.length">
<h4>{{ $t("about.mrf_policy_simple_media_removal") }}</h4>
<p>{{ $t("about.mrf_policy_simple_media_removal_desc") }}</p>
<ul>
<li v-for="instance in mediaRemovalInstances" v-bind:key="instance" v-text="instance" />
</ul>
</div>
</div>
</div>
</div>
</div>
</template>
<script src="./mrf_transparency_panel.js"></script>
<style lang="scss">
.mrf-section {
margin: 1em;
}
</style>

View file

@ -1,6 +1,22 @@
{
"about": {
"staff": "Staff"
"staff": "Staff",
"federation": "Federation",
"mrf_policies": "Enabled MRF Policies",
"mrf_policies_desc": "MRF policies manipulate the federation behaviour of the instance. The following policies are enabled:",
"mrf_policy_simple": "Instance-specific Policies",
"mrf_policy_simple_accept": "Accept",
"mrf_policy_simple_accept_desc": "This instance only accepts messages from the following instances:",
"mrf_policy_simple_reject": "Reject",
"mrf_policy_simple_reject_desc": "This instance will not accept messages from the following instances:",
"mrf_policy_simple_quarantine": "Quarantine",
"mrf_policy_simple_quarantine_desc": "This instance will send only public posts to the following instances:",
"mrf_policy_simple_ftl_removal": "Removal from \"The Whole Known Network\" Timeline",
"mrf_policy_simple_ftl_removal_desc": "This instance removes these instances from \"The Whole Known Network\" timeline:",
"mrf_policy_simple_media_removal": "Media Removal",
"mrf_policy_simple_media_removal_desc": "This instance removes media from posts on the following instances:",
"mrf_policy_simple_media_nsfw": "Media Force-set As Sensitive",
"mrf_policy_simple_media_nsfw_desc": "This instance forces media to be set sensitive in posts on the following instances:"
},
"chat": {
"title": "Chat"