Kyoso-Team / kyoso

A web application that takes osu! tournaments beyonds spreadsheets.
http://kyoso.sh
GNU Affero General Public License v3.0
2 stars 1 forks source link

Display notifications #30

Open L-Mario564 opened 6 months ago

L-Mario564 commented 6 months ago

Why?

The user will receive notifications upon certain actions, such as being accepted/rejected into a tournament's staff team, having their join team request be reject/accepted, that a mappool, schedule or stats for a round's tournament has released, etc.

How?

There's already a table that stores notifications and another table that serves the purpose of linking a notification with a user. I previously created a getNotifications function get these notifications during server-side rendering. The function hasn't been tested though.

Assuming the function works as intended, then the only thing left is basically displaying these notifications to the user by having a bell icon next to their profile pic, upon clicking it, they'll be shown a menu with the 30 last notifications. The user must be able to mark these as read.

If they wish to see all notifications, a button can be displayed in the same menu, said button can either open large modal (or maybe we can implement Skeleton's drawer component) that displays all notifications being paginated, showing 30 results per page, sorted from newest to oldest. In this component, the user also must be able to filter by unread notifications and have a button that marks all unread as read.