diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-03-04 18:35:30 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-03-09 12:40:14 +0300 |
commit | 77401e8c1c6ff43c013ccf40d9452a3b22bea28f (patch) | |
tree | a867a6a671d5460230acecfda34bde4b2fabb6ab /apps/files_sharing/src/components/SharingEntry.vue | |
parent | f5da1ec51d972cde4a525dcbfcb595283339d0d7 (diff) |
Hide expiration date field for remote shares
Remote shares currently do not support expiration date.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntry.vue')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntry.vue | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue index e2fcaa35a76..4baafcd96bc 100644 --- a/apps/files_sharing/src/components/SharingEntry.vue +++ b/apps/files_sharing/src/components/SharingEntry.vue @@ -84,14 +84,16 @@ </ActionCheckbox> <!-- expiration date --> - <ActionCheckbox :checked.sync="hasExpirationDate" + <ActionCheckbox + v-if="canHaveExpirationDate" + :checked.sync="hasExpirationDate" :disabled="config.isDefaultInternalExpireDateEnforced || saving" @uncheck="onExpirationDisable"> {{ config.isDefaultInternalExpireDateEnforced ? t('files_sharing', 'Expiration date enforced') : t('files_sharing', 'Set expiration date') }} </ActionCheckbox> - <ActionInput v-if="hasExpirationDate" + <ActionInput v-if="canHaveExpirationDate && hasExpirationDate" ref="expireDate" v-tooltip.auto="{ content: errors.expireDate, @@ -222,8 +224,16 @@ export default { }, canHaveNote() { - return this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE - && this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP + return !this.isRemoteShare + }, + + canHaveExpirationDate() { + return !this.isRemoteShare + }, + + isRemoteShare() { + return this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE + || this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP }, /** |