aboutsummaryrefslogtreecommitdiff
path: root/src/components/mrf_transparency_panel
diff options
context:
space:
mode:
authorHakaba Hitoyo <hakabahitoyo@yahoo.co.jp>2020-02-10 08:04:58 +0000
committerShpuld Shpludson <shp@cock.li>2020-02-10 08:04:58 +0000
commitdafced3a864c80f69316417082aaa08e10adee49 (patch)
treeb220c75d39a1e46f6ac43f3efb55171e6cb26664 /src/components/mrf_transparency_panel
parent8fcb9c42aad9e623287c26244f079fc5028c6359 (diff)
MRF Keyword Policy Disclosure
Diffstat (limited to 'src/components/mrf_transparency_panel')
-rw-r--r--src/components/mrf_transparency_panel/mrf_transparency_panel.js10
-rw-r--r--src/components/mrf_transparency_panel/mrf_transparency_panel.vue43
2 files changed, 52 insertions, 1 deletions
diff --git a/src/components/mrf_transparency_panel/mrf_transparency_panel.js b/src/components/mrf_transparency_panel/mrf_transparency_panel.js
index 6a1baec8..a0b600d2 100644
--- a/src/components/mrf_transparency_panel/mrf_transparency_panel.js
+++ b/src/components/mrf_transparency_panel/mrf_transparency_panel.js
@@ -11,7 +11,10 @@ const MRFTransparencyPanel = {
rejectInstances: state => get(state, 'instance.federationPolicy.mrf_simple.reject', []),
ftlRemovalInstances: state => get(state, 'instance.federationPolicy.mrf_simple.federated_timeline_removal', []),
mediaNsfwInstances: state => get(state, 'instance.federationPolicy.mrf_simple.media_nsfw', []),
- mediaRemovalInstances: state => get(state, 'instance.federationPolicy.mrf_simple.media_removal', [])
+ mediaRemovalInstances: state => get(state, 'instance.federationPolicy.mrf_simple.media_removal', []),
+ keywordsFtlRemoval: state => get(state, 'instance.federationPolicy.mrf_keyword.federated_timeline_removal', []),
+ keywordsReject: state => get(state, 'instance.federationPolicy.mrf_keyword.reject', []),
+ keywordsReplace: state => get(state, 'instance.federationPolicy.mrf_keyword.replace', [])
}),
hasInstanceSpecificPolicies () {
return this.quarantineInstances.length ||
@@ -20,6 +23,11 @@ const MRFTransparencyPanel = {
this.ftlRemovalInstances.length ||
this.mediaNsfwInstances.length ||
this.mediaRemovalInstances.length
+ },
+ hasKeywordPolicies () {
+ return this.keywordsFtlRemoval.length ||
+ this.keywordsReject.length ||
+ this.keywordsReplace.length
}
}
}
diff --git a/src/components/mrf_transparency_panel/mrf_transparency_panel.vue b/src/components/mrf_transparency_panel/mrf_transparency_panel.vue
index d6495dc6..8038e587 100644
--- a/src/components/mrf_transparency_panel/mrf_transparency_panel.vue
+++ b/src/components/mrf_transparency_panel/mrf_transparency_panel.vue
@@ -109,6 +109,49 @@
/>
</ul>
</div>
+
+ <h2 v-if="hasKeywordPolicies">
+ {{ $t("about.mrf.keyword.keyword_policies") }}
+ </h2>
+
+ <div v-if="keywordsFtlRemoval.length">
+ <h4>{{ $t("about.mrf.keyword.ftl_removal") }}</h4>
+
+ <ul>
+ <li
+ v-for="keyword in keywordsFtlRemoval"
+ :key="keyword"
+ v-text="keyword"
+ />
+ </ul>
+ </div>
+
+ <div v-if="keywordsReject.length">
+ <h4>{{ $t("about.mrf.keyword.reject") }}</h4>
+
+ <ul>
+ <li
+ v-for="keyword in keywordsReject"
+ :key="keyword"
+ v-text="keyword"
+ />
+ </ul>
+ </div>
+
+ <div v-if="keywordsReplace.length">
+ <h4>{{ $t("about.mrf.keyword.replace") }}</h4>
+
+ <ul>
+ <li
+ v-for="keyword in keywordsReplace"
+ :key="keyword"
+ >
+ {{ keyword.pattern }}
+ {{ $t("about.mrf.keyword.is_replaced_by") }}
+ {{ keyword.replacement }}
+ </li>
+ </ul>
+ </div>
</div>
</div>
</div>