Merge branch '245-admin-menu' into 'develop'

Resolve "Disappearing admin menu in the sidebar"

Closes #245

See merge request funkwhale/funkwhale!245
This commit is contained in:
Eliot Berriot 2018-06-10 12:30:52 +00:00
commit a2f2226450
4 changed files with 9 additions and 6 deletions

View File

@ -0,0 +1 @@
Fixed admin menu not showing after login (#245)

View File

@ -272,7 +272,7 @@ export default {
this.scrollToCurrent() this.scrollToCurrent()
} }
}, },
'$store.state.availablePermissions': { '$store.state.auth.availablePermissions': {
handler () { handler () {
this.fetchNotificationsCount() this.fetchNotificationsCount()
}, },

View File

@ -79,8 +79,6 @@ export default {
username: this.credentials.username, username: this.credentials.username,
password: this.credentials.password password: this.credentials.password
} }
// We need to pass the component's this context
// to properly make use of http in the auth service
this.$store.dispatch('auth/login', { this.$store.dispatch('auth/login', {
credentials, credentials,
next: '/library', next: '/library',

View File

@ -25,7 +25,11 @@ export default {
state.username = '' state.username = ''
state.token = '' state.token = ''
state.tokenData = {} state.tokenData = {}
state.availablePermissions = {} state.availablePermissions = {
federation: false,
library: false,
upload: false
}
}, },
profile: (state, value) => { profile: (state, value) => {
state.profile = value state.profile = value