diff options
author | Max <max@nextcloud.com> | 2022-12-20 11:34:00 +0100 |
---|---|---|
committer | Max <max@nextcloud.com> | 2022-12-20 11:34:08 +0100 |
commit | 787262be4f840542c01a41a3b797144210427551 (patch) | |
tree | d21b4a9f3dfa7e2e087c6048c590c2587be3ed72 /apps/files_sharing | |
parent | e50efc6f66577a2ccd54d5c1bff61e6a82a26445 (diff) | |
download | nextcloud-server-787262be4f840542c01a41a3b797144210427551.tar.gz nextcloud-server-787262be4f840542c01a41a3b797144210427551.zip |
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>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/src/views/SharingInherited.vue | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_sharing/src/views/SharingInherited.vue b/apps/files_sharing/src/views/SharingInherited.vue index 0f7d9d8b55b..f66fb44cfab 100644 --- a/apps/files_sharing/src/views/SharingInherited.vue +++ b/apps/files_sharing/src/views/SharingInherited.vue @@ -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> |