chore(deps): upgrade nuxt

This commit is contained in:
Kevin 2023-03-21 12:20:36 +08:00
parent 0dbea5915f
commit 5717e5e677
No known key found for this signature in database
GPG key ID: 68D73816CD641CDB
6 changed files with 1034 additions and 999 deletions

View file

@ -1,7 +1,7 @@
<script setup lang="ts">
const buildInfo = useBuildInfo()
const timeAgoOptions = useTimeAgoOptions()
const config = useRuntimeConfig()
const userSettings = useUserSettings()
const buildTimeDate = new Date(buildInfo.time)
@ -73,9 +73,9 @@ function toggleDark() {
<NuxtLink cursor-pointer hover:underline to="/settings/about">
{{ $t('settings.about.label') }}
</NuxtLink>
<template v-if="$config.public.privacyPolicyUrl">
<template v-if="config.public.privacyPolicyUrl">
&middot;
<NuxtLink cursor-pointer hover:underline :to="$config.public.privacyPolicyUrl">
<NuxtLink cursor-pointer hover:underline :to="config.public.privacyPolicyUrl">
{{ $t('nav.privacy') }}
</NuxtLink>
</template>

View file

@ -1,8 +1,7 @@
import type { ComponentInternalInstance } from 'vue'
import { onActivated, onDeactivated, ref } from 'vue'
import type { ActiveHeadEntry, HeadEntryOptions, UseHeadInput } from '@vueuse/head'
import type { HeadAugmentations } from '@nuxt/schema'
import { useHead } from '#head'
import type { SchemaAugmentations } from '@unhead/schema'
export const isHydrated = ref(false)
@ -39,7 +38,7 @@ export function onReactivated(hook: Function, target?: ComponentInternalInstance
}
// TODO: Workaround for Nuxt bug: https://github.com/elk-zone/elk/pull/199#issuecomment-1329771961
export function useHeadFixed<T extends HeadAugmentations>(input: UseHeadInput<T>, options?: HeadEntryOptions): ActiveHeadEntry<UseHeadInput<T>> | void {
export function useHeadFixed<T extends SchemaAugmentations>(input: UseHeadInput<T>, options?: HeadEntryOptions): ActiveHeadEntry<UseHeadInput<T>> | void {
const deactivated = useDeactivated()
if (input && typeof input === 'object' && !('value' in input)) {
const title = 'title' in input ? input.title : undefined

View file

@ -10,6 +10,6 @@
},
"devDependencies": {
"@nuxt-themes/docus": "^1.8.1",
"nuxt": "^3.2.0"
"nuxt": "^3.3.1"
}
}

View file

@ -33,7 +33,7 @@
"@iconify-emoji/twemoji": "^1.0.2",
"@iconify/json": "^2.2.37",
"@iconify/utils": "^2.0.12",
"@nuxt/devtools": "^0.1.4",
"@nuxt/devtools": "^0.2.5",
"@nuxtjs/color-mode": "^3.2.0",
"@nuxtjs/i18n": "8.0.0-beta.9",
"@pinia/nuxt": "^0.4.6",
@ -116,7 +116,7 @@
"flat": "^5.0.2",
"fs-extra": "^11.1.0",
"lint-staged": "^13.1.0",
"nuxt": "3.2.0",
"nuxt": "3.3.1",
"prettier": "^2.8.4",
"simple-git-hooks": "^2.8.1",
"typescript": "^4.9.5",

View file

@ -18,7 +18,7 @@ export default defineNuxtPlugin(({ $scrollToTop }) => {
const navigateTo = (to: string | RouteLocationRaw) => {
closeKeyboardShortcuts()
$scrollToTop() // is this really required?
;($scrollToTop as () => void)() // is this really required?
router.push(to)
}

File diff suppressed because it is too large Load diff