mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-20 07:49:57 +00:00
25 lines
722 B
Vue
25 lines
722 B
Vue
<script setup lang="ts">
|
|
import type { Paginator, mastodon } from 'masto'
|
|
|
|
const { paginator } = defineProps<{
|
|
paginator: Paginator<mastodon.v1.Conversation[], mastodon.DefaultPaginationParams>
|
|
}>()
|
|
|
|
function preprocess(items: mastodon.v1.Conversation[]): mastodon.v1.Conversation[] {
|
|
return items.filter(items => !items.lastStatus?.filtered?.find(
|
|
filter => filter.filter.filterAction === 'hide' && filter.filter.context.includes('thread'),
|
|
))
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<CommonPaginator :paginator="paginator" :preprocess="preprocess">
|
|
<template #default="{ item }">
|
|
<ConversationCard
|
|
:conversation="item"
|
|
border="b base" py-1
|
|
/>
|
|
</template>
|
|
</CommonPaginator>
|
|
</template>
|