kopia lustrzana https://github.com/elk-zone/elk
				
				
				
			feat: add title for pages
							rodzic
							
								
									dfdf95da61
								
							
						
					
					
						commit
						f54e135848
					
				
							
								
								
									
										2
									
								
								app.vue
								
								
								
								
							
							
						
						
									
										2
									
								
								app.vue
								
								
								
								
							| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
import { APP_NAME } from './constants'
 | 
			
		||||
 | 
			
		||||
useHead({
 | 
			
		||||
  title: APP_NAME,
 | 
			
		||||
  titleTemplate: title => `${title ? `${title} | ` : ''}${APP_NAME}${import.meta.env.DEV ? ' (dev)' : ''}`,
 | 
			
		||||
  link: [
 | 
			
		||||
    {
 | 
			
		||||
      rel: 'icon', type: 'image/svg+png', href: '/favicon.png',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,12 @@ const params = useRoute().params
 | 
			
		|||
const accountName = $computed(() => params.account as string)
 | 
			
		||||
 | 
			
		||||
const account = await fetchAccountByName(accountName).catch(() => null)
 | 
			
		||||
 | 
			
		||||
if (account) {
 | 
			
		||||
  useHead({
 | 
			
		||||
    title: `${account.displayName} (@${account.acct})`,
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,10 @@ definePageMeta({
 | 
			
		|||
})
 | 
			
		||||
 | 
			
		||||
const paginator = masto.bookmarks.getIterator()
 | 
			
		||||
 | 
			
		||||
useHead({
 | 
			
		||||
  title: 'Bookmarks',
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,10 @@ definePageMeta({
 | 
			
		|||
})
 | 
			
		||||
 | 
			
		||||
const paginator = masto.conversations.getIterator()
 | 
			
		||||
 | 
			
		||||
useHead({
 | 
			
		||||
  title: 'Conversations',
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,9 @@
 | 
			
		|||
<script setup lang="ts">
 | 
			
		||||
const paginator = masto.trends.getStatuses()
 | 
			
		||||
 | 
			
		||||
useHead({
 | 
			
		||||
  title: 'Explore',
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,10 @@ definePageMeta({
 | 
			
		|||
})
 | 
			
		||||
 | 
			
		||||
const paginator = masto.favourites.getIterator()
 | 
			
		||||
 | 
			
		||||
useHead({
 | 
			
		||||
  title: 'Favourites',
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,6 +11,10 @@ const tab = $(useLocalStorage<typeof tabNames[number]>(STORAGE_KEY_NOTIFY_TAB, '
 | 
			
		|||
const paginator = $computed(() => {
 | 
			
		||||
  return masto.notifications.getIterator(tab === 'All' ? undefined : { types: ['mention'] })
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
useHead({
 | 
			
		||||
  title: 'Notifications',
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,9 @@
 | 
			
		|||
<script setup lang="ts">
 | 
			
		||||
 | 
			
		||||
const paginator = masto.timelines.getPublicIterable()
 | 
			
		||||
 | 
			
		||||
useHead({
 | 
			
		||||
  title: 'Federated'
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,9 @@
 | 
			
		|||
<script setup lang="ts">
 | 
			
		||||
const { data: timelines } = await useAsyncData('timelines-home', () => masto.timelines.fetchPublic({ local: true }).then(r => r.value))
 | 
			
		||||
 | 
			
		||||
useHead({
 | 
			
		||||
  title: 'Local'
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,10 @@ const params = useRoute().params
 | 
			
		|||
const tag = $computed(() => params.tag as string)
 | 
			
		||||
 | 
			
		||||
const paginator = masto.timelines.getHashtagIterable(tag)
 | 
			
		||||
 | 
			
		||||
useHead({
 | 
			
		||||
  title: `#${tag}`,
 | 
			
		||||
})
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue