From 6b0d49b1fc8bdce89576ba91cc0b8ec594fcd625 Mon Sep 17 00:00:00 2001 From: monkeyWie Date: Thu, 25 Jun 2020 15:37:13 +0800 Subject: [PATCH] feat: add image thumbnails support (#980) * set max image preview size to 1080x1080px --- frontend/src/components/files/ListingItem.vue | 10 +- frontend/src/components/files/Preview.vue | 8 +- frontend/src/css/listing.css | 12 +++ go.mod | 1 + go.sum | 4 + http/http.go | 1 + http/preview.go | 94 +++++++++++++++++++ http/raw.go | 16 ++-- 8 files changed, 137 insertions(+), 9 deletions(-) create mode 100644 http/preview.go diff --git a/frontend/src/components/files/ListingItem.vue b/frontend/src/components/files/ListingItem.vue index 7826d49a..2eca5779 100644 --- a/frontend/src/components/files/ListingItem.vue +++ b/frontend/src/components/files/ListingItem.vue @@ -13,7 +13,8 @@ :aria-label="name" :aria-selected="isSelected">
- {{ icon }} + + {{ icon }}
@@ -30,6 +31,7 @@