aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src/components/FileEntryGrid.vue
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/src/components/FileEntryGrid.vue')
-rw-r--r--apps/files/src/components/FileEntryGrid.vue34
1 files changed, 29 insertions, 5 deletions
diff --git a/apps/files/src/components/FileEntryGrid.vue b/apps/files/src/components/FileEntryGrid.vue
index 8238c1a53d1..1bd0572f53b 100644
--- a/apps/files/src/components/FileEntryGrid.vue
+++ b/apps/files/src/components/FileEntryGrid.vue
@@ -17,7 +17,7 @@
@dragend="onDragEnd"
@drop="onDrop">
<!-- Failed indicator -->
- <span v-if="source.attributes.failed" class="files-list__row--failed" />
+ <span v-if="isFailedSource" class="files-list__row--failed" />
<!-- Checkbox -->
<FileEntryCheckbox :fileid="fileid"
@@ -36,9 +36,8 @@
@click.native="execDefaultAction" />
<FileEntryName ref="name"
- :display-name="displayName"
+ :basename="basename"
:extension="extension"
- :files-list-width="filesListWidth"
:grid-mode="true"
:nodes="nodes"
:source="source"
@@ -46,12 +45,21 @@
@click.native="execDefaultAction" />
</td>
+ <!-- Mtime -->
+ <td v-if="!compact && isMtimeAvailable"
+ :style="mtimeOpacity"
+ class="files-list__row-mtime"
+ data-cy-files-list-row-mtime
+ @click="openDetailsIfAvailable">
+ <NcDateTime v-if="mtime"
+ ignore-seconds
+ :timestamp="mtime" />
+ </td>
+
<!-- Actions -->
<FileEntryActions ref="actions"
:class="`files-list__row-actions-${uniqueId}`"
- :files-list-width="filesListWidth"
:grid-mode="true"
- :loading.sync="loading"
:opened.sync="openedMenu"
:source="source" />
</tr>
@@ -60,6 +68,10 @@
<script lang="ts">
import { defineComponent } from 'vue'
+import NcDateTime from '@nextcloud/vue/components/NcDateTime'
+
+import { useNavigation } from '../composables/useNavigation.ts'
+import { useRouteParameters } from '../composables/useRouteParameters.ts'
import { useActionsMenuStore } from '../store/actionsmenu.ts'
import { useDragAndDropStore } from '../store/dragging.ts'
import { useFilesStore } from '../store/files.ts'
@@ -79,6 +91,7 @@ export default defineComponent({
FileEntryCheckbox,
FileEntryName,
FileEntryPreview,
+ NcDateTime,
},
mixins: [
@@ -93,12 +106,23 @@ export default defineComponent({
const filesStore = useFilesStore()
const renamingStore = useRenamingStore()
const selectionStore = useSelectionStore()
+ // The file list is guaranteed to be only shown with active view - thus we can set the `loaded` flag
+ const { currentView } = useNavigation(true)
+ const {
+ directory: currentDir,
+ fileId: currentFileId,
+ } = useRouteParameters()
+
return {
actionsMenuStore,
draggingStore,
filesStore,
renamingStore,
selectionStore,
+
+ currentDir,
+ currentFileId,
+ currentView,
}
},