From db3a257ecda8632b6cbe7663cf94a51d17d8d401 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Wed, 8 Jun 2022 12:02:09 +0200 Subject: [PATCH] added PDF opener --- web/contentType.ts | 8 ++++---- web/opener/PDF.svelte | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 web/opener/PDF.svelte diff --git a/web/contentType.ts b/web/contentType.ts index 1cea23b..f4ac6bc 100644 --- a/web/contentType.ts +++ b/web/contentType.ts @@ -13,7 +13,7 @@ export default function getComponentForShare(contentType: string, filename: stri } if (contentType.startsWith("application/pdf")) { - return import("./opener/Default.svelte"); + return import("./opener/PDF.svelte"); } if (contentType.startsWith("text/")) { @@ -25,7 +25,7 @@ export default function getComponentForShare(contentType: string, filename: stri case "application/ld+json": case "application/xhtml+xml": case "application/xml": - return import("./opener/Default.svelte"); + return import("./opener/Text.svelte"); case "application/ogg": return import("./opener/Default.svelte"); } @@ -56,13 +56,13 @@ export default function getComponentForShare(contentType: string, filename: stri case "flac": return import("./opener/Default.svelte"); case "pdf": - return import("./opener/Default.svelte"); + return import("./opener/PDF.svelte"); case "txt": case "md": case "markdown": return import("./opener/Default.svelte"); } - return import("./opener/Text.svelte"); + return import("./opener/Default.svelte"); } diff --git a/web/opener/PDF.svelte b/web/opener/PDF.svelte new file mode 100644 index 0000000..9774880 --- /dev/null +++ b/web/opener/PDF.svelte @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file