2020-07-02 08:03:02 -07:00
|
|
|
import Popover from '../popover/popover.vue'
|
|
|
|
import { mapState } from 'vuex'
|
|
|
|
|
|
|
|
const TimelineMenu = {
|
|
|
|
components: {
|
|
|
|
Popover
|
|
|
|
},
|
2020-07-03 02:56:31 -07:00
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
isOpen: false
|
|
|
|
}
|
|
|
|
},
|
2020-07-02 08:03:02 -07:00
|
|
|
created () {
|
|
|
|
if (this.currentUser && this.currentUser.locked) {
|
|
|
|
this.$store.dispatch('startFetchingFollowRequests')
|
|
|
|
}
|
|
|
|
},
|
2020-07-03 02:56:31 -07:00
|
|
|
methods: {
|
|
|
|
openMenu () {
|
|
|
|
// Tried using $nextTick, but the animation wouldn't
|
|
|
|
// play, I assume it played too quickly
|
|
|
|
setTimeout(() => {
|
|
|
|
this.isOpen = true
|
|
|
|
}, 1)
|
|
|
|
}
|
|
|
|
},
|
2020-07-02 08:03:02 -07:00
|
|
|
computed: {
|
|
|
|
...mapState({
|
|
|
|
currentUser: state => state.users.currentUser,
|
|
|
|
privateMode: state => state.instance.private,
|
|
|
|
federating: state => state.instance.federating
|
|
|
|
}),
|
|
|
|
timelineNamesForRoute () {
|
|
|
|
return {
|
|
|
|
'friends': this.$t('nav.timeline'),
|
|
|
|
'dms': this.$t('nav.dms'),
|
|
|
|
'public-timeline': this.$t('nav.public_tl'),
|
|
|
|
'public-external-timeline': this.$t('nav.twkn')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default TimelineMenu
|