From 1ee9916970b33944596e061f8e2753677b3aafe8 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Sat, 14 May 2022 21:23:31 +0200 Subject: [PATCH] basic image opener --- web/contentType.ts | 4 ++-- web/opener/Image.svelte | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 web/opener/Image.svelte diff --git a/web/contentType.ts b/web/contentType.ts index 3be0cb1..1cea23b 100644 --- a/web/contentType.ts +++ b/web/contentType.ts @@ -1,7 +1,7 @@ export default function getComponentForShare(contentType: string, filename: string) { if (contentType.startsWith("image/")) { - return import("./opener/Default.svelte"); + return import("./opener/Image.svelte"); } if (contentType.startsWith("video/")) { @@ -40,7 +40,7 @@ export default function getComponentForShare(contentType: string, filename: stri case "jpg": case "jpeg": case "gif": - return import("./opener/Default.svelte"); + return import("./opener/Image.svelte"); case "mp4": case "mov": case "avi": diff --git a/web/opener/Image.svelte b/web/opener/Image.svelte new file mode 100644 index 0000000..99d808c --- /dev/null +++ b/web/opener/Image.svelte @@ -0,0 +1,14 @@ + + +shared + +