diff --git a/app.vue b/app.vue index 0b86d50..2277829 100644 --- a/app.vue +++ b/app.vue @@ -11,18 +11,21 @@ Archive.init({ let display = useDisplay(); let drawer = ref(!display.xs.value); +let loadingModel = ref(false); let files = ref([]); let filesList = ref([]); let selectedItem = useSelectedItem(); +let filesGridList = ref([]) +let selectedList = ref([]) watchEffect(async () => { if (files.value?.[0]) { + loadingModel.value = true; filesList.value = []; const archive = await Archive.open(files.value[0]); - // console.log(await archive.getFilesObject()) let extractedFiles = await archive.getFilesObject(); let getContent = (fileList: any, path = ''): any => { @@ -39,6 +42,7 @@ watchEffect(async () => { filesList.value = getContent(extractedFiles)?.sort((a: any, b: any) => { return b.isFolder - a.isFolder }); + loadingModel.value = false; } }) @@ -89,9 +93,6 @@ function getFile(path: string, innerList = undefined): any { return undefined; } -let filesGridList = ref([]) -let selectedList = ref([]) - watchEffect(() => { filesGridList.value = getFile(selectedItem.value)?.content || []; selectedList.value = []; @@ -194,6 +195,22 @@ function onSelectEnd(e: any) { + + + + Please stand by + + + +