fix(files_reminder): passed reminder handling#59228
Conversation
|
/backport to stable33 |
a85e455 to
bb962d6
Compare
bb962d6 to
cc7c56c
Compare
|
/compile rebase |
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
cc7c56c to
786d3f2
Compare
| const relativeDueDate = formatRelativeTime(customDueDate.value ?? 0) | ||
| return (nowDate.value.getTime() >= (customDueDate.value?.getTime() ?? 0)) | ||
| // TRANSLATORS: {relativeDueDate} will be replaced with a relative time, e.g. "2 hours ago" or "in 3 days". | ||
| ? t('files_reminders', 'We reminded you of this file {relativeDueDate}', { relativeDueDate }) |
There was a problem hiding this comment.
I don't understand the purpose of this "historical reminder" message. Is it just a fallback for stale paths and/or triggering test(s)?
Do we intentionally want the modal to present past reminders as historical state when they slip through, or should it instead behave as if no reminder exists?
There was a problem hiding this comment.
No, it's just that we don't handle the passed reminders logic on the front-end. The backend does it now. So I'm making the front compliant to whatever data.
It's more like a failsafe.
| @@ -33,6 +32,15 @@ | |||
| const customDueDate = ref<Date>() | |||
| const nowDate = ref(new Date()) | |||
There was a problem hiding this comment.
| const nowDate = ref(new Date()) | |
| const openedAt = ref(new Date()) |
There was a problem hiding this comment.
I don't think that's really necessary 😛
| id="set-custom-reminder" | ||
| v-model="customDueDate" | ||
| :label="t('files_reminders', 'Reminder at custom date & time')" | ||
| :min="nowDate" |
There was a problem hiding this comment.
| :min="openedAt" |
Co-authored-by: Josh <josh.t.richards@gmail.com> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
|
/compile rebase |
Summary
This PR solved two logic issues
Checklist
3. to review, feature component)stable32)AI (if applicable)