Skip to content

Commit

Permalink
Add icons for bundled permissions
Browse files Browse the repository at this point in the history
Signed-off-by: fenn-cs <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
  • Loading branch information
nfebe committed Sep 11, 2023
1 parent f2a9859 commit 98b54f1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 25 deletions.
50 changes: 28 additions & 22 deletions apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
type="radio"
button-variant-grouped="vertical"
@update:checked="toggleCustomPermissions">
{{ t('files_sharing', 'View only') }}
<template #icon>
<ViewIcon :size="20" />
</template>
<ViewIcon :size="20" />
<span>{{ t('files_sharing', 'View only') }}</span>
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch :button-variant="true"
:checked.sync="sharingPermission"
Expand All @@ -36,10 +34,8 @@
type="radio"
button-variant-grouped="vertical"
@update:checked="toggleCustomPermissions">
{{ t('files_sharing', 'Allow upload and editing') }}
<template #icon>
<EditIcon :size="20" />
</template>
<EditIcon :size="20" />
<span>{{ t('files_sharing', 'Allow upload and editing') }}</span>
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-if="allowsFileDrop"
:button-variant="true"
Expand All @@ -49,11 +45,9 @@
type="radio"
button-variant-grouped="vertical"
@update:checked="toggleCustomPermissions">
{{ t('files_sharing', 'File drop') }}
<UploadIcon :size="20" />
<span>{{ t('files_sharing', 'File drop') }}</span>
<small>{{ t('files_sharing', 'Upload only') }}</small>
<template #icon>
<UploadIcon :size="20" />
</template>
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch :button-variant="true"
:checked.sync="sharingPermission"
Expand All @@ -62,11 +56,9 @@
type="radio"
button-variant-grouped="vertical"
@update:checked="expandCustomPermissions">
{{ t('files_sharing', 'Custom permissions') }}
<DotsHorizontalIcon :size="20" />
<span>{{ t('files_sharing', 'Custom permissions') }}</span>
<small>{{ t('files_sharing', customPermissionsList) }}</small>
<template #icon>
<DotsHorizontalIcon :size="20" />
</template>
</NcCheckboxRadioSwitch>
</div>
</div>
Expand Down Expand Up @@ -142,7 +134,8 @@
{{ t('file_sharing', 'Custom permissions') }}
</NcCheckboxRadioSwitch>
<section v-if="setCustomPermissions" class="custom-permissions-group">
<NcCheckboxRadioSwitch :disabled="!allowsFileDrop && share.type === SHARE_TYPES.SHARE_TYPE_LINK" :checked.sync="hasRead">
<NcCheckboxRadioSwitch :disabled="!allowsFileDrop && share.type === SHARE_TYPES.SHARE_TYPE_LINK"
:checked.sync="hasRead">
{{ t('file_sharing', 'Read') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-if="isFolder" :disabled="!canSetCreate" :checked.sync="canCreate">
Expand All @@ -151,7 +144,9 @@
<NcCheckboxRadioSwitch :disabled="!canSetEdit" :checked.sync="canEdit">
{{ t('file_sharing', 'Update') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-if="config.isResharingAllowed && share.type !== SHARE_TYPES.SHARE_TYPE_LINK" :disabled="!canSetReshare" :checked.sync="canReshare">
<NcCheckboxRadioSwitch v-if="config.isResharingAllowed && share.type !== SHARE_TYPES.SHARE_TYPE_LINK"
:disabled="!canSetReshare"
:checked.sync="canReshare">
{{ t('file_sharing', 'Share') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-if="!isPublicShare" :disabled="!canSetDownload" :checked.sync="canDownload">
Expand Down Expand Up @@ -667,7 +662,7 @@ export default {
}
},
expandCustomPermissions() {
if (!this.advancedSectionAccordionExpanded) {
if (!this.advancedSectionAccordionExpanded) {
this.advancedSectionAccordionExpanded = true
}
this.toggleCustomPermissions()
Expand Down Expand Up @@ -951,14 +946,25 @@ export default {
}
::v-deep label {
display: flex;
flex-direction: column;
flex-wrap: wrap;
span {
display: flex;
flex-direction: column;
&:first-of-type {
flex: 10%;
}
&:last-of-type {
flex: 90%
}
}
small {
flex-basis: 100% !important;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

0 comments on commit 98b54f1

Please sign in to comment.