1
0
mirror of https://github.com/elk-zone/elk synced 2024-12-01 00:08:11 +09:00
elk/pages/[[server]]/explore/users.vue

39 lines
1.1 KiB
Vue
Raw Permalink Normal View History

2022-12-11 19:52:36 +09:00
<script lang="ts" setup>
import { STORAGE_KEY_LAST_ACCESSED_EXPLORE_ROUTE } from '~/constants'
2022-12-14 03:44:40 +09:00
const { t } = useI18n()
const route = useRoute()
2022-12-14 03:44:40 +09:00
2022-12-11 19:52:36 +09:00
// limit: 20 is the default configuration of the official client
2023-01-15 17:38:02 +09:00
const paginator = useMastoClient().v2.suggestions.list({ limit: 20 })
2022-12-14 03:44:40 +09:00
useHydratedHead({
title: () => `${t('tab.for_you')} | ${t('nav.explore')}`,
2022-12-14 03:44:40 +09: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 19:52:36 +09:00
</script>
<template>
2023-01-08 17:27:38 +09: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 19:52:36 +09:00
</template>