diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-01-15 15:46:25 +0100 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2025-01-16 09:02:29 +0100 |
commit | b7c550ad837ef2e4cb7048be95ffbb9f21231bc3 (patch) | |
tree | 6098b4064c290868054b5dfc36703757c4e91303 | |
parent | 02b0c28a2bc2ee533e2a3d86c3e101f0c7f9033a (diff) | |
download | nextcloud-server-b7c550ad837ef2e4cb7048be95ffbb9f21231bc3.tar.gz nextcloud-server-b7c550ad837ef2e4cb7048be95ffbb9f21231bc3.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.js | 7 | ||||
-rw-r--r-- | apps/files_sharing/src/views/SharingDetailsTab.vue | 3 |
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 55e31872da1..ab84a6f0e19 100644 --- a/apps/files_sharing/src/mixins/SharesMixin.js +++ b/apps/files_sharing/src/mixins/SharesMixin.js @@ -128,7 +128,7 @@ export default { return this.config.isDefaultExpireDateEnforced } if (this.isRemoteShare) { - return this.config.isDefaultRemoteExpireDateEnforced + return this.config.isDefaultRemoteExpireDateEnforced } return this.config.isDefaultInternalExpireDateEnforced }, @@ -209,9 +209,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 215f91a6dc6..95d6d234264 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -144,7 +144,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" /> |