blob: f09f43a0d08a83df56a20fbf373bafe173f206d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import { mapState } from 'vuex'
const timelineRoutes = [
'friends',
'dms',
'public-timeline',
'public-external-timeline'
]
const NavPanel = {
created () {
if (this.currentUser && this.currentUser.locked) {
this.$store.dispatch('startFetchingFollowRequests')
}
},
computed: {
onTimelineRoute () {
return timelineRoutes.includes(this.$route.name)
},
...mapState({
currentUser: state => state.users.currentUser,
followRequestCount: state => state.api.followRequests.length,
privateMode: state => state.instance.private,
federating: state => state.instance.federating
})
}
}
export default NavPanel
|