From af8a96344553ffba2c5fb8f505561c86cd252636 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Sun, 27 Aug 2023 12:10:26 -0700 Subject: [PATCH] feat: use share and link to original post, close #129 --- src/lib/components/lemmy/post/PostActions.svelte | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lib/components/lemmy/post/PostActions.svelte b/src/lib/components/lemmy/post/PostActions.svelte index c4766153..dbf1ef08 100644 --- a/src/lib/components/lemmy/post/PostActions.svelte +++ b/src/lib/components/lemmy/post/PostActions.svelte @@ -158,13 +158,14 @@ {/if} - navigator.clipboard.writeText( - `https://${getInstance()}/post/${post.post.id}` - )} + on:click={() => { + navigator.share?.({ + url: post.post.ap_id, + }) ?? navigator.clipboard.writeText(post.post.ap_id) + }} > - Copy Link + Share {#if $profile?.jwt}