From dc764433ae6b2d9a746ff3adacdb150c16be7158 Mon Sep 17 00:00:00 2001 From: Salem Yaslem Date: Thu, 18 Jan 2024 03:49:12 +0300 Subject: [PATCH] support text editor (now it possible to view text files) --- app.vue | 14 +++++------ components/file-logo.vue | 27 ++++++++++++++++++++ components/text-editor.vue | 40 ++++++++++++++++++++++++++++++ components/tree-view.vue | 8 +++--- composables/files-manager.ts | 10 ++++++++ composables/states.ts | 2 ++ composables/worker/7zip-manager.ts | 19 +++++++++++++- package-lock.json | 16 ++++++++---- package.json | 3 ++- 9 files changed, 119 insertions(+), 20 deletions(-) create mode 100644 components/file-logo.vue create mode 100644 components/text-editor.vue diff --git a/app.vue b/app.vue index 638c72f..ce50a57 100644 --- a/app.vue +++ b/app.vue @@ -17,8 +17,6 @@ let filesGridList = ref([]) let selectedList = ref([]); let filesManager = new FilesManager(filesList); let history = new HistoryManager(filesManager); - -const videoExtensions = ['mp4', 'avi', 'mov', 'mkv']; let mediaBlobUrl = ref(''); watchEffect(async () => { @@ -27,7 +25,6 @@ watchEffect(async () => { filesList.value = []; await filesManager.loadArchive(files.value?.[0]); - loadingModel.value = false; } }) @@ -68,7 +65,6 @@ watchEffect(async () => { // Experimental feature if (videoExtensions.includes(filesManager.getFile(selectedPath.value)?.extension?.toLowerCase())) { mediaBlobUrl.value = await filesManager.getFileBlobUrl(selectedPath.value) as string; - console.log(mediaBlobUrl.value) } }) @@ -162,15 +158,13 @@ function stepUp(path: string) { -