mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 04:22:28 +02:00
add page not found catch all
This commit is contained in:
parent
91c1eeb9c4
commit
40faf6717f
2 changed files with 43 additions and 0 deletions
38
next-ui/src/pages/[...path].vue
Normal file
38
next-ui/src/pages/[...path].vue
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<template>
|
||||
<v-empty-state
|
||||
icon="i-mdi:help-circle"
|
||||
color="warning"
|
||||
:title="
|
||||
$formatMessage({
|
||||
description: 'Page not found view: error message title',
|
||||
defaultMessage: 'Page not found',
|
||||
id: '6WDISV',
|
||||
})
|
||||
"
|
||||
:text="
|
||||
$formatMessage({
|
||||
description: 'Page not found view: error message subtitle',
|
||||
defaultMessage: 'You will be redirected to the home page',
|
||||
id: '5b2A0u',
|
||||
})
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useCountdown } from '@vueuse/core'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
useCountdown(5, {
|
||||
onComplete() {
|
||||
void router.push('/')
|
||||
},
|
||||
}).start()
|
||||
</script>
|
||||
|
||||
<route lang="yaml">
|
||||
meta:
|
||||
layout: single
|
||||
noAuth: true
|
||||
</route>
|
||||
5
next-ui/src/typed-router.d.ts
vendored
5
next-ui/src/typed-router.d.ts
vendored
|
|
@ -19,6 +19,7 @@ declare module 'vue-router/auto-routes' {
|
|||
*/
|
||||
export interface RouteNamedMap {
|
||||
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
|
||||
'/[...path]': RouteRecordInfo<'/[...path]', '/:path(.*)', { path: ParamValue<true> }, { path: ParamValue<false> }>,
|
||||
'/account/activity': RouteRecordInfo<'/account/activity', '/account/activity', Record<never, never>, Record<never, never>>,
|
||||
'/account/api-keys': RouteRecordInfo<'/account/api-keys', '/account/api-keys', Record<never, never>, Record<never, never>>,
|
||||
'/account/details': RouteRecordInfo<'/account/details', '/account/details', Record<never, never>, Record<never, never>>,
|
||||
|
|
@ -58,6 +59,10 @@ declare module 'vue-router/auto-routes' {
|
|||
routes: '/'
|
||||
views: never
|
||||
}
|
||||
'src/pages/[...path].vue': {
|
||||
routes: '/[...path]'
|
||||
views: never
|
||||
}
|
||||
'src/pages/account/activity.vue': {
|
||||
routes: '/account/activity'
|
||||
views: never
|
||||
|
|
|
|||
Loading…
Reference in a new issue