2024-09-07 10:38:18 +03:00
|
|
|
<script setup lang="ts">
|
2024-03-07 17:33:25 +03:00
|
|
|
import { STORAGE_KEY_LAST_ACCESSED_EXPLORE_ROUTE } from '~/constants'
|
|
|
|
|
2022-12-13 21:44:40 +03:00
|
|
|
const { t } = useI18n()
|
2024-03-07 17:33:25 +03:00
|
|
|
const route = useRoute()
|
2022-12-13 21:44:40 +03:00
|
|
|
|
2022-12-11 13:52:36 +03:00
|
|
|
// limit: 20 is the default configuration of the official client
|
2023-01-15 11:38:02 +03:00
|
|
|
const paginator = useMastoClient().v2.suggestions.list({ limit: 20 })
|
2022-12-13 21:44:40 +03:00
|
|
|
|
2023-04-16 22:33:51 +03:00
|
|
|
useHydratedHead({
|
2023-01-12 02:08:31 +03:00
|
|
|
title: () => `${t('tab.for_you')} | ${t('nav.explore')}`,
|
2022-12-13 21:44:40 +03:00
|
|
|
})
|
2024-03-07 17:33:25 +03:00
|
|
|
|
|
|
|
const lastAccessedExploreRoute = useLocalStorage(STORAGE_KEY_LAST_ACCESSED_EXPLORE_ROUTE, '')
|
|
|
|
lastAccessedExploreRoute.value = route.path.replace(/(.*\/explore\/?)/, '')
|
|
|
|
|
|
|
|
onActivated(() => {
|
|
|
|
lastAccessedExploreRoute.value = route.path.replace(/(.*\/explore\/?)/, '')
|
|
|
|
})
|
2022-12-11 13:52:36 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-01-08 11:27:38 +03:00
|
|
|
<CommonPaginator :paginator="paginator" key-prop="account">
|
|
|
|
<template #default="{ item }">
|
|
|
|
<AccountBigCard
|
|
|
|
:account="item.account"
|
|
|
|
as="router-link"
|
|
|
|
:to="getAccountRoute(item.account)"
|
|
|
|
border="b base"
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
<template #loading>
|
|
|
|
<AccountBigCardSkeleton border="b base" />
|
|
|
|
<AccountBigCardSkeleton border="b base" op50 />
|
|
|
|
<AccountBigCardSkeleton border="b base" op25 />
|
|
|
|
</template>
|
|
|
|
</CommonPaginator>
|
2022-12-11 13:52:36 +03:00
|
|
|
</template>
|