]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not toggle custom permissions
authorfenn-cs <fenn25.fn@gmail.com>
Mon, 4 Sep 2023 22:24:39 +0000 (23:24 +0100)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Thu, 7 Sep 2023 13:17:49 +0000 (15:17 +0200)
Currently, swithcing between permissions in the sharing permissions
details view would toggle the custom permissions view.

We think, it's better for the custom permission option to simple
expand the custom permissions view and never close it gain even if the
user is switching between bundled permissions.

The user can always collapse the view by using the "Advanced settings" toggle.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
apps/files_sharing/src/views/SharingDetailsTab.vue

index 175812a0ff22de19517ea07ec95b27739aa6e0b4..6368bb20b9fa8fa925388622d10235019193882a 100644 (file)
@@ -61,7 +61,7 @@
                                        name="sharing_permission_radio"
                                        type="radio"
                                        button-variant-grouped="vertical"
-                                       @update:checked="toggleCustomPermissions">
+                                       @update:checked="expandCustomPermissions">
                                        {{ t('files_sharing', 'Custom permissions') }}
                                        <small>{{ t('files_sharing', customPermissionsList) }}</small>
                                        <template #icon>
@@ -666,16 +666,14 @@ export default {
                                this.$set(this.share, 'hasDownloadPermission', isDownloadChecked)
                        }
                },
-
-               toggleCustomPermissions(selectedPermission) {
-                       if (this.sharingPermission === 'custom') {
+               expandCustomPermissions() {
+                       if (!this.advancedSectionAccordionExpanded)     {
                                this.advancedSectionAccordionExpanded = true
-                               this.setCustomPermissions = true
-                       } else {
-                               this.advancedSectionAccordionExpanded = false
-                               this.revertSharingPermission = selectedPermission
-                               this.setCustomPermissions = false
                        }
+                       this.toggleCustomPermissions()
+               },
+               toggleCustomPermissions() {
+                       this.setCustomPermissions = this.sharingPermission === 'custom'
                },
                initializeAttributes() {