summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/views/SharingDetailsTab.vue
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/src/views/SharingDetailsTab.vue')
-rw-r--r--apps/files_sharing/src/views/SharingDetailsTab.vue10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue
index 580d24eae58..67bfac3e74c 100644
--- a/apps/files_sharing/src/views/SharingDetailsTab.vue
+++ b/apps/files_sharing/src/views/SharingDetailsTab.vue
@@ -398,9 +398,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')
+ }
},
},
/**