From d2b3d37724a999d4cc78c46157593267e29d184e Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:18:00 +0200 Subject: [feature/frontend] Reports frontend v2 (#3022) * use apiutil + paging in admin processor+handlers * we're making it happen * fix little whoopsie * styling for report list * don't youuuu forget about meee don't don't don't don't * last bits * sanitize content before showing in report statuses * update report docs --- docs/admin/settings.md | 4 +++- docs/api/swagger.yaml | 22 ++++++++++++++-------- docs/assets/admin-settings-report-detail.png | Bin 0 -> 228858 bytes docs/assets/admin-settings-reports.png | Bin 124191 -> 111971 bytes 4 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 docs/assets/admin-settings-report-detail.png (limited to 'docs') diff --git a/docs/admin/settings.md b/docs/admin/settings.md index 137ad257f..5e1a906e3 100644 --- a/docs/admin/settings.md +++ b/docs/admin/settings.md @@ -20,12 +20,14 @@ Instance moderation settings. ### Reports -![List of reports for testing, one resolved and one open.](../assets/admin-settings-reports.png) +![List of reports for testing, showing one open report.](../assets/admin-settings-reports.png) The reports section shows a list of reports, originating from your local users, or remote instances (shown anonymously as just the name of the instance, without specific username). Clicking a report shows if it was resolved (with the reasoning if available), more information, and a list of reported toots if selected by the reporting user. You can also use this view to mark a report as resolved, and fill in a comment. Whatever comment you enter here will be visible to the user that created the report, if that user is from your instance. +![The detailed view of an open report, showing the reported status and the reason for the report.](../assets/admin-settings-report-detail.png) + Clicking on the username of the reported account opens that account in the 'Accounts' view, allowing you to perform moderation actions on it. ### Accounts diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index 4dfddd8f3..367dae72f 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -4525,6 +4525,8 @@ paths: - default: 50 description: Number of emojis to return. Less than 1, or not set, means unlimited (all emojis). in: query + maximum: 200 + minimum: 0 name: limit type: integer - description: |- @@ -5739,21 +5741,23 @@ paths: in: query name: target_account_id type: string - - description: Return only reports *OLDER* than the given max ID. The report with the specified ID will not be included in the response. + - description: Return only reports *OLDER* than the given max ID (for paging downwards). The report with the specified ID will not be included in the response. in: query name: max_id type: string - - description: Return only reports *NEWER* than the given since ID. The report with the specified ID will not be included in the response. This parameter is functionally equivalent to min_id. + - description: Return only reports *NEWER* than the given since ID. The report with the specified ID will not be included in the response. in: query name: since_id type: string - - description: Return only reports *NEWER* than the given min ID. The report with the specified ID will not be included in the response. This parameter is functionally equivalent to since_id. + - description: Return only reports immediately *NEWER* than the given min ID (for paging upwards). The report with the specified ID will not be included in the response. in: query name: min_id type: string - default: 20 - description: Number of reports to return. If more than 100 or less than 1, will be clamped to 100. + description: Number of reports to return. in: query + maximum: 100 + minimum: 1 name: limit type: integer produces: @@ -7707,21 +7711,23 @@ paths: in: query name: target_account_id type: string - - description: Return only reports *OLDER* than the given max ID. The report with the specified ID will not be included in the response. + - description: Return only reports *OLDER* than the given max ID (for paging downwards). The report with the specified ID will not be included in the response. in: query name: max_id type: string - - description: Return only reports *NEWER* than the given since ID. The report with the specified ID will not be included in the response. This parameter is functionally equivalent to min_id. + - description: Return only reports *NEWER* than the given since ID. The report with the specified ID will not be included in the response. in: query name: since_id type: string - - description: Return only reports *NEWER* than the given min ID. The report with the specified ID will not be included in the response. This parameter is functionally equivalent to since_id. + - description: Return only reports immediately *NEWER* than the given min ID (for paging upwards). The report with the specified ID will not be included in the response. in: query name: min_id type: string - default: 20 - description: Number of reports to return. If less than 1, will be clamped to 1. If more than 100, will be clamped to 100. + description: Number of reports to return. in: query + maximum: 100 + minimum: 1 name: limit type: integer produces: diff --git a/docs/assets/admin-settings-report-detail.png b/docs/assets/admin-settings-report-detail.png new file mode 100644 index 000000000..3083d72da Binary files /dev/null and b/docs/assets/admin-settings-report-detail.png differ diff --git a/docs/assets/admin-settings-reports.png b/docs/assets/admin-settings-reports.png index 41e4c9325..bf023df5d 100644 Binary files a/docs/assets/admin-settings-reports.png and b/docs/assets/admin-settings-reports.png differ -- cgit v1.2.3