|
@@ -12,7 +12,7 @@
|
|
isMtimeAvailable,
|
|
isMtimeAvailable,
|
|
isSizeAvailable,
|
|
isSizeAvailable,
|
|
nodes,
|
|
nodes,
|
|
- filesListWidth,
|
|
|
|
|
|
+ fileListWidth,
|
|
}"
|
|
}"
|
|
:scroll-to-index="scrollToIndex"
|
|
:scroll-to-index="scrollToIndex"
|
|
:caption="caption">
|
|
:caption="caption">
|
|
@@ -39,7 +39,7 @@
|
|
<template #header>
|
|
<template #header>
|
|
<!-- Table header and sort buttons -->
|
|
<!-- Table header and sort buttons -->
|
|
<FilesListTableHeader ref="thead"
|
|
<FilesListTableHeader ref="thead"
|
|
- :files-list-width="filesListWidth"
|
|
|
|
|
|
+ :files-list-width="fileListWidth"
|
|
:is-mtime-available="isMtimeAvailable"
|
|
:is-mtime-available="isMtimeAvailable"
|
|
:is-size-available="isSizeAvailable"
|
|
:is-size-available="isSizeAvailable"
|
|
:nodes="nodes" />
|
|
:nodes="nodes" />
|
|
@@ -48,7 +48,7 @@
|
|
<!-- Tfoot-->
|
|
<!-- Tfoot-->
|
|
<template #footer>
|
|
<template #footer>
|
|
<FilesListTableFooter :current-view="currentView"
|
|
<FilesListTableFooter :current-view="currentView"
|
|
- :files-list-width="filesListWidth"
|
|
|
|
|
|
+ :files-list-width="fileListWidth"
|
|
:is-mtime-available="isMtimeAvailable"
|
|
:is-mtime-available="isMtimeAvailable"
|
|
:is-size-available="isSizeAvailable"
|
|
:is-size-available="isSizeAvailable"
|
|
:nodes="nodes"
|
|
:nodes="nodes"
|
|
@@ -69,6 +69,7 @@ import { subscribe, unsubscribe } from '@nextcloud/event-bus'
|
|
import { defineComponent } from 'vue'
|
|
import { defineComponent } from 'vue'
|
|
|
|
|
|
import { action as sidebarAction } from '../actions/sidebarAction.ts'
|
|
import { action as sidebarAction } from '../actions/sidebarAction.ts'
|
|
|
|
+import { useFileListWidth } from '../composables/useFileListWidth.ts'
|
|
import { useRouteParameters } from '../composables/useRouteParameters.ts'
|
|
import { useRouteParameters } from '../composables/useRouteParameters.ts'
|
|
import { getSummaryFor } from '../utils/fileUtils'
|
|
import { getSummaryFor } from '../utils/fileUtils'
|
|
import { useSelectionStore } from '../store/selection.js'
|
|
import { useSelectionStore } from '../store/selection.js'
|
|
@@ -79,7 +80,6 @@ import FileEntryGrid from './FileEntryGrid.vue'
|
|
import FilesListHeader from './FilesListHeader.vue'
|
|
import FilesListHeader from './FilesListHeader.vue'
|
|
import FilesListTableFooter from './FilesListTableFooter.vue'
|
|
import FilesListTableFooter from './FilesListTableFooter.vue'
|
|
import FilesListTableHeader from './FilesListTableHeader.vue'
|
|
import FilesListTableHeader from './FilesListTableHeader.vue'
|
|
-import filesListWidthMixin from '../mixins/filesListWidth.ts'
|
|
|
|
import VirtualList from './VirtualList.vue'
|
|
import VirtualList from './VirtualList.vue'
|
|
import logger from '../logger.ts'
|
|
import logger from '../logger.ts'
|
|
import FilesListTableHeaderActions from './FilesListTableHeaderActions.vue'
|
|
import FilesListTableHeaderActions from './FilesListTableHeaderActions.vue'
|
|
@@ -97,10 +97,6 @@ export default defineComponent({
|
|
FilesListTableHeaderActions,
|
|
FilesListTableHeaderActions,
|
|
},
|
|
},
|
|
|
|
|
|
- mixins: [
|
|
|
|
- filesListWidthMixin,
|
|
|
|
- ],
|
|
|
|
-
|
|
|
|
props: {
|
|
props: {
|
|
currentView: {
|
|
currentView: {
|
|
type: View,
|
|
type: View,
|
|
@@ -119,10 +115,12 @@ export default defineComponent({
|
|
setup() {
|
|
setup() {
|
|
const userConfigStore = useUserConfigStore()
|
|
const userConfigStore = useUserConfigStore()
|
|
const selectionStore = useSelectionStore()
|
|
const selectionStore = useSelectionStore()
|
|
|
|
+ const fileListWidth = useFileListWidth()
|
|
const { fileId, openFile } = useRouteParameters()
|
|
const { fileId, openFile } = useRouteParameters()
|
|
|
|
|
|
return {
|
|
return {
|
|
fileId,
|
|
fileId,
|
|
|
|
+ fileListWidth,
|
|
openFile,
|
|
openFile,
|
|
|
|
|
|
userConfigStore,
|
|
userConfigStore,
|
|
@@ -151,14 +149,14 @@ export default defineComponent({
|
|
|
|
|
|
isMtimeAvailable() {
|
|
isMtimeAvailable() {
|
|
// Hide mtime column on narrow screens
|
|
// Hide mtime column on narrow screens
|
|
- if (this.filesListWidth < 768) {
|
|
|
|
|
|
+ if (this.fileListWidth < 768) {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
return this.nodes.some(node => node.mtime !== undefined)
|
|
return this.nodes.some(node => node.mtime !== undefined)
|
|
},
|
|
},
|
|
isSizeAvailable() {
|
|
isSizeAvailable() {
|
|
// Hide size column on narrow screens
|
|
// Hide size column on narrow screens
|
|
- if (this.filesListWidth < 768) {
|
|
|
|
|
|
+ if (this.fileListWidth < 768) {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
return this.nodes.some(node => node.size !== undefined)
|
|
return this.nodes.some(node => node.size !== undefined)
|