diff options
author | Eduardo Morales <emoral435@gmail.com> | 2023-11-16 15:35:18 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 15:35:18 -0600 |
commit | 9a3d45b0ef169c2119e9a63115e3c3ec04fd45e3 (patch) | |
tree | 1dad45cdc1adafe279db5d574b5a639cc27a0e48 /apps/files | |
parent | 179b7bb3cbcdce19218462c067469db32c73a150 (diff) | |
parent | 75796ba250b509db1dfa833ea98606afcc6a4713 (diff) | |
download | nextcloud-server-9a3d45b0ef169c2119e9a63115e3c3ec04fd45e3.tar.gz nextcloud-server-9a3d45b0ef169c2119e9a63115e3c3ec04fd45e3.zip |
Merge pull request #41334 from nextcloud/fix/mtime-render
fix(component): utilized NcDateTime component
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/src/components/FileEntry.vue | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/files/src/components/FileEntry.vue b/apps/files/src/components/FileEntry.vue index df18dcae016..e8d8d00d365 100644 --- a/apps/files/src/components/FileEntry.vue +++ b/apps/files/src/components/FileEntry.vue @@ -83,7 +83,7 @@ class="files-list__row-mtime" data-cy-files-list-row-mtime @click="openDetailsIfAvailable"> - <span>{{ mtime }}</span> + <NcDateTime :timestamp="source.mtime" :ignore-seconds="true" /> </td> <!-- View columns --> @@ -122,6 +122,7 @@ import { useDragAndDropStore } from '../store/dragging.ts' import { useFilesStore } from '../store/files.ts' import { useRenamingStore } from '../store/renaming.ts' import { useSelectionStore } from '../store/selection.ts' +import NcDateTime from '@nextcloud/vue/dist/Components/NcDateTime.js' import CustomElementRender from './CustomElementRender.vue' import FileEntryActions from './FileEntry/FileEntryActions.vue' import FileEntryCheckbox from './FileEntry/FileEntryCheckbox.vue' @@ -140,6 +141,7 @@ export default Vue.extend({ FileEntryCheckbox, FileEntryName, FileEntryPreview, + NcDateTime, }, props: { @@ -255,13 +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') - }, mtimeOpacity() { const maxOpacityTime = 31 * 24 * 60 * 60 * 1000 // 31 days |