forked from Mirrors/elk
swap icon if filter applied
This commit is contained in:
parent
2bd619399d
commit
d6a1969fb8
1 changed files with 10 additions and 1 deletions
|
@ -1,11 +1,20 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const homeFilter = useHomeFilter()
|
const homeFilter = useHomeFilter()
|
||||||
|
|
||||||
|
const isActive = $computed(() => {
|
||||||
|
return !homeFilter.value.bot
|
||||||
|
|| !homeFilter.value.sensitive
|
||||||
|
|| !homeFilter.value.repost
|
||||||
|
|| !homeFilter.value.mutual
|
||||||
|
|| !homeFilter.value.tag
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VDropdown>
|
<VDropdown>
|
||||||
<button btn-text>
|
<button btn-text>
|
||||||
<div i-ri:filter-2-line />
|
<div v-if="!isActive" i-ri:filter-2-line />
|
||||||
|
<div v-else i-ri:filter-2-fill />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<template #popper>
|
<template #popper>
|
||||||
|
|
Loading…
Reference in a new issue