fix: remove flashing text on page reload (#1939)
This commit is contained in:
parent
13581323b0
commit
c71259334c
43 changed files with 88 additions and 61 deletions
|
@ -11,7 +11,7 @@ const paginator = account ? useMastoClient().v1.accounts.listFollowers(account.i
|
|||
const isSelf = useSelfAccount(account)
|
||||
|
||||
if (account) {
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('account.followers')} | ${getDisplayName(account)} (@${account.acct})`,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ const paginator = account ? useMastoClient().v1.accounts.listFollowing(account.i
|
|||
const isSelf = useSelfAccount(account)
|
||||
|
||||
if (account) {
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('account.following')} | ${getDisplayName(account)} (@${account.acct})`,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ function reorderAndFilter(items: mastodon.v1.Status[]) {
|
|||
const paginator = useMastoClient().v1.accounts.listStatuses(account.id, { limit: 30, excludeReplies: true })
|
||||
|
||||
if (account) {
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('account.posts')} | ${getDisplayName(account)} (@${account.acct})`,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ const account = await fetchAccountByHandle(handle)
|
|||
const paginator = useMastoClient().v1.accounts.listStatuses(account.id, { onlyMedia: true, excludeReplies: false })
|
||||
|
||||
if (account) {
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('tab.media')} | ${getDisplayName(account)} (@${account.acct})`,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ const account = await fetchAccountByHandle(handle)
|
|||
const paginator = useMastoClient().v1.accounts.listStatuses(account.id, { excludeReplies: false })
|
||||
|
||||
if (account) {
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('tab.posts_with_replies')} | ${getDisplayName(account)} (@${account.acct})`,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ const paginator = useMastoClient().v1.trends.listStatuses()
|
|||
|
||||
const hideNewsTips = useLocalStorage(STORAGE_KEY_HIDE_EXPLORE_POSTS_TIPS, false)
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('tab.posts')} | ${t('nav.explore')}`,
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -7,7 +7,7 @@ const paginator = useMastoClient().v1.trends.listLinks()
|
|||
|
||||
const hideNewsTips = useLocalStorage(STORAGE_KEY_HIDE_EXPLORE_NEWS_TIPS, false)
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('tab.news')} | ${t('nav.explore')}`,
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -10,7 +10,7 @@ const paginator = client.v1.trends.listTags({
|
|||
|
||||
const hideTagsTips = useLocalStorage(STORAGE_KEY_HIDE_EXPLORE_TAGS_TIPS, false)
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('tab.hashtags')} | ${t('nav.explore')}`,
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -4,7 +4,7 @@ const { t } = useI18n()
|
|||
// limit: 20 is the default configuration of the official client
|
||||
const paginator = useMastoClient().v2.suggestions.list({ limit: 20 })
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${t('tab.for_you')} | ${t('nav.explore')}`,
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -35,7 +35,7 @@ const { client } = $(useMasto())
|
|||
const { data: listInfo, refresh } = $(await useAsyncData(() => client.v1.lists.fetch(list), { default: () => shallowRef() }))
|
||||
|
||||
if (listInfo) {
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `${listInfo.title} | ${route.fullPath.endsWith('/accounts') ? t('tab.accounts') : t('tab.posts')} | ${t('nav.lists')}`,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ const client = useMastoClient()
|
|||
|
||||
const paginator = client.v1.lists.list()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => t('nav.lists'),
|
||||
})
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
const { t } = useI18n()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => t('title.federated_timeline'),
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const { t } = useI18n()
|
||||
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => t('title.local_timeline'),
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -13,7 +13,7 @@ const paginator = client.v1.timelines.listHashtag(tagName)
|
|||
const stream = useStreaming(client => client.v1.stream.streamTagTimeline(tagName))
|
||||
|
||||
if (tag) {
|
||||
useHead({
|
||||
useHydratedHead({
|
||||
title: () => `#${tag.name}`,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue