kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Merge branch '245-admin-menu-bis-repetita' into 'develop'
Resolve "Disappearing admin menu in the sidebar" Closes #245 See merge request funkwhale/funkwhale!377environments/review-front-funk-6vs0zq/deployments/32
commit
b3891d3a07
|
@ -0,0 +1 @@
|
||||||
|
Fixed (again): administration section not showing up in sidebar after login (#245)
|
|
@ -191,7 +191,8 @@ export default {
|
||||||
backend: backend,
|
backend: backend,
|
||||||
tracksChangeBuffer: null,
|
tracksChangeBuffer: null,
|
||||||
isCollapsed: true,
|
isCollapsed: true,
|
||||||
fetchInterval: null
|
fetchInterval: null,
|
||||||
|
showAdmin: this.getShowAdmin()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
@ -220,16 +221,6 @@ export default {
|
||||||
pendingFollows
|
pendingFollows
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showAdmin () {
|
|
||||||
let adminPermissions = [
|
|
||||||
this.$store.state.auth.availablePermissions['federation'],
|
|
||||||
this.$store.state.auth.availablePermissions['library'],
|
|
||||||
this.$store.state.auth.availablePermissions['upload']
|
|
||||||
]
|
|
||||||
return adminPermissions.filter(e => {
|
|
||||||
return e
|
|
||||||
}).length > 0
|
|
||||||
},
|
|
||||||
tracks: {
|
tracks: {
|
||||||
get () {
|
get () {
|
||||||
return this.$store.state.queue.tracks
|
return this.$store.state.queue.tracks
|
||||||
|
@ -250,6 +241,17 @@ export default {
|
||||||
...mapActions({
|
...mapActions({
|
||||||
cleanTrack: 'queue/cleanTrack'
|
cleanTrack: 'queue/cleanTrack'
|
||||||
}),
|
}),
|
||||||
|
getShowAdmin () {
|
||||||
|
let adminPermissions = [
|
||||||
|
this.$store.state.auth.availablePermissions['federation'],
|
||||||
|
this.$store.state.auth.availablePermissions['library'],
|
||||||
|
this.$store.state.auth.availablePermissions['upload']
|
||||||
|
]
|
||||||
|
return adminPermissions.filter(e => {
|
||||||
|
return e
|
||||||
|
}).length > 0
|
||||||
|
},
|
||||||
|
|
||||||
fetchNotificationsCount () {
|
fetchNotificationsCount () {
|
||||||
this.$store.dispatch('ui/fetchFederationNotificationsCount')
|
this.$store.dispatch('ui/fetchFederationNotificationsCount')
|
||||||
this.$store.dispatch('ui/fetchImportRequestsCount')
|
this.$store.dispatch('ui/fetchImportRequestsCount')
|
||||||
|
@ -289,6 +291,7 @@ export default {
|
||||||
},
|
},
|
||||||
'$store.state.auth.availablePermissions': {
|
'$store.state.auth.availablePermissions': {
|
||||||
handler () {
|
handler () {
|
||||||
|
this.showAdmin = this.getShowAdmin()
|
||||||
this.fetchNotificationsCount()
|
this.fetchNotificationsCount()
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
|
|
Ładowanie…
Reference in New Issue