mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
filters colored which were selected by filter
This commit is contained in:
parent
3dfcf4df9f
commit
11e992aa1d
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<ds-tag class="category-tag">
|
||||
<ds-tag class="category-tag" :class="filterActive ? 'filterActive' : ''">
|
||||
<base-icon :name="icon" />
|
||||
{{ name }}
|
||||
</ds-tag>
|
||||
@ -11,6 +11,7 @@ export default {
|
||||
props: {
|
||||
icon: { type: String, required: true },
|
||||
name: { type: String, default: '' },
|
||||
filterActive: { type: Boolean, default: false, required: false },
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@ -28,4 +29,7 @@ export default {
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
.filterActive{
|
||||
background-color: $color-success-active;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
placement: 'bottom-start',
|
||||
}"
|
||||
:icon="category.icon"
|
||||
:filterActive="postsFilter ? postsFilter.id_in.includes(category.id) : false"
|
||||
/>
|
||||
</div>
|
||||
<div v-else class="categories-placeholder"></div>
|
||||
@ -107,6 +108,10 @@ export default {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
postsFilter: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -93,6 +93,7 @@
|
||||
>
|
||||
<post-teaser
|
||||
:post="post"
|
||||
:postsFilter="postsFilter['categories_some']"
|
||||
@removePostFromList="posts = removePostFromList(post, posts)"
|
||||
@pinPost="pinPost(post, refetchPostList)"
|
||||
@unpinPost="unpinPost(post, refetchPostList)"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user