Make minter happy
This commit is contained in:
parent
916f61014f
commit
8f966a7122
2 changed files with 10 additions and 8 deletions
|
@ -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', []),
|
||||
|
|
|
@ -64,8 +64,10 @@
|
|||
<th>Instance</th>
|
||||
<th>Reason</th>
|
||||
</tr>
|
||||
<tr v-for="entry in quarantineInstances"
|
||||
:key="entry">
|
||||
<tr
|
||||
v-for="entry in quarantineInstances"
|
||||
:key="entry"
|
||||
>
|
||||
<td>{{ entry.instance }}</td>
|
||||
<td>{{ entry.reason }}</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue