|
@@ -36,7 +36,13 @@
|
|
|
type="radio"
|
|
|
button-variant-grouped="vertical"
|
|
|
@update:checked="toggleCustomPermissions">
|
|
|
- {{ t('files_sharing', 'Allow upload and editing') }}
|
|
|
+ <template v-if="allowsFileDrop">
|
|
|
+ {{ t('files_sharing', 'Allow upload and editing') }}
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ {{ t('files_sharing', 'Allow editing') }}
|
|
|
+ </template>
|
|
|
+
|
|
|
<template #icon>
|
|
|
<EditIcon :size="20" />
|
|
|
</template>
|
|
@@ -132,6 +138,9 @@
|
|
|
@update:checked="onPasswordProtectedByTalkChange">
|
|
|
{{ t('file_sharing', 'Video verification') }}
|
|
|
</NcCheckboxRadioSwitch>
|
|
|
+ <NcCheckboxRadioSwitch v-if="!isPublicShare" :disabled="!canSetDownload" :checked.sync="canDownload">
|
|
|
+ {{ t('file_sharing', 'Allow download') }}
|
|
|
+ </NcCheckboxRadioSwitch>
|
|
|
<NcCheckboxRadioSwitch :checked.sync="writeNoteToRecipientIsChecked">
|
|
|
{{ t('file_sharing', 'Note to recipient') }}
|
|
|
</NcCheckboxRadioSwitch>
|
|
@@ -145,7 +154,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">
|
|
@@ -154,12 +164,11 @@
|
|
|
<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">
|
|
|
- {{ t('file_sharing', 'Download') }}
|
|
|
- </NcCheckboxRadioSwitch>
|
|
|
<NcCheckboxRadioSwitch :disabled="!canSetDelete" :checked.sync="canDelete">
|
|
|
{{ t('file_sharing', 'Delete') }}
|
|
|
</NcCheckboxRadioSwitch>
|
|
@@ -371,13 +380,19 @@ export default {
|
|
|
*/
|
|
|
hasExpirationDate: {
|
|
|
get() {
|
|
|
+ const isDefaultExpireDateEnabled = this.config.isDefaultExpireDateEnabled
|
|
|
+ const hasExistingExpirationDate = !!this.share.expireDate || isDefaultExpireDateEnabled
|
|
|
+ const isDefaultInternalExpireDateEnabled = this.config.isDefaultInternalExpireDateEnabled
|
|
|
+ const isDefaultRemoteExpireDateEnabled = this.config.isDefaultRemoteExpireDateEnabled
|
|
|
if (this.isPublicShare) {
|
|
|
- return !!this.share.expireDate || this.config.isDefaultExpireDateEnforced
|
|
|
+ return hasExistingExpirationDate
|
|
|
}
|
|
|
+
|
|
|
if (this.isRemoteShare) {
|
|
|
- return !!this.share.expireDate || this.config.isDefaultInternalExpireDateEnforced || this.config.isDefaultExpireDateEnforced
|
|
|
+ return hasExistingExpirationDate || isDefaultRemoteExpireDateEnabled
|
|
|
}
|
|
|
- return !!this.share.expireDate || this.config.isDefaultInternalExpireDateEnforced || this.config.isDefaultExpireDateEnforced
|
|
|
+
|
|
|
+ return hasExistingExpirationDate || isDefaultInternalExpireDateEnabled
|
|
|
},
|
|
|
set(enabled) {
|
|
|
this.share.expireDate = enabled
|
|
@@ -542,7 +557,7 @@ export default {
|
|
|
return this.share.newPassword !== undefined
|
|
|
},
|
|
|
passwordExpirationTime() {
|
|
|
- if (this.share.passwordExpirationTime === null) {
|
|
|
+ if (!this.isValidShareAttribute(this.share.passwordExpirationTime)) {
|
|
|
return null
|
|
|
}
|
|
|
|
|
@@ -629,9 +644,6 @@ export default {
|
|
|
if (hasPermissions(this.share.permissions, ATOMIC_PERMISSIONS.SHARE)) {
|
|
|
perms.push('share')
|
|
|
}
|
|
|
- if (this.share.hasDownloadPermission) {
|
|
|
- perms.push('download')
|
|
|
- }
|
|
|
const capitalizeFirstAndJoin = array => array.map((item, index) => index === 0 ? item[0].toUpperCase() + item.substring(1) : item).join(', ')
|
|
|
|
|
|
return capitalizeFirstAndJoin(perms)
|
|
@@ -676,7 +688,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
expandCustomPermissions() {
|
|
|
- if (!this.advancedSectionAccordionExpanded) {
|
|
|
+ if (!this.advancedSectionAccordionExpanded) {
|
|
|
this.advancedSectionAccordionExpanded = true
|
|
|
}
|
|
|
this.toggleCustomPermissions()
|
|
@@ -687,34 +699,24 @@ export default {
|
|
|
this.setCustomPermissions = isCustomPermissions
|
|
|
},
|
|
|
async initializeAttributes() {
|
|
|
- let hasAdvancedAttributes = false
|
|
|
|
|
|
if (this.isNewShare) {
|
|
|
if (this.isPasswordEnforced && this.isPublicShare) {
|
|
|
this.share.newPassword = await GeneratePassword()
|
|
|
this.advancedSectionAccordionExpanded = true
|
|
|
}
|
|
|
+ if (this.hasExpirationDate) {
|
|
|
+ this.share.expireDate = this.defaultExpiryDate
|
|
|
+ this.advancedSectionAccordionExpanded = true
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if (this.isValidShareAttribute(this.share.note)) {
|
|
|
- this.writeNoteToRecipientIsChecked = true
|
|
|
- hasAdvancedAttributes = true
|
|
|
- }
|
|
|
-
|
|
|
- if (this.isValidShareAttribute(this.share.password)) {
|
|
|
- hasAdvancedAttributes = true
|
|
|
- }
|
|
|
-
|
|
|
- if (this.isValidShareAttribute(this.share.expireDate)) {
|
|
|
- hasAdvancedAttributes = true
|
|
|
- }
|
|
|
-
|
|
|
- if (this.isValidShareAttribute(this.share.label)) {
|
|
|
- hasAdvancedAttributes = true
|
|
|
- }
|
|
|
-
|
|
|
- if (hasAdvancedAttributes) {
|
|
|
+ if (
|
|
|
+ this.isValidShareAttribute(this.share.password)
|
|
|
+ || this.isValidShareAttribute(this.share.expireDate)
|
|
|
+ || this.isValidShareAttribute(this.share.label)
|
|
|
+ ) {
|
|
|
this.advancedSectionAccordionExpanded = true
|
|
|
}
|
|
|
|
|
@@ -1031,6 +1033,7 @@ export default {
|
|
|
flex-direction: column;
|
|
|
justify-content: space-between;
|
|
|
align-items: flex-start;
|
|
|
+ background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));
|
|
|
|
|
|
.button-group {
|
|
|
display: flex;
|