forked from srxl/akkoma-fe
about: add MRF transparency panel
This commit is contained in:
parent
20ccd93a17
commit
90f764224d
6 changed files with 148 additions and 2 deletions
|
@ -227,6 +227,9 @@ const getNodeInfo = async ({ store }) => {
|
||||||
store.dispatch('setInstanceOption', { name: 'frontendVersion', value: frontendVersion })
|
store.dispatch('setInstanceOption', { name: 'frontendVersion', value: frontendVersion })
|
||||||
store.dispatch('setInstanceOption', { name: 'tagPolicyAvailable', value: metadata.federation.mrf_policies.includes('TagPolicy') })
|
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
|
const accounts = metadata.staffAccounts
|
||||||
await resolveStaffAccounts({ store, accounts })
|
await resolveStaffAccounts({ store, accounts })
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2,13 +2,15 @@ import InstanceSpecificPanel from '../instance_specific_panel/instance_specific_
|
||||||
import FeaturesPanel from '../features_panel/features_panel.vue'
|
import FeaturesPanel from '../features_panel/features_panel.vue'
|
||||||
import TermsOfServicePanel from '../terms_of_service_panel/terms_of_service_panel.vue'
|
import TermsOfServicePanel from '../terms_of_service_panel/terms_of_service_panel.vue'
|
||||||
import StaffPanel from '../staff_panel/staff_panel.vue'
|
import StaffPanel from '../staff_panel/staff_panel.vue'
|
||||||
|
import MRFTransparencyPanel from '../mrf_transparency_panel/mrf_transparency_panel.vue'
|
||||||
|
|
||||||
const About = {
|
const About = {
|
||||||
components: {
|
components: {
|
||||||
InstanceSpecificPanel,
|
InstanceSpecificPanel,
|
||||||
FeaturesPanel,
|
FeaturesPanel,
|
||||||
TermsOfServicePanel,
|
TermsOfServicePanel,
|
||||||
StaffPanel
|
StaffPanel,
|
||||||
|
MRFTransparencyPanel
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
|
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<instance-specific-panel v-if="showInstanceSpecificPanel" />
|
<instance-specific-panel v-if="showInstanceSpecificPanel" />
|
||||||
<staff-panel />
|
<staff-panel />
|
||||||
<terms-of-service-panel />
|
<terms-of-service-panel />
|
||||||
|
<MRFTransparencyPanel />
|
||||||
<features-panel v-if="showFeaturesPanel" />
|
<features-panel v-if="showFeaturesPanel" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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>
|
|
@ -1,6 +1,22 @@
|
||||||
{
|
{
|
||||||
"about": {
|
"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": {
|
"chat": {
|
||||||
"title": "Chat"
|
"title": "Chat"
|
||||||
|
|
Loading…
Reference in a new issue