diff options
author | nfebe <fenn25.fn@gmail.com> | 2025-02-05 18:29:37 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2025-02-06 12:55:10 +0000 |
commit | 6c231b6e09e8feef9ce8f0de367e4cec4748bb80 (patch) | |
tree | 6f46e033613caef45c77731de5aca4c5f5b0f230 | |
parent | fe08fd0dbe9baeafbbaa29a9eebf37b2aba9e886 (diff) | |
download | nextcloud-server-6c231b6e09e8feef9ce8f0de367e4cec4748bb80.tar.gz nextcloud-server-6c231b6e09e8feef9ce8f0de367e4cec4748bb80.zip |
fix(files_sharing): Update `QuickShareSelect` if share is modified
Signed-off-by: nfebe <fenn25.fn@gmail.com>
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue | 13 | ||||
-rw-r--r-- | apps/files_sharing/src/views/SharingDetailsTab.vue | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue b/apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue index 565bee1d821..fde4f0e7091 100644 --- a/apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue +++ b/apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue @@ -29,6 +29,7 @@ <script> import { ShareType } from '@nextcloud/sharing' +import { subscribe, unsubscribe } from '@nextcloud/event-bus' import DropdownIcon from 'vue-material-design-icons/TriangleSmallDown.vue' import SharesMixin from '../mixins/SharesMixin.js' import ShareDetails from '../mixins/ShareDetails.js' @@ -145,7 +146,17 @@ export default { created() { this.selectedOption = this.preSelectedOption }, - + mounted() { + subscribe('update:share', (share) => { + if (share.id === this.share.id) { + this.share.permissions = share.permissions + this.selectedOption = this.preSelectedOption + } + }) + }, + unmounted() { + unsubscribe('update:share') + }, methods: { selectOption(optionLabel) { this.selectedOption = optionLabel diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index 404a8fe25e9..df420cf7af2 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -969,6 +969,7 @@ export default { this.$emit('add:share', this.share) } else { this.$emit('update:share', this.share) + emit('update:share', this.share) this.queueUpdate(...permissionsAndAttributes) } |