Skip to content

Commit

Permalink
Merge pull request #7527 from owncloud/sidebar-current-folder
Browse files Browse the repository at this point in the history
Fix sidebar loading for the current folder
  • Loading branch information
JammingBen authored Aug 25, 2022
2 parents 5c179f5 + fd1b3fb commit 9d6e30b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-sidebar-for-current-folder
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Sidebar for current folder

We've fixed a bug where the right sidebar for the current folder could not be opened when another resource was selected.

https://github.com/owncloud/web/issues/7519
https://github.com/owncloud/web/pull/7527
6 changes: 4 additions & 2 deletions packages/web-app-files/src/mixins/actions/showDetails.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mapActions } from 'vuex'
import { mapActions, mapMutations } from 'vuex'
import { isLocationTrashActive } from '../../router'
import isFilesAppActive from './helpers/isFilesAppActive'

Expand Down Expand Up @@ -36,8 +36,10 @@ export default {
},
methods: {
...mapActions('Files/sidebar', { openSidebar: 'open' }),
...mapMutations('Files', ['SET_FILE_SELECTION']),

async $_showDetails_trigger() {
async $_showDetails_trigger({ resources }) {
this.SET_FILE_SELECTION(resources)
await this.openSidebar()
}
}
Expand Down
4 changes: 4 additions & 0 deletions packages/web-app-files/src/mixins/actions/showShares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import quickActions, { canShare } from '../../quickActions'
import { isLocationSharesActive, isLocationTrashActive } from '../../router'
import { ShareStatus } from 'web-client/src/helpers/share'
import isFilesAppActive from './helpers/isFilesAppActive'
import { mapMutations } from 'vuex'

export default {
mixins: [isFilesAppActive],
Expand Down Expand Up @@ -43,7 +44,10 @@ export default {
}
},
methods: {
...mapMutations('Files', ['SET_FILE_SELECTION']),

async $_showShares_trigger({ resources }) {
this.SET_FILE_SELECTION(resources)
await this.$store.dispatch('Files/sidebar/openWithPanel', 'sharing-item#peopleShares')
}
}
Expand Down

0 comments on commit 9d6e30b

Please sign in to comment.