feat: filter for home timeline

This commit is contained in:
Shinigami92 2023-04-01 15:49:25 +02:00
parent ab2881b9a2
commit 149e9847b1
2 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,25 @@
<script setup lang="ts">
const filter = ref({
bot: true,
sensitive: true,
repost: true,
mutual: true,
tag: true,
})
</script>
<template>
<VDropdown>
<button btn-text>
<div i-ri:filter-2-line />
</button>
<template #popper>
<CommonCheckbox v-model="filter.bot" label="post by bot" />
<CommonCheckbox v-model="filter.sensitive" label="post contains sensitive" />
<CommonCheckbox v-model="filter.repost" label="post is a repost" />
<CommonCheckbox v-model="filter.mutual" label="post is from a mutual" />
<CommonCheckbox v-model="filter.tag" label="post is from a tag I follow" />
</template>
</VDropdown>
</template>

View file

@ -26,6 +26,10 @@ useHead({
</NuxtLink> </NuxtLink>
</template> </template>
<template #actions>
<TimelineHomeFilter />
</template>
<TimelineHome v-if="isHydrated" /> <TimelineHome v-if="isHydrated" />
</MainContent> </MainContent>
</template> </template>