fix currentUser binding
This commit is contained in:
parent
553ee6c8d1
commit
1a01e64cb5
1 changed files with 9 additions and 21 deletions
|
@ -35,25 +35,15 @@ const TimelineMenu = {
|
|||
this.$store.dispatch('setLastTimeline', this.$route.name)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentUser () {
|
||||
return this.$store.state.users.currentUser
|
||||
},
|
||||
privateMode () {
|
||||
return this.$store.state.instance.private
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openMenu () {
|
||||
// $nextTick is too fast, animation won't play back but
|
||||
// instead starts in fully open position. Low values
|
||||
// like 1-5 work on fast machines but not on mobile, 25
|
||||
// seems like a good compromise that plays without significant
|
||||
// added lag.
|
||||
setTimeout(() => {
|
||||
this.isOpen = true
|
||||
}, 25)
|
||||
},
|
||||
blockOpen (event) {
|
||||
// For the blank area inside the button element.
|
||||
// Just setting @click.stop="" makes unintuitive behavior when
|
||||
// menu is open and clicking on the blank area doesn't close it.
|
||||
if (!this.isOpen) {
|
||||
event.stopPropagation()
|
||||
}
|
||||
},
|
||||
timelineName () {
|
||||
const route = this.$route.name
|
||||
if (route === 'tag-timeline') {
|
||||
|
@ -64,9 +54,7 @@ const TimelineMenu = {
|
|||
}
|
||||
const i18nkey = timelineNames()[this.$route.name]
|
||||
return i18nkey ? this.$t(i18nkey) : route
|
||||
},
|
||||
currentUser () { return this.$store.state.users.currentUser },
|
||||
privateMode () { return this.$store.state.instance.private }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue