mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
fix(files): Make sure $navigation is observable to react on changes
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
d1fc93ede1
commit
5db658c655
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'))
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue