Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(files): Make sure $navigation is observable to react on changes
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Jan 25, 2024
commit 5db658c65565c27dc10cad896c822bfa2d92f1f7
3 changes: 2 additions & 1 deletion apps/files/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions apps/files/src/views/FilesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
},

/**
Expand Down