fix router warnings

This commit is contained in:
Henry Jameson 2026-07-30 15:03:07 +03:00
commit 70aac04d93

View file

@ -1,5 +1,3 @@
import { defineAsyncComponent } from 'vue'
import AuthForm from 'src/components/auth_form/auth_form.js' import AuthForm from 'src/components/auth_form/auth_form.js'
import BookmarkTimeline from 'src/components/bookmark_timeline/bookmark_timeline.vue' import BookmarkTimeline from 'src/components/bookmark_timeline/bookmark_timeline.vue'
import BubbleTimeline from 'src/components/bubble_timeline/bubble_timeline.vue' import BubbleTimeline from 'src/components/bubble_timeline/bubble_timeline.vue'
@ -68,9 +66,7 @@ export default (store) => {
{ {
name: 'conversation2', name: 'conversation2',
path: '/conversation/:statusId', path: '/conversation/:statusId',
component: defineAsyncComponent( component: () => import('src/components/chat_view/chat_view.vue'),
() => import('src/components/chat_view/chat_view.vue'),
),
props: true, props: true,
meta: { dontScroll: true }, meta: { dontScroll: true },
beforeEnter: validateAuthenticatedRoute, beforeEnter: validateAuthenticatedRoute,
@ -91,23 +87,18 @@ export default (store) => {
{ {
name: 'external-user-profile', name: 'external-user-profile',
path: '/users/$:id', path: '/users/$:id',
component: defineAsyncComponent( component: () => import('src/components/user_profile/user_profile.vue'),
() => import('src/components/user_profile/user_profile.vue'),
),
}, },
{ {
name: 'user-profile-admin-view', name: 'user-profile-admin-view',
path: '/users/$:id/admin_view', path: '/users/$:id/admin_view',
component: defineAsyncComponent( component: () =>
() => import('src/components/user_profile/user_profile_admin_view.vue'), import('src/components/user_profile/user_profile_admin_view.vue'),
),
}, },
{ {
name: 'interactions', name: 'interactions',
path: '/users/:username/interactions', path: '/users/:username/interactions',
component: defineAsyncComponent( component: () => import('src/components/interactions/interactions.vue'),
() => import('src/components/interactions/interactions.vue'),
),
beforeEnter: validateAuthenticatedRoute, beforeEnter: validateAuthenticatedRoute,
}, },
{ {
@ -119,39 +110,31 @@ export default (store) => {
{ {
name: 'registration', name: 'registration',
path: '/registration', path: '/registration',
component: defineAsyncComponent( component: () => import('src/components/registration/registration.vue'),
() => import('src/components/registration/registration.vue'),
),
}, },
{ {
name: 'password-reset', name: 'password-reset',
path: '/password-reset', path: '/password-reset',
component: defineAsyncComponent( component: () =>
() => import('src/components/password_reset/password_reset.vue'), import('src/components/password_reset/password_reset.vue'),
),
props: true, props: true,
}, },
{ {
name: 'registration-token', name: 'registration-token',
path: '/registration/:token', path: '/registration/:token',
component: defineAsyncComponent( component: () => import('src/components/registration/registration.vue'),
() => import('src/components/registration/registration.vue'),
),
}, },
{ {
name: 'friend-requests', name: 'friend-requests',
path: '/friend-requests', path: '/friend-requests',
component: defineAsyncComponent( component: () =>
() => import('src/components/follow_requests/follow_requests.vue'), import('src/components/follow_requests/follow_requests.vue'),
),
beforeEnter: validateAuthenticatedRoute, beforeEnter: validateAuthenticatedRoute,
}, },
{ {
name: 'notifications', name: 'notifications',
path: '/:username/notifications', path: '/:username/notifications',
component: defineAsyncComponent( component: () => import('src/components/notifications/notifications.vue'),
() => import('src/components/notifications/notifications.vue'),
),
props: () => ({ disableTeleport: true }), props: () => ({ disableTeleport: true }),
beforeEnter: validateAuthenticatedRoute, beforeEnter: validateAuthenticatedRoute,
}, },
@ -163,98 +146,74 @@ export default (store) => {
{ {
name: 'shout-panel', name: 'shout-panel',
path: '/shout-panel', path: '/shout-panel',
component: defineAsyncComponent( component: () => import('src/components/shout_panel/shout_panel.vue'),
() => import('src/components/shout_panel/shout_panel.vue'),
),
props: () => ({ floating: false }), props: () => ({ floating: false }),
}, },
{ {
name: 'oauth-callback', name: 'oauth-callback',
path: '/oauth-callback', path: '/oauth-callback',
component: defineAsyncComponent( component: () =>
() => import('src/components/oauth_callback/oauth_callback.vue'), import('src/components/oauth_callback/oauth_callback.vue'),
),
props: (route) => ({ code: route.query.code }), props: (route) => ({ code: route.query.code }),
}, },
{ {
name: 'search', name: 'search',
path: '/search', path: '/search',
component: defineAsyncComponent( component: () => import('src/components/search/search.vue'),
() => import('src/components/search/search.vue'),
),
props: (route) => ({ query: route.query.query }), props: (route) => ({ query: route.query.query }),
}, },
{ {
name: 'who-to-follow', name: 'who-to-follow',
path: '/who-to-follow', path: '/who-to-follow',
component: defineAsyncComponent( component: () => import('src/components/who_to_follow/who_to_follow.vue'),
() => import('src/components/who_to_follow/who_to_follow.vue'),
),
beforeEnter: validateAuthenticatedRoute, beforeEnter: validateAuthenticatedRoute,
}, },
{ {
name: 'about', name: 'about',
path: '/about', path: '/about',
component: defineAsyncComponent( component: () => import('src/components/about/about.vue'),
() => import('src/components/about/about.vue'),
),
}, },
{ {
name: 'announcements', name: 'announcements',
path: '/announcements', path: '/announcements',
component: defineAsyncComponent( component: () =>
() => import('src/components/announcements_page/announcements_page.vue'),
import('src/components/announcements_page/announcements_page.vue'),
),
}, },
{ {
name: 'drafts', name: 'drafts',
path: '/drafts', path: '/drafts',
component: defineAsyncComponent( component: () => import('src/components/drafts/drafts.vue'),
() => import('src/components/drafts/drafts.vue'),
),
}, },
{ {
name: 'user-profile', name: 'user-profile',
path: '/users/:name', path: '/users/:name',
component: defineAsyncComponent( component: () => import('src/components/user_profile/user_profile.vue'),
() => import('src/components/user_profile/user_profile.vue'),
),
}, },
{ {
name: 'legacy-user-profile', name: 'legacy-user-profile',
path: '/:name', path: '/:name',
component: defineAsyncComponent( component: () => import('src/components/user_profile/user_profile.vue'),
() => import('src/components/user_profile/user_profile.vue'),
),
}, },
{ {
name: 'lists', name: 'lists',
path: '/lists', path: '/lists',
component: defineAsyncComponent( component: () => import('src/components/lists/lists.vue'),
() => import('src/components/lists/lists.vue'),
),
}, },
{ {
name: 'lists-timeline', name: 'lists-timeline',
path: '/lists/:id', path: '/lists/:id',
component: defineAsyncComponent( component: () =>
() => import('src/components/lists_timeline/lists_timeline.vue'), import('src/components/lists_timeline/lists_timeline.vue'),
),
}, },
{ {
name: 'lists-edit', name: 'lists-edit',
path: '/lists/:id/edit', path: '/lists/:id/edit',
component: defineAsyncComponent( component: () => import('src/components/lists_edit/lists_edit.vue'),
() => import('src/components/lists_edit/lists_edit.vue'),
),
}, },
{ {
name: 'lists-new', name: 'lists-new',
path: '/lists/new', path: '/lists/new',
component: defineAsyncComponent( component: () => import('src/components/lists_edit/lists_edit.vue'),
() => import('src/components/lists_edit/lists_edit.vue'),
),
}, },
{ {
name: 'edit-navigation', name: 'edit-navigation',
@ -266,19 +225,14 @@ export default (store) => {
{ {
name: 'bookmark-folders', name: 'bookmark-folders',
path: '/bookmark_folders', path: '/bookmark_folders',
component: defineAsyncComponent( component: () =>
() => import('src/components/bookmark_folders/bookmark_folders.vue'), import('src/components/bookmark_folders/bookmark_folders.vue'),
),
}, },
{ {
name: 'bookmark-folder-new', name: 'bookmark-folder-new',
path: '/bookmarks/new-folder', path: '/bookmarks/new-folder',
component: defineAsyncComponent( component: () =>
() => import('src/components/bookmark_folder_edit/bookmark_folder_edit.vue'),
import(
'src/components/bookmark_folder_edit/bookmark_folder_edit.vue'
),
),
}, },
{ {
name: 'bookmark-folder', name: 'bookmark-folder',
@ -288,12 +242,8 @@ export default (store) => {
{ {
name: 'bookmark-folder-edit', name: 'bookmark-folder-edit',
path: '/bookmarks/:id/edit', path: '/bookmarks/:id/edit',
component: defineAsyncComponent( component: () =>
() => import('src/components/bookmark_folder_edit/bookmark_folder_edit.vue'),
import(
'src/components/bookmark_folder_edit/bookmark_folder_edit.vue'
),
),
}, },
] ]
@ -302,18 +252,14 @@ export default (store) => {
{ {
name: 'chat', name: 'chat',
path: '/users/:username/chats/:recipient_id', path: '/users/:username/chats/:recipient_id',
component: defineAsyncComponent( component: () => import('src/components/chat_view/chat_view.vue'),
() => import('src/components/chat_view/chat_view.vue'),
),
meta: { dontScroll: false }, meta: { dontScroll: false },
beforeEnter: validateAuthenticatedRoute, beforeEnter: validateAuthenticatedRoute,
}, },
{ {
name: 'chats', name: 'chats',
path: '/users/:username/chats', path: '/users/:username/chats',
component: defineAsyncComponent( component: () => import('src/components/chat_list/chat_list.vue'),
() => import('src/components/chat_list/chat_list.vue'),
),
meta: { dontScroll: false }, meta: { dontScroll: false },
beforeEnter: validateAuthenticatedRoute, beforeEnter: validateAuthenticatedRoute,
}, },