refactor!: 升级 @nuxt/ui@3,重构所有页面和组件,调整配置,移除不在需求中的页面

This commit is contained in:
2026-02-10 18:07:44 +08:00
parent d0bca215c1
commit 75f1987be3
49 changed files with 4892 additions and 6599 deletions

View File

@@ -4,7 +4,7 @@ import ModalAuthentication from '~/components/ModalAuthentication.vue'
const toast = useToast()
const route = useRoute()
const router = useRouter()
const modal = useModal()
const overlay = useOverlay()
const loginState = useLoginState()
useHead({
@@ -24,10 +24,11 @@ onMounted(() => {
toast.add({
title: '登录失效',
description: '登录已过期,请重新登录',
color: 'red',
color: 'error',
icon: 'i-tabler-alert-triangle',
})
modal.open(ModalAuthentication)
const modal = overlay.create(ModalAuthentication)
modal.open()
} else if (!loggedIn && !loginState.token) {
// Prevents redirect from register page
if (route.path === '/user/register') return
@@ -41,12 +42,10 @@ onMounted(() => {
<div>
<NuxtLoadingIndicator />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
<UModals />
<USlideovers />
<UNotifications />
<UApp>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</UApp>
</div>
</template>