chore: upgrade to nuxt v3.5 and vue v3.3 (#2132)

This commit is contained in:
Daniel Roe 2023-05-29 02:16:34 -05:00 committed by GitHub
parent ad0725e9ae
commit 897968027c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 2325 additions and 2062 deletions

View file

@ -3,6 +3,7 @@
import { DynamicScroller } from 'vue-virtual-scroller'
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
import type { Paginator, WsEvents } from 'masto'
import type { UnwrapRef } from 'vue'
const {
paginator,
@ -23,23 +24,23 @@ const {
}>()
defineSlots<{
default: {
default: (props: {
items: U[]
item: U
index: number
active?: boolean
older?: U
newer?: U // newer is undefined when index === 0
}
items: {
items: U[]
}
updater: {
older: U
newer: U // newer is undefined when index === 0
}) => void
items: (props: {
items: UnwrapRef<U[]>
}) => void
updater: (props: {
number: number
update: () => void
}
loading: {}
done: {}
}) => void
loading: (props: {}) => void
done: (props: {}) => void
}>()
const { t } = useI18n()
@ -83,25 +84,23 @@ defineExpose({ createEntry, removeEntry, updateEntry })
page-mode
>
<slot
:key="item[keyProp]"
:item="item"
:active="active"
:older="items[index + 1]"
:newer="items[index - 1]"
:older="items[index + 1] as U"
:newer="items[index - 1] as U"
:index="index"
:items="items"
:items="items as U[]"
/>
</DynamicScroller>
</template>
<template v-else>
<slot
v-for="item, index of items"
:key="(item as any)[keyProp]"
:item="item"
:older="items[index + 1]"
:newer="items[index - 1]"
:item="item as U"
:older="items[index + 1] as U"
:newer="items[index - 1] as U"
:index="index"
:items="items"
:items="items as U[]"
/>
</template>
</slot>

View file

@ -10,8 +10,8 @@ const props = withDefaults(defineProps<{
})
defineSlots<{
icon: {}
default: {}
icon: (props: {}) => void
default: (props: {}) => void
}>()
const router = useRouter()

View file

@ -10,7 +10,7 @@ defineProps<{
defineEmits(['hide', 'subscribe'])
defineSlots<{
error: {}
error: (props: {}) => void
}>()
const xl = useMediaQuery('(min-width: 1280px)')

View file

@ -155,14 +155,14 @@ const { clearNotifications } = useNotifications()
const { formatNumber } = useHumanReadableNumber()
</script>
<!-- eslint-disable vue/attribute-hyphenation -->
<template>
<CommonPaginator
:paginator="paginator"
:preprocess="preprocess"
:stream="stream"
:eager="3"
:virtual-scroller="virtualScroller"
event-type="notification"
:virtualScroller="virtualScroller"
eventType="notification"
>
<template #updater="{ number, update }">
<button py-4 border="b base" flex="~ col" p-3 w-full text-primary font-bold @click="() => { update(); clearNotifications() }">

View file

@ -18,7 +18,7 @@ defineOptions({
})
defineSlots<{
text: {}
text: (props: {}) => void
}>()
const el = ref<HTMLDivElement>()

View file

@ -36,7 +36,7 @@ const vnode = $computed(() => {
class="content-rich line-compact" dir="auto"
:lang="('language' in status && status.language) || undefined"
>
<component :is="vnode" />
<component :is="vnode" v-if="vnode" />
</span>
<div v-else />
<template v-if="translation.visible">