diff --git a/app.vue b/app.vue index 7e9a888..2a30a14 100644 --- a/app.vue +++ b/app.vue @@ -3,7 +3,7 @@ import { getElementInfo } from "moveable"; import { VueSelecto } from "vue3-selecto"; import { useDisplay } from 'vuetify/lib/framework.mjs'; import { HistoryManager } from './composables/history-manager'; -import { FilesManager } from './composables/files-manager'; +import { FilesManager, supportedExtensions } from './composables/files-manager'; import type { iFile } from "composables/worker/7zip-manager" import { videoExtensions, binaryExtensions } from '#imports'; @@ -19,13 +19,21 @@ let selectedList = ref([]); let filesManager = new FilesManager(filesList); let history = new HistoryManager(filesManager); let mediaBlobUrl = ref(''); +let errorDialog = ref(false); +let errorMessage = ref(''); watchEffect(async () => { if (files.value?.[0]) { loadingModel.value = true; filesList.value = []; - await filesManager.loadArchive(files.value?.[0]); + try { + await filesManager.loadArchive(files.value?.[0]); + } catch (error: any) { + errorMessage.value = error.message; + errorDialog.value = true; + files.value = []; + } loadingModel.value = false; } }) @@ -164,7 +172,7 @@ function stepUp(path: string) {