You've already forked AstralRinth
forked from didirus/AstralRinth
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:
@@ -1,6 +1,5 @@
|
||||
export const state = () => ({
|
||||
user: null,
|
||||
userFollows: [],
|
||||
token: '',
|
||||
headers: {},
|
||||
})
|
||||
@@ -9,9 +8,6 @@ export const mutations = {
|
||||
SET_USER(state, user) {
|
||||
state.user = user
|
||||
},
|
||||
SET_USER_FOLLOWS(state, follows) {
|
||||
state.userFollows = follows
|
||||
},
|
||||
SET_TOKEN(state, token) {
|
||||
state.token = token
|
||||
},
|
||||
@@ -42,15 +38,4 @@ export const actions = {
|
||||
console.error('Request for user info encountered an error: ', e)
|
||||
}
|
||||
},
|
||||
async fetchUserFollows({ commit }, { userId, token }) {
|
||||
const follows = await this.$axios.get(
|
||||
`https://api.modrinth.com/api/v1/user/${userId}/follows`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: token,
|
||||
},
|
||||
}
|
||||
)
|
||||
commit('SET_USER_FOLLOWS', follows)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user