From e4e98979fff54564f20e451bfdf7b05a7da4f11a Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 29 May 2023 14:10:00 +0200 Subject: Add PDF rendering via PDFObject (#24086) Use [PDFObject](https://pdfobject.com/) to embed PDFs, replacing our outdated PDF.js copy we vendor (the last non-webpack vendoring). [Commit 1](https://github.com/go-gitea/gitea/pull/24086/commits/673e0263da64b72565ff59b990ab1b8e87271872) is the PDFObject integration [Commit 2](https://github.com/go-gitea/gitea/pull/24086/commits/9336f5769d54445bba0e16776164f6a2fe2c32ac) is the removal of PDF.js Screenshot 2023-05-27 at 09 57 52 Screenshot 2023-05-27 at 10 12 50 Fallback for unsupporting browsers (most mobile ones, except Firefox Mobile): Screenshot 2023-05-27 at 09 43 34 --------- Co-authored-by: Giteabot --- templates/repo/settings/lfs_file.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/repo/settings') diff --git a/templates/repo/settings/lfs_file.tmpl b/templates/repo/settings/lfs_file.tmpl index d38cf32d24..de6f0100f8 100644 --- a/templates/repo/settings/lfs_file.tmpl +++ b/templates/repo/settings/lfs_file.tmpl @@ -19,7 +19,7 @@ {{else if .IsPlainText}}
{{if .FileContent}}{{.FileContent | Safe}}{{end}}
{{else if not .IsTextFile}} -
+
{{if .IsImageFile}} {{else if .IsVideoFile}} @@ -31,7 +31,7 @@ {{.locale.Tr "repo.audio_not_supported_in_browser"}} {{else if .IsPDFFile}} - +
{{else}} {{.locale.Tr "repo.file_view_raw"}} {{end}} -- cgit v1.2.3