mirror of
https://github.com/nextcloud/server.git
synced 2026-04-04 16:45:22 -04:00
fix(files_sharing): Update QuickShareSelect if share is modified
Signed-off-by: nfebe <fenn25.fn@gmail.com>
This commit is contained in:
parent
fe08fd0dbe
commit
6c231b6e09
2 changed files with 13 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue