diff --git a/changelog/unreleased/bugfix-sidebar-for-current-folder b/changelog/unreleased/bugfix-sidebar-for-current-folder new file mode 100644 index 00000000000..c834e9d76cd --- /dev/null +++ b/changelog/unreleased/bugfix-sidebar-for-current-folder @@ -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 diff --git a/packages/web-app-files/src/mixins/actions/showDetails.js b/packages/web-app-files/src/mixins/actions/showDetails.js index f10dca3bdd1..6d8615dc604 100644 --- a/packages/web-app-files/src/mixins/actions/showDetails.js +++ b/packages/web-app-files/src/mixins/actions/showDetails.js @@ -1,4 +1,4 @@ -import { mapActions } from 'vuex' +import { mapActions, mapMutations } from 'vuex' import { isLocationTrashActive } from '../../router' import isFilesAppActive from './helpers/isFilesAppActive' @@ -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() } } diff --git a/packages/web-app-files/src/mixins/actions/showShares.ts b/packages/web-app-files/src/mixins/actions/showShares.ts index ee576ac04ea..ab63765e915 100644 --- a/packages/web-app-files/src/mixins/actions/showShares.ts +++ b/packages/web-app-files/src/mixins/actions/showShares.ts @@ -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], @@ -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') } }