From 6f0572fe291b0b3f9b30cf78675a5fc297014bef Mon Sep 17 00:00:00 2001 From: Gabriel Massadas Date: Fri, 17 May 2024 16:20:10 +0100 Subject: [PATCH] Allow to edit unsupported files types --- .../src/components/preview/FilePreview.vue | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/dashboard/src/components/preview/FilePreview.vue b/packages/dashboard/src/components/preview/FilePreview.vue index 86a20dd..ec6b8e2 100644 --- a/packages/dashboard/src/components/preview/FilePreview.vue +++ b/packages/dashboard/src/components/preview/FilePreview.vue @@ -110,8 +110,17 @@ - @@ -214,6 +223,12 @@ export default { } } } + + // Open unknown files as text + return { + type: "unknown", + downloadType: "text" + } }, async openFile(file) { console.log(file) @@ -251,6 +266,7 @@ export default { this.filename = file.name; this.file = file; this.open = true; + if (previewConfig) { this.type = previewConfig.type;