From 949f0f277f6004904b3edfa716a8365ec93fa0fa Mon Sep 17 00:00:00 2001 From: niubility000 <76441520+niubility000@users.noreply.github.com> Date: Tue, 11 Jan 2022 00:01:21 +0800 Subject: [PATCH 1/2] fix: open all the pdf files correctly (#1742) --- files/file.go | 3 +++ frontend/src/components/files/ListingItem.vue | 1 + 2 files changed, 4 insertions(+) diff --git a/files/file.go b/files/file.go index f05dacd6..36852f39 100644 --- a/files/file.go +++ b/files/file.go @@ -219,6 +219,9 @@ func (i *FileInfo) detectType(modify, saveContent, readHeader bool) error { case strings.HasPrefix(mimetype, "image"): i.Type = "image" return nil + case strings.HasSuffix(mimetype, "pdf"): + i.Type = "pdf" + return nil case (strings.HasPrefix(mimetype, "text") || !isBinary(buffer)) && i.Size <= 10*1024*1024: // 10 MB i.Type = "text" diff --git a/frontend/src/components/files/ListingItem.vue b/frontend/src/components/files/ListingItem.vue index bb374ec4..32753c84 100644 --- a/frontend/src/components/files/ListingItem.vue +++ b/frontend/src/components/files/ListingItem.vue @@ -72,6 +72,7 @@ export default { if (this.type === "image") return "insert_photo"; if (this.type === "audio") return "volume_up"; if (this.type === "video") return "movie"; + if (this.type === "pdf") return "picture_as_pdf"; return "insert_drive_file"; }, isDraggable() { From 205f11d67713bc0d5f285eceedaac05fb9f08e79 Mon Sep 17 00:00:00 2001 From: on4r Date: Tue, 11 Jan 2022 21:23:46 +0100 Subject: [PATCH 2/2] chore: rotate the spinner clockwise (#1765) --- frontend/src/css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/css/styles.css b/frontend/src/css/styles.css index 5bcfe703..8aa713d5 100644 --- a/frontend/src/css/styles.css +++ b/frontend/src/css/styles.css @@ -365,7 +365,7 @@ main .spinner .bounce2 { @keyframes spin { 100% { - transform: rotate(-360deg); + transform: rotate(360deg); } }