Skip to content

Commit

Permalink
Merge pull request #42067 from nextcloud/share-flow-improvments
Browse files Browse the repository at this point in the history
Fix some silent share bugs
  • Loading branch information
nfebe authored Dec 6, 2023
2 parents f6b49b1 + 342dbb5 commit 669cf65
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 17 deletions.
10 changes: 7 additions & 3 deletions apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,13 @@ export default {
|| !!this.share.password
},
async set(enabled) {
// TODO: directly save after generation to make sure the share is always protected
this.share.password = enabled ? await GeneratePassword() : ''
this.$set(this.share, 'newPassword', this.share.password)
if (enabled) {
this.share.password = await GeneratePassword()
this.$set(this.share, 'newPassword', this.share.password)
} else {
this.share.password = ''
this.$delete(this.share, 'newPassword')
}
},
},
/**
Expand Down
13 changes: 6 additions & 7 deletions apps/files_sharing/src/views/SharingTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,13 @@ export default {
* @param {Function} resolve a function to execute after
*/
awaitForShare(share, resolve) {
let listComponent = this.$refs.shareList
// Only mail shares comes from the input, link shares
// are managed internally in the SharingLinkList component
if (share.type === this.SHARE_TYPES.SHARE_TYPE_EMAIL) {
listComponent = this.$refs.linkShareList
}

this.$nextTick(() => {
let listComponent = this.$refs.shareList
// Only mail shares comes from the input, link shares
// are managed internally in the SharingLinkList component
if (share.type === this.SHARE_TYPES.SHARE_TYPE_EMAIL) {
listComponent = this.$refs.linkShareList
}
const newShare = listComponent.$children.find(component => component.share === share)
if (newShare) {
resolve(newShare)
Expand Down
3 changes: 0 additions & 3 deletions dist/3502-3502.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/3502-3502.js.map

This file was deleted.

3 changes: 3 additions & 0 deletions dist/5211-5211.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/5211-5211.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

0 comments on commit 669cf65

Please sign in to comment.