Skip to content

Commit

Permalink
fix(component): changed moment to date object for Nc Component using …
Browse files Browse the repository at this point in the history
…Node.mtime returned date object

Signed-off-by: Eduardo Morales <[email protected]>
  • Loading branch information
emoral435 committed Nov 9, 2023
1 parent 484c6b8 commit 5318d71
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions apps/files/src/components/FileEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-
-->

<template>
<template>
<tr :class="{'files-list__row--dragover': dragover, 'files-list__row--loading': isLoading}"
data-cy-files-list-row
:data-cy-files-list-row-fileid="fileid"
Expand Down Expand Up @@ -83,7 +83,7 @@
class="files-list__row-mtime"
data-cy-files-list-row-mtime
@click="openDetailsIfAvailable">
<NcDateTime :timestamp="mDateTime"/>
<NcDateTime :timestamp="this.source.mtime" :ignore-seconds="true" />
</td>

<!-- View columns -->
Expand Down Expand Up @@ -257,19 +257,6 @@ export default Vue.extend({
color: `color-mix(in srgb, var(--color-main-text) ${ratio}%, var(--color-text-maxcontrast))`,
}
},

mtime() {
if (this.source.mtime) {
return moment(this.source.mtime).fromNow()
}
return t('files_trashbin', 'A long time ago')
},
mDateTime() {
if (this.source.mtime) {
return moment(this.source.mtime)
}
return t('files_trashbin', 'A long time ago')
},
mtimeOpacity() {
const maxOpacityTime = 31 * 24 * 60 * 60 * 1000 // 31 days

Expand Down

0 comments on commit 5318d71

Please sign in to comment.