elk-zone / elk

A nimble Mastodon web client
https://elk.zone
MIT License
5.37k stars 555 forks source link

Add template case for admin.report notifications #1809

Closed fihu closed 1 year ago

fihu commented 1 year ago

Similar to notification.type === 'admin.sign_up' in NotificationCard.vue, Masto 4.0's notification for new reports should be displayed.

Notification type is admin.report, currently an error is shown:

image
stackblitz[bot] commented 1 year ago

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

djwfyi commented 1 year ago

It'll only apply to moderators and other admins, but it would be nice for those of us that fall in that umbrella to see these handled gracefully. Maybe include an original link to the report so we can take action on it. (There's not really a need to build out all of the admin functions in Elk, I don't think. But being able to click the report notification and open a separate tab to view the report would be amazing.)

Semaphore handles these notifications, but doesn't provide a link to the report page.

patak-dev commented 1 year ago

This is a good issue if someone would like to contribute to Elk.

Here is the notification data for admin.report: https://docs.joinmastodon.org/entities/Admin_Report/

And to implement this a new branch should be added after admin.sign_up to show the data here: https://github.com/elk-zone/elk/blob/3732a2cc16b4de6cd60f4836151d4a3292c627fa/components/notification/NotificationCard.vue#L32

I imagine it should show at least the account, the target account, the category. I don't see a URL for the report though @djwfyi. Maybe there should be a link that goes directly to the admin setting in your server.

djwfyi commented 1 year ago

At least for Mastodon, the link would be https://domain.tld/admin/reports to get to the standard page. The report itself is just that with the report number added at the end:/## Something like: https://domain.tld/admin/reports/2

Either a link to the list of reports or a link to the specific report would be nice.

kytta commented 1 year ago

I took a swing at it in #2045 and need some help with it 🙋🏻‍♂️

kytta commented 1 year ago

2045 is now ready for review

fihu commented 1 year ago

Thanks! The commits look way more complicated than what I tried out myself. Good job!