Merge pull request #42067 from nextcloud/share-flow-improvments

Fix some silent share bugs
This commit is contained in:
F. E Noel Nfebe 2023-12-07 00:26:44 +01:00 committed by GitHub
commit 669cf65283
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 17 deletions

View file

@ -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')
}
},
},
/**

View file

@ -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)

3
dist/3502-3502.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
dist/5211-5211.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/5211-5211.js.map vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long