Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 30 additions & 21 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,11 +946,26 @@ export default {
}

::v-deep label {
display: flex;
flex-wrap: wrap;

span {
display: flex;
flex-direction: column;

&:first-of-type {
flex: 10%;
}

&:last-of-type {
flex: 90%
}
Comment on lines +955 to +961
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this should be done in the vue components with a proper slot like you did initially :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah @skjnldsv, this changes where already made in the component, but where not back-ported (not sure why), so went this route.

}

small {
padding-left: 10%;
flex-basis: 100% !important;
}

}
}

Expand Down Expand Up @@ -999,7 +1009,6 @@ export default {
*/
span {
::v-deep label {
padding-left: 0 !important;
background-color: initial !important;
border: none !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.