swap icon if filter applied

This commit is contained in:
Shinigami92 2023-04-01 16:22:36 +02:00
parent 2bd619399d
commit d6a1969fb8

View file

@ -1,11 +1,20 @@
<script setup lang="ts">
const homeFilter = useHomeFilter()
const isActive = $computed(() => {
return !homeFilter.value.bot
|| !homeFilter.value.sensitive
|| !homeFilter.value.repost
|| !homeFilter.value.mutual
|| !homeFilter.value.tag
})
</script>
<template>
<VDropdown>
<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>
<template #popper>