fix: remove other shares from ui when deleted

Remove the share entry in question
when unsharing a folder
from within the `others with access` section
of a file within that folder.

Using the code from the ShareList view here as well.
Just copying the code here as this is a bugfix
that will need to be backported.

Signed-off-by: Max <max@nextcloud.com>
This commit is contained in:
Max 2022-12-20 11:34:00 +01:00
parent e50efc6f66
commit 787262be4f
No known key found for this signature in database
GPG Key ID: 0F5BFA367A00BACE
3 changed files with 12 additions and 1 deletions

View File

@ -41,7 +41,8 @@
<SharingEntryInherited v-for="share in shares"
:key="share.id"
:file-info="fileInfo"
:share="share" />
:share="share"
@remove:share="removeShare" />
</ul>
</template>
@ -152,6 +153,16 @@ export default {
this.showInheritedShares = false
this.shares = []
},
/**
* Remove a share from the shares list
*
* @param {Share} share the share to remove
*/
removeShare(share) {
const index = this.shares.findIndex(item => item === share)
// eslint-disable-next-line vue/no-mutating-props
this.shares.splice(index, 1)
},
},
}
</script>

Binary file not shown.

Binary file not shown.