Skip to content

Simple policy reasons for instance specific policies

This is for be-mr pleroma!2964 (closed) and issue pleroma#1850 (closed)

The idea is to also give a reason instead of only a list of rejected/muted/etc. instances. It's my first time working on vue and first time working on js in a project of this size, so pls don't be too hard on me, but do be strict so I can learn 😬

What I did

  • In the BE I added two extra keys in the nodeinfo to get this extra info (so we wouldn't break backwards compatibility). The keys are mrf_simple_info and quarantined_instances_info. It is of the form
"quarantined_instances_info": {
  "quarantined_instances": {
    "example.com": {
      "reason": "whatever reason"
    },
    "other.example.com": {
      "reason": "other reason"
    }
  }
}
  • The about page now has a table for the instances and reasons. The first column is 180px wide which should be enough for more than 25 characters. I checked my DB and instance names of 26 characters and more are much less common then 25, so this seems like a good default width to me. I also added some padding to the left and bottom of the tables.
length|count|
------|-----|
      |   15|
    61|    4|
    60|    2|
    50|    1|
    43|    2|
    41|    1|
    37|    4|
    35|    1|
    34|    1|
    33|    2|
    32|   15|
    31|    6|
    30|    9|
    29|   31|
    28|   12|
    27|   49|
    26|   61|
    25|  120|
    24|  189|
    23|  563|
    22|  351|
    21|  335|
    20|  562|
    19|  766|
    18| 1156|
  • BE's without these changes in nodeinfo can still use this FE and older FE's work on BE's with these changes in nodeinfo.
  • I added localisation for English and Dutch (I don't feel comfortable enough to do other languages). When no reason is provided a localised N/A is shown.
  • I extracted the css to a seperate file and added new css for the table.

Example

image

Edited by Ilja

Merge request reports

Loading