elk/components/timeline/TimelineHomeFilter.vue

28 lines
972 B
Vue
Raw Normal View History

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-02 14:54:19 +01:00
<div :class="isActive ? 'i-ri:filter-2-fill' : 'i-ri:filter-2-line'" />
2023-04-01 14:49:25 +01:00
</button>
<template #popper>
2023-04-02 15:01:11 +01:00
<CommonCheckbox v-model="homeFilter.bot" :label="$t('timeline.filter.include_bot')" />
<CommonCheckbox v-model="homeFilter.sensitive" :label="$t('timeline.filter.include_sensitive')" />
<CommonCheckbox v-model="homeFilter.repost" :label="$t('timeline.filter.include_repost')" />
<CommonCheckbox v-model="homeFilter.mutual" :label="$t('timeline.filter.include_mutual')" />
<CommonCheckbox v-model="homeFilter.tag" :label="$t('timeline.filter.include_tag')" />
2023-04-01 14:49:25 +01:00
</template>
</VDropdown>
</template>