diff --git a/src/lib/components/input/SelectMenu.svelte b/src/lib/components/input/SelectMenu.svelte index d1e61f08..2644aeeb 100644 --- a/src/lib/components/input/SelectMenu.svelte +++ b/src/lib/components/input/SelectMenu.svelte @@ -14,14 +14,14 @@ optionNames.set(null, 'None') - + diff --git a/src/lib/components/lemmy/Post.svelte b/src/lib/components/lemmy/Post.svelte index e6b7b7af..10040dd1 100644 --- a/src/lib/components/lemmy/Post.svelte +++ b/src/lib/components/lemmy/Post.svelte @@ -22,35 +22,13 @@ import { page } from '$app/stores' import Avatar from '$lib/components/ui/Avatar.svelte' import Link from '$lib/components/input/Link.svelte' + import PostActions from '$lib/components/lemmy/PostActions.svelte' let postRes: PostView export { postRes as post } - - async function deletePost() { - if (!$authData) return - - await getClient().deletePost({ - auth: $authData.token, - deleted: true, - post_id: postRes.post.id, - }) - } - - function youtubeToPiped(url: string): string { - const youtubeDomainsRegex = - /^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\//i - - if (youtubeDomainsRegex.test(url)) { - return url - .replace(youtubeDomainsRegex, '$1$2invidious.io.lol/') - .replace('www.', '') - } - - return url - } - + {/if} -
- - - - - - - - - Post Actions - { - navigator.clipboard.writeText( - `${$page.url.origin}/post/${getInstance()}/${postRes.post.id}` - ) - }} - > - - Copy Link - - {#if $user?.person.id == postRes.post.creator_id} - - - Delete - - {/if} - -
+
diff --git a/src/lib/components/lemmy/PostActions.svelte b/src/lib/components/lemmy/PostActions.svelte new file mode 100644 index 00000000..69c91bf9 --- /dev/null +++ b/src/lib/components/lemmy/PostActions.svelte @@ -0,0 +1,95 @@ + + +
+ + + + + + + + + Creator + + + {post.creator.name} + + + + {post.community.title} + +
+ Actions + { + navigator.clipboard.writeText( + `${$page.url.origin}/post/${getInstance()}/${post.post.id}` + ) + }} + > + + Copy Link + + {#if $user?.person.id == post.post.creator_id} + + + Delete + + {/if} +
+
diff --git a/src/lib/components/markdown/Markdown.svelte b/src/lib/components/markdown/Markdown.svelte index c8a2f953..64abe230 100644 --- a/src/lib/components/markdown/Markdown.svelte +++ b/src/lib/components/markdown/Markdown.svelte @@ -45,7 +45,11 @@ line-height: initial; } + .markdown :global(il) { + @apply my-1; + } + .markdown :global(blockquote) { - @apply border-l-2 border-black/20 dark:border-white/20 pl-2 my-1; + @apply border-l-2 border-black/20 dark:border-white/20 pl-2 my-1 h-max; } diff --git a/src/lib/components/ui/Navbar.svelte b/src/lib/components/ui/Navbar.svelte index 57c67698..644699fc 100644 --- a/src/lib/components/ui/Navbar.svelte +++ b/src/lib/components/ui/Navbar.svelte @@ -28,10 +28,10 @@