diff --git a/assets/auto-imports.d.ts b/assets/auto-imports.d.ts index b8bf71b5..96ecf83f 100644 --- a/assets/auto-imports.d.ts +++ b/assets/auto-imports.d.ts @@ -84,8 +84,8 @@ declare global { const nextTick: typeof import('vue')['nextTick'] const onActivated: typeof import('vue')['onActivated'] const onBeforeMount: typeof import('vue')['onBeforeMount'] - const onBeforeRouteLeave: typeof import('vue-router/auto')['onBeforeRouteLeave'] - const onBeforeRouteUpdate: typeof import('vue-router/auto')['onBeforeRouteUpdate'] + const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave'] + const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate'] const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] const onClickOutside: typeof import('@vueuse/core')['onClickOutside'] @@ -283,8 +283,8 @@ declare global { const useRefHistory: typeof import('@vueuse/core')['useRefHistory'] const useReleases: typeof import('./stores/releases')['useReleases'] const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver'] - const useRoute: typeof import('vue-router/auto')['useRoute'] - const useRouter: typeof import('vue-router/auto')['useRouter'] + const useRoute: typeof import('vue-router')['useRoute'] + const useRouter: typeof import('vue-router')['useRouter'] const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation'] const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea'] const useScriptTag: typeof import('@vueuse/core')['useScriptTag'] @@ -410,7 +410,6 @@ declare module 'vue' { readonly debouncedWatch: UnwrapRef readonly defineAsyncComponent: UnwrapRef readonly defineComponent: UnwrapRef - readonly definePage: UnwrapRef readonly defineStore: UnwrapRef readonly eagerComputed: UnwrapRef readonly effectScope: UnwrapRef @@ -449,8 +448,8 @@ declare module 'vue' { readonly nextTick: UnwrapRef readonly onActivated: UnwrapRef readonly onBeforeMount: UnwrapRef - readonly onBeforeRouteLeave: UnwrapRef - readonly onBeforeRouteUpdate: UnwrapRef + readonly onBeforeRouteLeave: UnwrapRef + readonly onBeforeRouteUpdate: UnwrapRef readonly onBeforeUnmount: UnwrapRef readonly onBeforeUpdate: UnwrapRef readonly onClickOutside: UnwrapRef @@ -648,8 +647,8 @@ declare module 'vue' { readonly useRefHistory: UnwrapRef readonly useReleases: UnwrapRef readonly useResizeObserver: UnwrapRef - readonly useRoute: UnwrapRef - readonly useRouter: UnwrapRef + readonly useRoute: UnwrapRef + readonly useRouter: UnwrapRef readonly useScreenOrientation: UnwrapRef readonly useScreenSafeArea: UnwrapRef readonly useScriptTag: UnwrapRef @@ -768,7 +767,6 @@ declare module '@vue/runtime-core' { readonly debouncedWatch: UnwrapRef readonly defineAsyncComponent: UnwrapRef readonly defineComponent: UnwrapRef - readonly definePage: UnwrapRef readonly defineStore: UnwrapRef readonly eagerComputed: UnwrapRef readonly effectScope: UnwrapRef @@ -807,8 +805,8 @@ declare module '@vue/runtime-core' { readonly nextTick: UnwrapRef readonly onActivated: UnwrapRef readonly onBeforeMount: UnwrapRef - readonly onBeforeRouteLeave: UnwrapRef - readonly onBeforeRouteUpdate: UnwrapRef + readonly onBeforeRouteLeave: UnwrapRef + readonly onBeforeRouteUpdate: UnwrapRef readonly onBeforeUnmount: UnwrapRef readonly onBeforeUpdate: UnwrapRef readonly onClickOutside: UnwrapRef @@ -1006,8 +1004,8 @@ declare module '@vue/runtime-core' { readonly useRefHistory: UnwrapRef readonly useReleases: UnwrapRef readonly useResizeObserver: UnwrapRef - readonly useRoute: UnwrapRef - readonly useRouter: UnwrapRef + readonly useRoute: UnwrapRef + readonly useRouter: UnwrapRef readonly useScreenOrientation: UnwrapRef readonly useScreenSafeArea: UnwrapRef readonly useScriptTag: UnwrapRef diff --git a/assets/components/HostMenu.vue b/assets/components/HostMenu.vue index 282d11e3..ade80e34 100644 --- a/assets/components/HostMenu.vue +++ b/assets/components/HostMenu.vue @@ -168,10 +168,10 @@ const menuItems = computed(() => { return items; }); -const route = useRoute(); +const route = useRoute("/container/[id]"); const updateHostForContainerRoute = (to: RouteLocationNormalizedLoaded) => { - if (to.name === "container-id") { + if (to.name === "/container/[id]") { const container = containerStore.findContainerById(to.params.id as string); if (container) { setHost(container.host); diff --git a/assets/typed-router.d.ts b/assets/typed-router.d.ts index 9483b72c..c08a54d6 100644 --- a/assets/typed-router.d.ts +++ b/assets/typed-router.d.ts @@ -12,7 +12,7 @@ declare module 'vue-router/auto-routes' { ParamValueOneOrMore, ParamValueZeroOrMore, ParamValueZeroOrOne, - } from 'unplugin-vue-router/types' + } from 'vue-router' /** * Route name map generated by unplugin-vue-router