2023-04-01 14:49:25 +01:00
|
|
|
<script setup lang="ts">
|
2023-04-01 15:15:41 +01:00
|
|
|
const homeFilter = useHomeFilter()
|
2023-04-01 15:22:36 +01:00
|
|
|
|
|
|
|
const isActive = $computed(() => {
|
|
|
|
return !homeFilter.value.bot
|
|
|
|
|| !homeFilter.value.sensitive
|
|
|
|
|| !homeFilter.value.repost
|
|
|
|
|| !homeFilter.value.mutual
|
|
|
|
|| !homeFilter.value.tag
|
|
|
|
})
|
2023-04-01 14:49:25 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<VDropdown>
|
|
|
|
<button btn-text>
|
2023-04-01 15:22:36 +01:00
|
|
|
<div v-if="!isActive" i-ri:filter-2-line />
|
|
|
|
<div v-else i-ri:filter-2-fill />
|
2023-04-01 14:49:25 +01:00
|
|
|
</button>
|
|
|
|
|
|
|
|
<template #popper>
|
2023-04-01 15:15:41 +01:00
|
|
|
<CommonCheckbox v-model="homeFilter.bot" label="post by bot" />
|
|
|
|
<CommonCheckbox v-model="homeFilter.sensitive" label="post contains sensitive" />
|
|
|
|
<CommonCheckbox v-model="homeFilter.repost" label="post is a repost" />
|
|
|
|
<CommonCheckbox v-model="homeFilter.mutual" label="post is from a mutual" />
|
|
|
|
<CommonCheckbox v-model="homeFilter.tag" label="post is from a tag I follow" />
|
2023-04-01 14:49:25 +01:00
|
|
|
</template>
|
|
|
|
</VDropdown>
|
|
|
|
</template>
|