Fix notification & follow list sorting, Add notification badge + loading animation (#206)

* Order notifications and followed mods

Fixes modrinth/knossos#195

* Add user notification badge on avatar

Closes modrinth/knossos#145

* Add loading animation

* Chain calls, remove console.log

* Chain calls

* Fix formatting to match prettier

* Remove unused userFollows

* Create user vuex store

* Add notification count indication on dashboard

* Fix background for light mode

* Move delay check to action, add force parameter

* Slightly decrease notification badge opacity on dashboard

* Remove SVG for image masking, use border around bubble

Also adds CSS for when the dropdown is opened/hovered

* Fix merge conflicts

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
venashial
2021-05-27 09:32:34 -07:00
committed by GitHub
parent 4d64df37f5
commit 2c22837d9f
11 changed files with 287 additions and 25 deletions

View File

@@ -68,7 +68,8 @@ export default {
await axios.get(
`https://api.modrinth.com/api/v1/mods?ids=${JSON.stringify(res.data)}`
)
).data
).data.sort((a, b) => a.title > b.title)
return {
mods,
}

View File

@@ -65,7 +65,7 @@ export default {
`https://api.modrinth.com/api/v1/user/${data.$auth.user.id}/notifications`,
data.$auth.headers
)
).data
).data.sort((a, b) => new Date(b.created) - new Date(a.created))
return {
notifications,
@@ -94,6 +94,7 @@ export default {
)
this.notifications.splice(index, 1)
this.$store.dispatch('user/fetchNotifications', { force: true })
} catch (err) {
this.$notify({
group: 'main',