Skip to content

Commit

Permalink
Do not toggle custom permissions
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nfebe committed Sep 6, 2023
1 parent 387cf9e commit 6e479df
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 6e479df

Please sign in to comment.