Skip to content

Commit

Permalink
fix(revisions) - replaced datetime object to with a current Date obje…
Browse files Browse the repository at this point in the history
…ct on click

Signed-off-by: Eduardo Morales <[email protected]>
  • Loading branch information
emoral435 committed Nov 27, 2023
1 parent 87f1c7c commit 488ded0
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 15 deletions.
1 change: 0 additions & 1 deletion apps/files/src/components/FileEntry/FileEntryActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'

import CustomElementRender from '../CustomElementRender.vue'
import logger from '../../logger.js'
import type { LogLevel } from '@nextcloud/logger'

// The registered actions list
const actions = getFileActions()
Expand Down
10 changes: 3 additions & 7 deletions apps/files_reminders/src/actions/setReminderSuggestionActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,11 @@ const nextWeek: ReminderOption = {
* @return The file action or null if the option should not be shown
*/
const generateFileAction = (option: ReminderOption): FileAction|null => {
const dateTime = getDateTime(option.dateTimePreset)
if (!dateTime) {
return null
}

return new FileAction({
id: `set-reminder-${option.dateTimePreset}`,
displayName: () => `${option.label}${getDateString(dateTime)}`,
title: () => `${option.ariaLabel}${getVerboseDateString(dateTime)}`,
displayName: () => `${option.label}${getDateString(getDateTime(option.dateTimePreset)!)}`,
title: () => `${option.ariaLabel}${getVerboseDateString(getDateTime(option.dateTimePreset)!)}`,

// Empty svg to hide the icon
iconSvgInline: () => '<svg></svg>',
Expand All @@ -96,7 +92,7 @@ const generateFileAction = (option: ReminderOption): FileAction|null => {

// Set the reminder
try {
await setReminder(node.fileid, dateTime)
await setReminder(node.fileid, getDateTime(option.dateTimePreset)!)
showSuccess(t('files_reminders', 'Reminder set for "{fileName}"', { fileName: node.basename }))
} catch (error) {
logger.error('Failed to set reminder', { error })
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_reminders-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_reminders-init.js.map

Large diffs are not rendered by default.

0 comments on commit 488ded0

Please sign in to comment.