feat: bump to latest vue 3.4.19 (#2607)

Co-authored-by: patak <matias.capeletto@gmail.com>
This commit is contained in:
Joaquín Sánchez 2024-02-24 13:24:21 +01:00 committed by GitHub
parent 81ef8ff9aa
commit 36004a7eba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 601 additions and 451 deletions

View file

@ -11,7 +11,7 @@ definePageMeta({
})
const route = useRoute()
const id = computedEager(() => route.params.status as string)
const id = computed(() => route.params.status as string)
const main = ref<ComponentPublicInstance | null>(null)
const { data: status, pending, refresh: refreshStatus } = useAsyncData(
@ -71,7 +71,7 @@ onReactivated(() => {
<div xl:mt-4 mb="50vh" border="b base">
<template v-if="!pendingContext">
<StatusCard
v-for="comment, i of context?.ancestors" :key="comment.id"
v-for="(comment, i) of context?.ancestors" :key="comment.id"
:status="comment" :actions="comment.visibility !== 'direct'" context="account"
:has-older="true" :newer="context?.ancestors[i - 1]"
/>

View file

@ -4,7 +4,7 @@ definePageMeta({
})
const params = useRoute().params
const accountName = computedEager(() => toShortHandle(params.account as string))
const accountName = computed(() => toShortHandle(params.account as string))
const { t } = useI18n()

View file

@ -1,7 +1,7 @@
<script setup lang="ts">
const { t } = useI18n()
const params = useRoute().params
const handle = computedEager(() => params.account as string)
const handle = computed(() => params.account as string)
definePageMeta({ name: 'account-followers' })

View file

@ -1,7 +1,7 @@
<script setup lang="ts">
const { t } = useI18n()
const params = useRoute().params
const handle = computedEager(() => params.account as string)
const handle = computed(() => params.account as string)
definePageMeta({ name: 'account-following' })

View file

@ -2,7 +2,7 @@
import type { mastodon } from 'masto'
const params = useRoute().params
const handle = computedEager(() => params.account as string)
const handle = computed(() => params.account as string)
definePageMeta({ name: 'account-index' })

View file

@ -3,7 +3,7 @@ definePageMeta({ name: 'account-media' })
const { t } = useI18n()
const params = useRoute().params
const handle = computedEager(() => params.account as string)
const handle = computed(() => params.account as string)
const account = await fetchAccountByHandle(handle.value)

View file

@ -3,7 +3,7 @@ definePageMeta({ name: 'account-replies' })
const { t } = useI18n()
const params = useRoute().params
const handle = computedEager(() => params.account as string)
const handle = computed(() => params.account as string)
const account = await fetchAccountByHandle(handle.value)

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import type { CommonRouteTabOption } from '~/components/common/CommonRouteTabs.vue'
import type { CommonRouteTabOption } from '~/types'
const { t } = useI18n()

View file

@ -17,5 +17,5 @@ useHydratedHead({
<p>{{ $t('tooltip.explore_posts_intro') }}</p>
</CommonAlert>
<!-- TODO: Tabs for trending statuses, tags, and links -->
<TimelinePaginator :paginator="paginator" context="public" />
<TimelinePaginator v-if="isHydrated" :paginator="paginator" context="public" />
</template>

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import type { CommonRouteTabOption } from '~/components/common/CommonRouteTabs.vue'
import type { CommonRouteTabOption } from '~/types'
definePageMeta({
middleware: 'auth',

View file

@ -4,7 +4,7 @@ definePageMeta({
})
const params = useRoute().params
const listId = computedEager(() => params.list as string)
const listId = computed(() => params.list as string)
const paginator = useMastoClient().v1.lists.$select(listId.value).accounts.list()
</script>

View file

@ -4,7 +4,7 @@ definePageMeta({
})
const params = useRoute().params
const listId = computedEager(() => params.list as string)
const listId = computed(() => params.list as string)
const client = useMastoClient()

View file

@ -1,6 +1,4 @@
<script setup lang="ts">
const { t } = useI18n()
useHydratedHead({
@ -13,7 +11,7 @@ useHydratedHead({
<template #title>
<NuxtLink to="/public" timeline-title-style flex items-center gap-2 @click="$scrollToTop">
<div i-ri:earth-line />
<span>{{ t('title.federated_timeline') }}</span>
<span>{{ $t('title.federated_timeline') }}</span>
</NuxtLink>
</template>

View file

@ -1,6 +1,4 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
useHydratedHead({
title: () => t('nav.search'),

View file

@ -4,7 +4,7 @@ definePageMeta({
})
const params = useRoute().params
const tagName = computedEager(() => params.tag as string)
const tagName = computed(() => params.tag as string)
const { client } = useMasto()
const { data: tag, refresh } = await useAsyncData(() => client.value.v1.tags.$select(tagName.value).fetch(), { default: () => shallowRef() })

View file

@ -1,6 +1,4 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
definePageMeta({
middleware: 'auth',
alias: ['/signin/callback'],

View file

@ -1,10 +1,7 @@
<script setup lang="ts">
import type { mastodon } from 'masto'
import { NOTIFICATION_FILTER_TYPES } from '~/constants'
import type {
CommonRouteTabMoreOption,
CommonRouteTabOption,
} from '~/components/common/CommonRouteTabs.vue'
import type { CommonRouteTabMoreOption, CommonRouteTabOption } from '~/types'
definePageMeta({
middleware: 'auth',
@ -18,12 +15,12 @@ const tabs = computed<CommonRouteTabOption[]>(() => [
{
name: 'all',
to: '/notifications',
display: isHydrated.value ? t('tab.notifications_all') : '',
display: t('tab.notifications_all'),
},
{
name: 'mention',
to: '/notifications/mention',
display: isHydrated.value ? t('tab.notifications_mention') : '',
display: t('tab.notifications_mention'),
},
])
@ -50,13 +47,12 @@ const filterIconMap: Record<mastodon.v1.NotificationType, string> = {
'admin.report': 'i-ri:flag-line',
}
const filterText = computed(() => (`${t('tab.notifications_more_tooltip')}${filter ? `: ${t(`tab.notifications_${filter}`)}` : ''}`))
const filterText = computed(() => `${t('tab.notifications_more_tooltip')}${filter.value ? `: ${t(`tab.notifications_${filter.value}`)}` : ''}`)
const notificationFilterRoutes = computed<CommonRouteTabOption[]>(() => NOTIFICATION_FILTER_TYPES.map(
name => ({
name,
to: `/notifications/${name}`,
display: isHydrated.value ? t(`tab.notifications_${name}`) : '',
display: t(`tab.notifications_${name}`),
icon: filterIconMap[name],
match: name === filter.value,
}),
@ -74,7 +70,7 @@ const moreOptions = computed<CommonRouteTabMoreOption>(() => ({
<template #title>
<NuxtLink to="/notifications" timeline-title-style flex items-center gap-2 @click="$scrollToTop">
<div i-ri:notification-4-line />
<span>{{ isHydrated ? t('nav.notifications') : '' }}</span>
<span>{{ t('nav.notifications') }}</span>
</NuxtLink>
</template>
@ -82,7 +78,7 @@ const moreOptions = computed<CommonRouteTabMoreOption>(() => ({
<NuxtLink
flex rounded-4 p1
hover:bg-active cursor-pointer transition-100
:title="isHydrated ? t('settings.notifications.show_btn') : ''"
:title="t('settings.notifications.show_btn')"
to="/settings/notifications"
>
<span aria-hidden="true" i-ri:notification-badge-line />

View file

@ -1,5 +1,6 @@
<script setup lang="ts">
const { t } = useI18n()
useHydratedHead({
title: () => `${t('tab.notifications_all')} | ${t('nav.notifications')}`,
})

View file

@ -11,7 +11,7 @@ useHydratedHead({
const route = useRoute()
const isRootPath = computedEager(() => route.name === 'settings')
const isRootPath = computed(() => route.name === 'settings')
</script>
<template>
@ -22,12 +22,12 @@ const isRootPath = computedEager(() => route.name === 'settings')
<template #title>
<div timeline-title-style flex items-center gap-2 @click="$scrollToTop">
<div i-ri:settings-3-line />
<span>{{ isHydrated ? $t('nav.settings') : '' }}</span>
<span>{{ $t('nav.settings') }}</span>
</div>
</template>
<div xl:w-97 lg:w-78 w-full>
<SettingsItem
v-if="isHydrated && currentUser"
v-if="currentUser"
command
icon="i-ri:user-line"
:text="$t('settings.profile.label')"
@ -37,12 +37,12 @@ const isRootPath = computedEager(() => route.name === 'settings')
<SettingsItem
command
icon="i-ri-compasses-2-line"
:text="isHydrated ? $t('settings.interface.label') : ''"
:text="$t('settings.interface.label')"
to="/settings/interface"
:match="$route.path.startsWith('/settings/interface/')"
/>
<SettingsItem
v-if="isHydrated && currentUser"
v-if="currentUser"
command
icon="i-ri:notification-badge-line"
:text="$t('settings.notifications_settings')"
@ -52,28 +52,28 @@ const isRootPath = computedEager(() => route.name === 'settings')
<SettingsItem
command
icon="i-ri-globe-line"
:text="isHydrated ? $t('settings.language.label') : ''"
:text="$t('settings.language.label')"
to="/settings/language"
:match="$route.path.startsWith('/settings/language/')"
/>
<SettingsItem
command
icon="i-ri-equalizer-line"
:text="isHydrated ? $t('settings.preferences.label') : ''"
:text="$t('settings.preferences.label')"
to="/settings/preferences"
:match="$route.path.startsWith('/settings/preferences/')"
/>
<SettingsItem
command
icon="i-ri-group-line"
:text="isHydrated ? $t('settings.users.label') : ''"
:text="$t('settings.users.label')"
to="/settings/users"
:match="$route.path.startsWith('/settings/users/')"
/>
<SettingsItem
command
icon="i-ri:information-line"
:text="isHydrated ? $t('settings.about.label') : ''"
:text="$t('settings.about.label')"
to="/settings/about"
:match="$route.path.startsWith('/settings/about/')"
/>

View file

@ -15,20 +15,20 @@ useHydratedHead({
<MainContent back-on-small-screen>
<template #title>
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
<span>{{ isHydrated ? $t('settings.notifications.label') : '' }}</span>
<span>{{ $t('settings.notifications.label') }}</span>
</div>
</template>
<SettingsItem
command
:text="isHydrated ? $t('settings.notifications.notifications.label') : ''"
:text="$t('settings.notifications.notifications.label')"
to="/settings/notifications/notifications"
/>
<SettingsItem
command
:disabled="!pwaEnabled"
:text="isHydrated ? $t('settings.notifications.push_notifications.label') : ''"
:description="isHydrated ? $t('settings.notifications.push_notifications.description') : ''"
:text="$t('settings.notifications.push_notifications.label')"
:description="$t('settings.notifications.push_notifications.description')"
to="/settings/notifications/push-notifications"
/>
</MainContent>

View file

@ -17,7 +17,7 @@ useHydratedHead({
<MainContent back>
<template #title>
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
<span>{{ isHydrated ? $t('settings.notifications.push_notifications.label') : '' }}</span>
<span>{{ $t('settings.notifications.push_notifications.label') }}</span>
</div>
</template>
<NotificationPreferences show />

View file

@ -111,7 +111,7 @@ onReactivated(refreshInfo)
</template>
<form space-y-5 @submit.prevent="submit">
<div v-if="isHydrated && account">
<div v-if="account">
<!-- banner -->
<div of-hidden bg="gray-500/20" aspect="3">
<CommonInputImage
@ -182,7 +182,7 @@ onReactivated(refreshInfo)
<!-- metadata -->
<SettingsProfileMetadata v-if="isHydrated" v-model="form" />
<SettingsProfileMetadata v-model="form" />
<!-- actions -->
<div flex="~ gap2" justify-end>

View file

@ -14,22 +14,22 @@ useHydratedHead({
<MainContent back-on-small-screen>
<template #title>
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
<span>{{ isHydrated ? $t('settings.profile.label') : '' }}</span>
<span>{{ $t('settings.profile.label') }}</span>
</div>
</template>
<SettingsItem
command large
icon="i-ri:user-settings-line"
:text="isHydrated ? $t('settings.profile.appearance.label') : ''"
:description="isHydrated ? $t('settings.profile.appearance.description') : ''"
:text="$t('settings.profile.appearance.label')"
:description="$t('settings.profile.appearance.description')"
to="/settings/profile/appearance"
/>
<SettingsItem
command large
icon="i-ri:hashtag"
:text="isHydrated ? $t('settings.profile.featured_tags.label') : ''"
:description="isHydrated ? $t('settings.profile.featured_tags.description') : ''"
:text="$t('settings.profile.featured_tags.label')"
:description="$t('settings.profile.featured_tags.description')"
to="/settings/profile/featured-tags"
/>
<SettingsItem

View file

@ -81,12 +81,12 @@ async function importTokens() {
</div>
<div my4 border="t base" />
<button btn-text flex="~ gap-2" items-center @click="exportTokens">
<div i-ri-download-2-line />
<span block i-ri-download-2-line />
{{ $t('settings.users.export') }}
</button>
</template>
<button btn-text flex="~ gap-2" items-center @click="importTokens">
<div i-ri-upload-2-line />
<span block i-ri-upload-2-line />
{{ $t('settings.users.import') }}
</button>
</div>