mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
25 lines
612 B
JavaScript
25 lines
612 B
JavaScript
import { mapGetters, mapMutations } from 'vuex'
|
|
|
|
export default {
|
|
computed: {
|
|
...mapGetters({
|
|
filteredPostTypes: 'posts/filteredPostTypes',
|
|
currentUser: 'auth/user',
|
|
}),
|
|
noneSetInPostTypeFilter() {
|
|
return !this.articleSetInPostTypeFilter && !this.eventSetInPostTypeFilter
|
|
},
|
|
articleSetInPostTypeFilter() {
|
|
return this.filteredPostTypes.includes('Article')
|
|
},
|
|
eventSetInPostTypeFilter() {
|
|
return this.filteredPostTypes.includes('Event')
|
|
},
|
|
},
|
|
methods: {
|
|
...mapMutations({
|
|
toggleFilterPostType: 'posts/TOGGLE_POST_TYPE',
|
|
}),
|
|
},
|
|
}
|