mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 21:59:18 +02:00
Fixed #245 (again): administration section not showing up in sidebar after login
This commit is contained in:
parent
44ccd483ca
commit
80862e350a
2 changed files with 15 additions and 11 deletions
|
@ -191,7 +191,8 @@ export default {
|
|||
backend: backend,
|
||||
tracksChangeBuffer: null,
|
||||
isCollapsed: true,
|
||||
fetchInterval: null
|
||||
fetchInterval: null,
|
||||
showAdmin: this.getShowAdmin()
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
@ -220,16 +221,6 @@ export default {
|
|||
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: {
|
||||
get () {
|
||||
return this.$store.state.queue.tracks
|
||||
|
@ -250,6 +241,17 @@ export default {
|
|||
...mapActions({
|
||||
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 () {
|
||||
this.$store.dispatch('ui/fetchFederationNotificationsCount')
|
||||
this.$store.dispatch('ui/fetchImportRequestsCount')
|
||||
|
@ -289,6 +291,7 @@ export default {
|
|||
},
|
||||
'$store.state.auth.availablePermissions': {
|
||||
handler () {
|
||||
this.showAdmin = this.getShowAdmin()
|
||||
this.fetchNotificationsCount()
|
||||
},
|
||||
deep: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue