Ebertsche Knöpfe for filter by posts in my groups

This commit is contained in:
Moriz Wahl 2023-03-06 16:20:45 +01:00
parent a784b0f860
commit 1575ee9765
3 changed files with 22 additions and 1 deletions

View File

@ -270,6 +270,7 @@
"filterFollow": "Beiträge von Nutzern filtern, denen ich folge",
"filterMasonryGrid": {
"myFriends": "Nutzer denen ich folge",
"myGroups": "Meine Gruppen",
"myTopics": "Meine Themen",
"noFilter": "Beiträge filtern"
},

View File

@ -270,6 +270,7 @@
"filterFollow": "Filter contributions from users I follow",
"filterMasonryGrid": {
"myFriends": "Users I follow",
"myGroups": "My groups",
"myTopics": "My topics",
"noFilter": "Filter posts"
},

View File

@ -30,7 +30,11 @@
<div class="filterButtonMenu" :class="{ 'hide-filter': hideByScroll }">
<base-button
class="my-filter-button"
v-if="!postsFilter['categories_some'] && !postsFilter['author']"
v-if="
!postsFilter['categories_some'] &&
!postsFilter['author'] &&
!postsFilter['postsInMyGroups']
"
right
@click="showFilter = !showFilter"
filled
@ -66,6 +70,20 @@
/>
</span>
<span v-if="postsFilter['postsInMyGroups']">
<base-button class="my-filter-button" right @click="showFilter = !showFilter" filled>
{{ $t('contribution.filterMasonryGrid.myGroups') }}
</base-button>
<base-button
class="filter-remove"
@click="resetByGroups"
icon="close"
:title="$t('filter-menu.deleteFilter')"
style="margin-left: -8px"
filled
/>
</span>
<div id="my-filter" v-if="showFilter">
<div @mouseleave="showFilter = false">
<filter-menu-component @showFilterMenu="showFilterMenu" />
@ -203,6 +221,7 @@ export default {
methods: {
...mapMutations({
resetByFollowed: 'posts/TOGGLE_FILTER_BY_FOLLOWED',
resetByGroups: 'posts/TOGGLE_FILTER_BY_MY_GROUPS',
resetCategories: 'posts/RESET_CATEGORIES',
toggleCategory: 'posts/TOGGLE_CATEGORY',
}),