Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a watcher for the share panel of a space #6543

Merged
merged 2 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Add a watcher for the share panel of a space

We've added a watcher for the share panel of a space to ensure seamless navigation via the share indicator.

https://github.com/owncloud/web/pull/6543
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,15 @@ export default {
return currentUserCollaborator?.role?.name === spaceRoleManager.name
}
},
mounted() {
this.loadSharesTask.perform(this)
watch: {
highlightedFile: {
handler: function (newItem, oldItem) {
if (oldItem !== newItem) {
this.loadSharesTask.perform(this)
}
},
immediate: true
}
},
methods: {
...mapActions('Files', ['loadCurrentFileOutgoingShares', 'deleteShare']),
Expand Down
6 changes: 2 additions & 4 deletions packages/web-app-files/src/views/spaces/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,7 @@ export default {
methods: {
...mapActions('Files', ['loadIndicators', 'loadPreview', 'loadCurrentFileOutgoingShares']),
...mapActions('Files/sidebar', {
openSidebarWithPanel: 'openWithPanel',
closeSidebar: 'close'
openSidebarWithPanel: 'openWithPanel'
}),
...mapMutations('Files', [
'SET_CURRENT_FOLDER',
Expand Down Expand Up @@ -521,8 +520,7 @@ export default {
closeQuotaModal() {
this.$_editQuota_closeModal()
},
async openSidebarSharePanel() {
await this.closeSidebar()
openSidebarSharePanel() {
this.SET_FILE_SELECTION([this.space])
this.openSidebarWithPanel('space-share-item')
},
Expand Down
6 changes: 2 additions & 4 deletions packages/web-app-files/src/views/spaces/Projects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ export default {
methods: {
...mapActions(['createModal', 'hideModal', 'setModalInputErrorMessage']),
...mapActions('Files/sidebar', {
openSidebarWithPanel: 'openWithPanel',
closeSidebar: 'close'
openSidebarWithPanel: 'openWithPanel'
}),
...mapMutations('Files', [
'SET_CURRENT_FOLDER',
Expand Down Expand Up @@ -379,8 +378,7 @@ export default {
}
return ''
},
async openSidebarSharePanel(space) {
await this.closeSidebar()
openSidebarSharePanel(space) {
this.SET_FILE_SELECTION([space])
this.openSidebarWithPanel('space-share-item')
}
Expand Down