diff options
author | fenn-cs <fenn25.fn@gmail.com> | 2023-09-04 23:24:39 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-09-07 15:17:49 +0200 |
commit | c22c9c917bb465d9e44324e947af0dac5c5a44ee (patch) | |
tree | 67e35e3136a653e2e62a8fd393f9528a7186ea5e /apps | |
parent | a5f71a75023989d4faf77c925b0eeed14b13d0db (diff) | |
download | nextcloud-server-c22c9c917bb465d9e44324e947af0dac5c5a44ee.tar.gz nextcloud-server-c22c9c917bb465d9e44324e947af0dac5c5a44ee.zip |
Do not toggle custom permissions
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>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/views/SharingDetailsTab.vue | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index 175812a0ff2..6368bb20b9f 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -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() { |