From ff16d2fa02cd25b94eebd4b0306f78080085440c Mon Sep 17 00:00:00 2001 From: Jeremy Wharton Date: Tue, 24 Oct 2023 12:14:34 -0500 Subject: [PATCH] web/satellite: implement .txt preview This change allows .txt files to be previewed in the legacy UI's file browser. References #6426 Change-Id: If0267695f07e6ea1738377527827c1e386fb668f --- .../galleryView/FilePreviewPlaceholder.vue | 60 ++++++++ .../browser/galleryView/GalleryView.vue | 129 ++++-------------- .../browser/galleryView/TextFilePreview.vue | 69 ++++++++++ web/satellite/src/types/browser.ts | 17 +++ .../filePreviewComponents/FilePreviewItem.vue | 20 +-- 5 files changed, 177 insertions(+), 118 deletions(-) create mode 100644 web/satellite/src/components/browser/galleryView/FilePreviewPlaceholder.vue create mode 100644 web/satellite/src/components/browser/galleryView/TextFilePreview.vue diff --git a/web/satellite/src/components/browser/galleryView/FilePreviewPlaceholder.vue b/web/satellite/src/components/browser/galleryView/FilePreviewPlaceholder.vue new file mode 100644 index 000000000..a703fdc27 --- /dev/null +++ b/web/satellite/src/components/browser/galleryView/FilePreviewPlaceholder.vue @@ -0,0 +1,60 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + + + diff --git a/web/satellite/src/components/browser/galleryView/GalleryView.vue b/web/satellite/src/components/browser/galleryView/GalleryView.vue index b761c86e6..74210e430 100644 --- a/web/satellite/src/components/browser/galleryView/GalleryView.vue +++ b/web/satellite/src/components/browser/galleryView/GalleryView.vue @@ -8,8 +8,8 @@