diff --git a/src/lib/feature/instance/InstanceCard.svelte b/src/lib/feature/instance/InstanceCard.svelte
index fe49c0a5..e912d44b 100644
--- a/src/lib/feature/instance/InstanceCard.svelte
+++ b/src/lib/feature/instance/InstanceCard.svelte
@@ -38,7 +38,7 @@
diff --git a/src/lib/feature/post/actions/PostActionsMenu.svelte b/src/lib/feature/post/actions/PostActionsMenu.svelte
index 880277bd..4f4384d2 100644
--- a/src/lib/feature/post/actions/PostActionsMenu.svelte
+++ b/src/lib/feature/post/actions/PostActionsMenu.svelte
@@ -17,7 +17,7 @@
Trash,
XMark,
} from 'svelte-hero-icons/dist'
- import type { PostFormInit } from '../form/postform.svelte'
+ import { type PostFormInit } from '../form/postform.svelte'
import { hidePost } from '../helpers'
interface Props {
@@ -27,6 +27,21 @@
}
let { post = $bindable(), onhide, editing = $bindable() }: Props = $props()
+
+ function crosspostB64() {
+ return JSON.stringify({
+ body: `${
+ settings.crosspostOriginalLink
+ ? `cross-posted from: ${post.post.ap_id}`
+ : ``
+ }\n${
+ post.post.body ? '>' + post.post.body.split('\n').join('\n> ') : ''
+ }`,
+ name: post.post.name,
+ url: post.post.url,
+ nsfw: post.post.nsfw,
+ } as PostFormInit)
+ }
{#if profile.current?.user && profile.current?.jwt && profile.current.user.local_user_view.person.id == post.creator.id}
@@ -49,20 +64,7 @@
{/if}
{#if profile.current?.jwt}
{$t('post.actions.more.crosspost')}
diff --git a/src/lib/ui/generic/EntityHeader.svelte b/src/lib/ui/generic/EntityHeader.svelte
index 7d6fcc3b..4a2c4138 100644
--- a/src/lib/ui/generic/EntityHeader.svelte
+++ b/src/lib/ui/generic/EntityHeader.svelte
@@ -8,11 +8,11 @@
import Blobs from './Blobs.svelte'
interface Props {
- avatar?: string | undefined
+ avatar?: string
name: string
- bio?: string | undefined
- banner?: string | undefined
- url?: string | undefined
+ bio?: string
+ banner?: string | null
+ url?: string
stats?: {
name: string
value: string | number
@@ -27,11 +27,11 @@
}
let {
- avatar = undefined,
+ avatar,
name,
- bio = undefined,
- banner = undefined,
- url = undefined,
+ bio,
+ banner,
+ url,
stats = [],
class: clazz = '',
nameDetail,
@@ -45,22 +45,24 @@
-
- {#if banner}
-

- {:else}
-
-
-
- {/if}
-
+ {#if banner !== null}
+
+ {#if banner}
+

+ {:else}
+
+
+
+ {/if}
+
+ {/if}
{#snippet icon(width: number)}
diff --git a/src/routes/create/post/+page.svelte b/src/routes/create/post/+page.svelte
index d691e20b..7e47c22e 100644
--- a/src/routes/create/post/+page.svelte
+++ b/src/routes/create/post/+page.svelte
@@ -23,9 +23,7 @@
let crosspost = $derived.by(() => {
const crosspostParam = page.url.searchParams.get('crosspost')
try {
- return crosspostParam
- ? JSON.parse(atob(crosspostParam) || '{}')
- : undefined
+ return crosspostParam ? JSON.parse(crosspostParam || '{}') : undefined
} catch {
return undefined
}