diff --git a/app.vue b/app.vue index ceed2cf..585b989 100644 --- a/app.vue +++ b/app.vue @@ -54,7 +54,7 @@ onUnmounted(() => { watchEffect(() => { const file = filesManager.getFile(selectedPath.value); - filesGridList.value = file?.isFolder ? file.content : []; + filesGridList.value = file?.content; selectedList.value = []; for (const selectedElement of document.querySelectorAll(".selectable.selected")) { diff --git a/components/tree-view.vue b/components/tree-view.vue index 7d3ca22..5fe11c5 100644 --- a/components/tree-view.vue +++ b/components/tree-view.vue @@ -2,35 +2,34 @@ import { CompressedFile } from 'libarchive.js/src/compressed-file'; interface Props { - filesList: (File | CompressedFile) & { name: string, path: string, toggle: Boolean, isFolder: Boolean, content: any, active: boolean } [], + filesList: (File | CompressedFile) & { name: string, path: string, toggle: Boolean, isFolder: Boolean, content: any, active: boolean }[], nav: boolean } -let {filesList, nav} = defineProps() +let { filesList, nav } = defineProps() let selectedPath = useSelectedPath();