3030 </VirtualList >
3131</template >
3232
33- <script >
33+ <script setup lang="ts" >
3434import { t } from ' @nextcloud/l10n'
35+ import { computed } from ' vue'
3536
3637import FileEntry from ' ./FileEntry/FileEntry.vue'
3738import FileEntryGrid from ' ./FileEntry/FileEntryGrid.vue'
@@ -45,58 +46,22 @@ import { useFilesStore } from '../../store/files.js'
4546import { useSelectionStore } from ' ../../store/selection.js'
4647import { useUserConfigStore } from ' ../../store/userconfig.js'
4748
48- export default {
49+ defineOptions ( {
4950 name: ' FilesListVirtual' ,
50- components: {
51- VirtualList,
52- // eslint-disable-next-line vue/no-unused-components
53- FileEntry ,
54- // eslint-disable-next-line vue/no-unused-components
55- FileEntryGrid,
56- FileListFilterChips,
57- FilesListTableFooter,
58- FilesListTableHeader,
59- FilesListTableHeaderActions,
60- },
61- props: {
62- nodes: {
63- type: Array ,
64- required: true ,
65- },
66- loading: {
67- type: Boolean ,
68- required: true ,
69- },
70- },
71- setup () {
72- const filesStore = useFilesStore ()
73- const selectionStore = useSelectionStore ()
74- const userConfigStore = useUserConfigStore ()
75- return {
76- t,
77- filesStore,
78- selectionStore,
79- userConfigStore,
80- }
81- },
82- data () {
83- return {
84- FileEntry ,
85- FileEntryGrid,
86- }
87- },
88- computed: {
89- selectedNodes () {
90- return this .selectionStore .selected
91- },
92- isNoneSelected () {
93- return this .selectedNodes .length === 0
94- },
95- caption () {
96- return t (' libresign' , ' List of files. Column headers with buttons are sortable.' )
97- },
98- },
99- }
51+ })
52+
53+ defineProps <{
54+ nodes: unknown []
55+ loading: boolean
56+ }>()
57+
58+ useFilesStore ()
59+ const selectionStore = useSelectionStore ()
60+ const userConfigStore = useUserConfigStore ()
61+
62+ const selectedNodes = computed (() => selectionStore .selected )
63+ const isNoneSelected = computed (() => selectedNodes .value .length === 0 )
64+ const caption = computed (() => t (' libresign' , ' List of files. Column headers with buttons are sortable.' ))
10065 </script >
10166
10267<style scoped lang="scss">
0 commit comments