aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/components/SharingEntry.vue
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-11-13 15:43:11 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 14:33:13 +0100
commit444c9b6744f00a0fb8ac31cf0c827c150719bc68 (patch)
treeb4f283ae7a6f7996dc279cc5eabb173c9cc2bad9 /apps/files_sharing/src/components/SharingEntry.vue
parentefce1fdfaca81353414c2a752dcebfa3ca4135e6 (diff)
downloadnextcloud-server-444c9b6744f00a0fb8ac31cf0c827c150719bc68.tar.gz
nextcloud-server-444c9b6744f00a0fb8ac31cf0c827c150719bc68.zip
Add settings front and split sharing entry config
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntry.vue')
-rw-r--r--apps/files_sharing/src/components/SharingEntry.vue22
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue
index 09d09d607fe..cde7d2ed2b1 100644
--- a/apps/files_sharing/src/components/SharingEntry.vue
+++ b/apps/files_sharing/src/components/SharingEntry.vue
@@ -213,6 +213,28 @@ export default {
set: function(checked) {
this.updatePermissions(this.canEdit, checked)
}
+ },
+
+ /**
+ * Does the current share have an expiration date
+ * @returns {boolean}
+ */
+ hasExpirationDate: {
+ get: function() {
+ return this.config.isDefaultInternalExpireDateEnforced || !!this.share.expireDate
+ },
+ set: function(enabled) {
+ this.share.expireDate = enabled
+ ? this.config.defaultInternalExpirationDateString !== ''
+ ? this.config.defaultInternalExpirationDateString
+ : moment().format('YYYY-MM-DD')
+ : ''
+ }
+ },
+
+ dateMaxEnforced() {
+ return this.config.isDefaultInternalExpireDateEnforced
+ && moment().add(1 + this.config.defaultInternalExpireDate, 'days')
}
},