diff --git a/src/lib/components/lemmy/SiteCard.svelte b/src/lib/components/lemmy/SiteCard.svelte index f1006b56..e5fd3a7e 100644 --- a/src/lib/components/lemmy/SiteCard.svelte +++ b/src/lib/components/lemmy/SiteCard.svelte @@ -32,7 +32,12 @@
{#if site.site.icon} - + {/if}

{site.site.name}

diff --git a/src/lib/components/ui/ExpandableImage.svelte b/src/lib/components/ui/ExpandableImage.svelte index e7a63135..b0aa521f 100644 --- a/src/lib/components/ui/ExpandableImage.svelte +++ b/src/lib/components/ui/ExpandableImage.svelte @@ -12,7 +12,7 @@ import { page } from '$app/stores' import { Button } from 'mono-svelte' import { Icon, XMark } from 'svelte-hero-icons' - import { expoOut } from 'svelte/easing' + import { backOut, expoOut } from 'svelte/easing' import { fade, scale } from 'svelte/transition' /** @@ -40,7 +40,7 @@ height={400} src={$page.state.openImage} class="w-full h-auto object-contain max-w-screen-sm mx-auto my-auto overscroll-contain bg-white dark:bg-zinc-900" - transition:scale={{ start: 0.9, easing: expoOut }} + transition:scale={{ start: 0.9, easing: backOut }} {alt} />
diff --git a/src/routes/post/[instance]/[id=integer]/+page.svelte b/src/routes/post/[instance]/[id=integer]/+page.svelte index 3c0def71..4e4dd529 100644 --- a/src/routes/post/[instance]/[id=integer]/+page.svelte +++ b/src/routes/post/[instance]/[id=integer]/+page.svelte @@ -15,30 +15,17 @@ ArrowLeft, ArrowPath, ChevronDoubleUp, - ExclamationTriangle, Icon, InformationCircle, - Plus, + Home, } from 'svelte-hero-icons' import PostLink from '$lib/components/lemmy/post/PostLink.svelte' import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte' - import { - Badge, - Disclosure, - Material, - Select, - Spinner, - removeToast, - toast, - } from 'mono-svelte' + import { Material, Select, removeToast, toast } from 'mono-svelte' import type { CommentSortType } from 'lemmy-js-client' - import MultiSelect from '$lib/components/input/Switch.svelte' import { profile } from '$lib/auth.js' import { instance } from '$lib/instance.js' import { afterNavigate, goto } from '$app/navigation' - import CommunityLink from '$lib/components/lemmy/community/CommunityLink.svelte' - import Link from '$lib/components/input/Link.svelte' - import SectionTitle from '$lib/components/ui/SectionTitle.svelte' import FormattedNumber from '$lib/components/util/FormattedNumber.svelte' import { Button } from 'mono-svelte' import EndPlaceholder from '$lib/components/ui/EndPlaceholder.svelte' @@ -54,6 +41,7 @@ import Post from '$lib/components/lemmy/post/Post.svelte' import Expandable from '$lib/components/ui/Expandable.svelte' import { addResumable } from '$lib/lemmy/item.js' + import { Popover } from 'mono-svelte' export let data @@ -74,17 +62,6 @@ afterNavigate(async () => { // reactivity hack post = data.post - - if ($page.params.instance.toLowerCase() != $instance.toLowerCase()) { - if (!$profile?.jwt) return - toast({ - content: 'Do you want to open this post on your home instance?', - action: () => { - if ($profile?.jwt) fetchOnHome($profile.jwt) - }, - duration: 9999 * 1000, - }) - } if ($profile) { addResumable({ avatar: post.post_view.post.thumbnail_url @@ -144,6 +121,9 @@ } let commenting = false + + $: remoteView = + $page.params.instance?.toLowerCase() != $instance.toLowerCase() @@ -164,23 +144,43 @@ {/if} -
- {#if $page.params.instance?.toLowerCase() != $instance.toLowerCase()} - + {#if remoteView} + {/if}
@@ -280,8 +280,8 @@ flex-wrap gap-4 sticky top-20 w-full box-border z-20 mt-4" elevation="max" padding="none" color="distinct" - class="py-2 px-4 text-sm flex flex-row justify-between items-center - flex-wrap gap-4 sticky top-20 w-full box-border z-20 mt-4" + class="py-2 px-4 text-sm flex sm:flex-row justify-between items-center + sm:gap-4 sticky top-20 w-full box-border z-20 mt-4 flex-col gap-2" >