From 8f966a71226ba7fd280a49bbff32fb9c171565fe Mon Sep 17 00:00:00 2001 From: Ilja Date: Sat, 24 Oct 2020 22:05:08 +0200 Subject: [PATCH] Make minter happy --- .../mrf_transparency_panel/mrf_transparency_panel.js | 12 ++++++------ .../mrf_transparency_panel.vue | 6 ++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/mrf_transparency_panel/mrf_transparency_panel.js b/src/components/mrf_transparency_panel/mrf_transparency_panel.js index eed3a760..de3ffea5 100644 --- a/src/components/mrf_transparency_panel/mrf_transparency_panel.js +++ b/src/components/mrf_transparency_panel/mrf_transparency_panel.js @@ -7,12 +7,12 @@ import { get } from 'lodash' * are rejected/quarantined/etc. Now we get an object * `{ "instance": instance, "reason": reason }` */ -function to_instance_reason_object(e) { - if (typeof e === 'object' && e !== null) +function toInstanceReasonObject (e) { + if (typeof e === 'object' && e !== null) { return e - else - return {"instance": e, "reason": ""} - return e + } else { + return { 'instance': e, 'reason': '' } + } } const MRFTransparencyPanel = { @@ -20,7 +20,7 @@ const MRFTransparencyPanel = { ...mapState({ federationPolicy: state => get(state, 'instance.federationPolicy'), mrfPolicies: state => get(state, 'instance.federationPolicy.mrf_policies', []), - quarantineInstances: state => get(state, 'instance.federationPolicy.quarantined_instances', []).map(to_instance_reason_object), + quarantineInstances: state => get(state, 'instance.federationPolicy.quarantined_instances', []).map(toInstanceReasonObject), acceptInstances: state => get(state, 'instance.federationPolicy.mrf_simple.accept', []), rejectInstances: state => get(state, 'instance.federationPolicy.mrf_simple.reject', []), ftlRemovalInstances: state => get(state, 'instance.federationPolicy.mrf_simple.federated_timeline_removal', []), diff --git a/src/components/mrf_transparency_panel/mrf_transparency_panel.vue b/src/components/mrf_transparency_panel/mrf_transparency_panel.vue index e68c1c56..689566a4 100644 --- a/src/components/mrf_transparency_panel/mrf_transparency_panel.vue +++ b/src/components/mrf_transparency_panel/mrf_transparency_panel.vue @@ -64,8 +64,10 @@ Instance Reason - + {{ entry.instance }} {{ entry.reason }}