diff --git a/src/lib/components/input/Switch.svelte b/src/lib/components/input/Switch.svelte
index e9412747..10bca9ce 100644
--- a/src/lib/components/input/Switch.svelte
+++ b/src/lib/components/input/Switch.svelte
@@ -27,7 +27,7 @@
last:rounded-r-lg last:border-r last:dark:border-r-transparent
rounded-l-none
rounded-r-none
- px-3 py-1.5 text-sm hover:brightness-110
+ px-3 py-1.5 text-sm hover:brightness-110 ${$$props.buttonClass || ''}
${
!selected
? `hover:dark:bg-zinc-800 border-slate-100 border-t border-b border-b-slate-300 dark:border-b-0
diff --git a/src/lib/components/lemmy/post/PostActions.svelte b/src/lib/components/lemmy/post/PostActions.svelte
index f4c0bf20..42e21f19 100644
--- a/src/lib/components/lemmy/post/PostActions.svelte
+++ b/src/lib/components/lemmy/post/PostActions.svelte
@@ -13,6 +13,8 @@
Eye,
EyeSlash,
Flag,
+ GlobeAlt,
+ Home,
Icon,
Language,
Newspaper,
@@ -48,14 +50,17 @@
MenuDivider,
Modal,
Spinner,
+ toast,
} from 'mono-svelte'
import { fediseer, type Data } from '$lib/fediseer/fediseer'
import Fediseer from '$lib/fediseer/Fediseer.svelte'
import { t } from '$lib/translations'
import { text } from '$lib/components/translate/translation'
import Translation from '$lib/components/translate/Translation.svelte'
- import { hidePost } from './helpers'
+ import { hidePost, postLink } from './helpers'
import { feature } from '$lib/version'
+ import Switch from '$lib/components/input/Switch.svelte'
+ import { instanceToURL } from '$lib/util'
export let post: PostView
@@ -70,6 +75,8 @@
let fediseerLoading = false
let translating = false
+
+ let localShare = false
{#if fediseerData}
@@ -252,12 +259,33 @@
{
navigator.share?.({
- url: post.post.ap_id,
- }) ?? navigator.clipboard.writeText(post.post.ap_id)
+ url: localShare
+ ? `${instanceToURL(getInstance())}/post/${post.post.id}`
+ : post.post.ap_id,
+ }) ??
+ navigator.clipboard.writeText(
+ localShare
+ ? `${instanceToURL(getInstance())}/post/${post.post.id}`
+ : post.post.ap_id
+ )
+ toast({ content: $t('toast.copied') })
}}
+ class="flex-1 py-0"
>
{$t('post.actions.more.share')}
+ {#if !post.post.local}
+
+ {/if}
{#if post.post.body && $userSettings.translator}