aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-01-15 15:46:25 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2025-01-16 09:06:27 +0100
commit484f1587c98119a6c0c4b3b18ffbbf90d8de7ebb (patch)
tree8fc4eabef9cfa7d7d352c3702ec2aeb122142218
parent34511aad8be7a6755df17c06d8b6c62c831591a0 (diff)
downloadnextcloud-server-484f1587c98119a6c0c4b3b18ffbbf90d8de7ebb.tar.gz
nextcloud-server-484f1587c98119a6c0c4b3b18ffbbf90d8de7ebb.zip
fix(files_sharing): Remove debounce from expiration date formatting
This should be done as soon as changed, as the value is not passed to API but needs to be tracked internally (e.g. if you quickly press "save"). Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r--apps/files_sharing/src/mixins/SharesMixin.js7
-rw-r--r--apps/files_sharing/src/views/SharingDetailsTab.vue3
2 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js
index 6154b7f68cf..a0170cd4b7f 100644
--- a/apps/files_sharing/src/mixins/SharesMixin.js
+++ b/apps/files_sharing/src/mixins/SharesMixin.js
@@ -149,7 +149,7 @@ export default {
return this.config.isDefaultExpireDateEnforced
}
if (this.isRemoteShare) {
- return this.config.isDefaultRemoteExpireDateEnforced
+ return this.config.isDefaultRemoteExpireDateEnforced
}
return this.config.isDefaultInternalExpireDateEnforced
},
@@ -230,9 +230,10 @@ export default {
*
* @param {Date} date
*/
- onExpirationChange: debounce(function(date) {
+ onExpirationChange(date) {
this.share.expireDate = this.formatDateToString(new Date(date))
- }, 500),
+ },
+
/**
* Uncheck expire date
* We need this method because @update:checked
diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue
index e8b17c4f110..5c235cd004c 100644
--- a/apps/files_sharing/src/views/SharingDetailsTab.vue
+++ b/apps/files_sharing/src/views/SharingDetailsTab.vue
@@ -140,7 +140,8 @@
:value="new Date(share.expireDate ?? dateTomorrow)"
:min="dateTomorrow"
:max="maxExpirationDateEnforced"
- :hide-label="true"
+ hide-label
+ :label="t('files_sharing', 'Expiration date')"
:placeholder="t('files_sharing', 'Expiration date')"
type="date"
@input="onExpirationChange" />