feat: explore tabs pages title (#419)
This commit is contained in:
parent
043bfea299
commit
efdab68053
|
@ -27,10 +27,6 @@ const tabs = $computed(() => [
|
||||||
: [],
|
: [],
|
||||||
),
|
),
|
||||||
] as const)
|
] as const)
|
||||||
|
|
||||||
useHeadFixed({
|
|
||||||
title: () => t('nav_side.explore'),
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { STORAGE_KEY_HIDE_EXPLORE_POSTS_TIPS } from '~~/constants'
|
import { STORAGE_KEY_HIDE_EXPLORE_POSTS_TIPS } from '~~/constants'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
const paginator = useMasto().trends.iterateStatuses()
|
const paginator = useMasto().trends.iterateStatuses()
|
||||||
|
|
||||||
const hideNewsTips = useLocalStorage(STORAGE_KEY_HIDE_EXPLORE_POSTS_TIPS, false)
|
const hideNewsTips = useLocalStorage(STORAGE_KEY_HIDE_EXPLORE_POSTS_TIPS, false)
|
||||||
|
|
||||||
|
useHeadFixed({
|
||||||
|
title: () => `${t('tab.posts')} | ${t('nav_side.explore')}`,
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -2,9 +2,16 @@
|
||||||
// @ts-expect-error missing types
|
// @ts-expect-error missing types
|
||||||
import { DynamicScrollerItem } from 'vue-virtual-scroller'
|
import { DynamicScrollerItem } from 'vue-virtual-scroller'
|
||||||
import { STORAGE_KEY_HIDE_EXPLORE_NEWS_TIPS } from '~~/constants'
|
import { STORAGE_KEY_HIDE_EXPLORE_NEWS_TIPS } from '~~/constants'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
const paginator = useMasto().trends.links
|
const paginator = useMasto().trends.links
|
||||||
|
|
||||||
const hideNewsTips = useLocalStorage(STORAGE_KEY_HIDE_EXPLORE_NEWS_TIPS, false)
|
const hideNewsTips = useLocalStorage(STORAGE_KEY_HIDE_EXPLORE_NEWS_TIPS, false)
|
||||||
|
|
||||||
|
useHeadFixed({
|
||||||
|
title: () => `${t('tab.news')} | ${t('nav_side.explore')}`,
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
import type { Tag } from 'masto'
|
import type { Tag } from 'masto'
|
||||||
import { STORAGE_KEY_HIDE_EXPLORE_TAGS_TIPS } from '~~/constants'
|
import { STORAGE_KEY_HIDE_EXPLORE_TAGS_TIPS } from '~~/constants'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
const { data, pending, error } = useLazyAsyncData(
|
const { data, pending, error } = useLazyAsyncData(
|
||||||
() => useMasto().trends.fetchTags({ limit: 20 }),
|
() => useMasto().trends.fetchTags({ limit: 20 }),
|
||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
|
@ -12,6 +14,10 @@ const hideTagsTips = useLocalStorage(STORAGE_KEY_HIDE_EXPLORE_TAGS_TIPS, false)
|
||||||
function getTagUrl(tag: Tag) {
|
function getTagUrl(tag: Tag) {
|
||||||
return new URL(tag.url).pathname
|
return new URL(tag.url).pathname
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useHeadFixed({
|
||||||
|
title: () => `${t('tab.hashtags')} | ${t('nav_side.explore')}`,
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
// limit: 20 is the default configuration of the official client
|
// limit: 20 is the default configuration of the official client
|
||||||
const { data, pending, error } = useLazyAsyncData(
|
const { data, pending, error } = useLazyAsyncData(
|
||||||
() => useMasto().suggestions.fetchAll({ limit: 20 }),
|
() => useMasto().suggestions.fetchAll({ limit: 20 }),
|
||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
)
|
)
|
||||||
|
|
||||||
|
useHeadFixed({
|
||||||
|
title: () => `${t('tab.for_you')} | ${t('nav_side.explore')}`,
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
Loading…
Reference in a new issue