summaryrefslogtreecommitdiffstats
path: root/apps/files/src/components
diff options
context:
space:
mode:
authorEduardo Morales <emoral435@gmail.com>2023-11-09 11:32:26 -0600
committerEduardo Morales <emoral435@gmail.com>2023-11-16 14:33:10 -0600
commit59e75d73bea53e210dfd3f553711e01a0fcc4991 (patch)
tree8b4fe29be3a0fce9a791e81e9676e92871bb4539 /apps/files/src/components
parent3b48af212244fa48a8e8864181da4794d2eabb52 (diff)
downloadnextcloud-server-59e75d73bea53e210dfd3f553711e01a0fcc4991.tar.gz
nextcloud-server-59e75d73bea53e210dfd3f553711e01a0fcc4991.zip
fix(component): changed moment to date object for Nc Component using Node.mtime returned date object
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
Diffstat (limited to 'apps/files/src/components')
-rw-r--r--apps/files/src/components/FileEntry.vue17
1 files changed, 2 insertions, 15 deletions
diff --git a/apps/files/src/components/FileEntry.vue b/apps/files/src/components/FileEntry.vue
index 31400b95dfc..461055bde7f 100644
--- a/apps/files/src/components/FileEntry.vue
+++ b/apps/files/src/components/FileEntry.vue
@@ -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"
@@ -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 -->
@@ -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