1212 isMtimeAvailable,
1313 isSizeAvailable,
1414 nodes,
15- filesListWidth ,
15+ fileListWidth ,
1616 }"
1717 :scroll-to-index =" scrollToIndex"
1818 :caption =" caption" >
3939 <template #header >
4040 <!-- Table header and sort buttons -->
4141 <FilesListTableHeader ref =" thead"
42- :files-list-width =" filesListWidth "
42+ :files-list-width =" fileListWidth "
4343 :is-mtime-available =" isMtimeAvailable"
4444 :is-size-available =" isSizeAvailable"
4545 :nodes =" nodes" />
4848 <!-- Tfoot-->
4949 <template #footer >
5050 <FilesListTableFooter :current-view =" currentView"
51- :files-list-width =" filesListWidth "
51+ :files-list-width =" fileListWidth "
5252 :is-mtime-available =" isMtimeAvailable"
5353 :is-size-available =" isSizeAvailable"
5454 :nodes =" nodes"
@@ -69,6 +69,7 @@ import { subscribe, unsubscribe } from '@nextcloud/event-bus'
6969import { defineComponent } from ' vue'
7070
7171import { action as sidebarAction } from ' ../actions/sidebarAction.ts'
72+ import { useFileListWidth } from ' ../composables/useFileListWidth.ts'
7273import { useRouteParameters } from ' ../composables/useRouteParameters.ts'
7374import { getSummaryFor } from ' ../utils/fileUtils'
7475import { useSelectionStore } from ' ../store/selection.js'
@@ -79,7 +80,6 @@ import FileEntryGrid from './FileEntryGrid.vue'
7980import FilesListHeader from ' ./FilesListHeader.vue'
8081import FilesListTableFooter from ' ./FilesListTableFooter.vue'
8182import FilesListTableHeader from ' ./FilesListTableHeader.vue'
82- import filesListWidthMixin from ' ../mixins/filesListWidth.ts'
8383import VirtualList from ' ./VirtualList.vue'
8484import logger from ' ../logger.ts'
8585import FilesListTableHeaderActions from ' ./FilesListTableHeaderActions.vue'
@@ -97,10 +97,6 @@ export default defineComponent({
9797 FilesListTableHeaderActions ,
9898 },
9999
100- mixins: [
101- filesListWidthMixin ,
102- ],
103-
104100 props: {
105101 currentView: {
106102 type: View ,
@@ -119,10 +115,12 @@ export default defineComponent({
119115 setup() {
120116 const userConfigStore = useUserConfigStore ()
121117 const selectionStore = useSelectionStore ()
118+ const fileListWidth = useFileListWidth ()
122119 const { fileId, openFile } = useRouteParameters ()
123120
124121 return {
125122 fileId ,
123+ fileListWidth ,
126124 openFile ,
127125
128126 userConfigStore ,
@@ -151,14 +149,14 @@ export default defineComponent({
151149
152150 isMtimeAvailable() {
153151 // Hide mtime column on narrow screens
154- if (this .filesListWidth < 768 ) {
152+ if (this .fileListWidth < 768 ) {
155153 return false
156154 }
157155 return this .nodes .some (node => node .mtime !== undefined )
158156 },
159157 isSizeAvailable() {
160158 // Hide size column on narrow screens
161- if (this .filesListWidth < 768 ) {
159+ if (this .fileListWidth < 768 ) {
162160 return false
163161 }
164162 return this .nodes .some (node => node .size !== undefined )
0 commit comments