File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929
3030<script >
3131import { ShareType } from ' @nextcloud/sharing'
32+ import { subscribe , unsubscribe } from ' @nextcloud/event-bus'
3233import DropdownIcon from ' vue-material-design-icons/TriangleSmallDown.vue'
3334import SharesMixin from ' ../mixins/SharesMixin.js'
3435import ShareDetails from ' ../mixins/ShareDetails.js'
@@ -145,7 +146,17 @@ export default {
145146 created () {
146147 this .selectedOption = this .preSelectedOption
147148 },
148-
149+ mounted () {
150+ subscribe (' update:share' , (share ) => {
151+ if (share .id === this .share .id ) {
152+ this .share .permissions = share .permissions
153+ this .selectedOption = this .preSelectedOption
154+ }
155+ })
156+ },
157+ unmounted () {
158+ unsubscribe (' update:share' )
159+ },
149160 methods: {
150161 selectOption (optionLabel ) {
151162 this .selectedOption = optionLabel
Original file line number Diff line number Diff line change @@ -918,6 +918,7 @@ export default {
918918 this .$emit (' add:share' , this .share )
919919 } else {
920920 this .$emit (' update:share' , this .share )
921+ emit (' update:share' , this .share )
921922 this .queueUpdate (... permissionsAndAttributes)
922923 }
923924
You can’t perform that action at this time.
0 commit comments