diff --git a/apps/files/src/main.ts b/apps/files/src/main.ts index 1206b9cc7115b..0c0c5b165e6af 100644 --- a/apps/files/src/main.ts +++ b/apps/files/src/main.ts @@ -34,7 +34,8 @@ Vue.use(PiniaVuePlugin) const pinia = createPinia() // Init Navigation Service -const Navigation = getNavigation() +// This only works with Vue 2 - with Vue 3 this will not modify the source but return just a oberserver +const Navigation = Vue.observable(getNavigation()) Vue.prototype.$navigation = Navigation // Init Files App Settings Service diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index a3ef2c5f007fd..fabfccd6ca1a4 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -222,8 +222,7 @@ export default defineComponent({ }, currentView(): View { - return (this.$navigation.active - || this.$navigation.views.find(view => view.id === 'files')) as View + return this.$navigation.active || this.$navigation.views.find((view) => view.id === (this.$route.params?.view ?? 'files')) }, /**