diff --git a/package.json b/package.json index 46dce3fe..80c507e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "photon-lemmy", - "version": "1.17.4", + "version": "1.18.0", "private": true, "scripts": { "dev": "vite dev", diff --git a/src/app.d.ts b/src/app.d.ts index bfb8b890..444fc238 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,4 +1,7 @@ // See https://kit.svelte.dev/docs/types#app + +import type { ComponentType, SvelteComponent } from 'svelte' + // for information about these interfaces declare global { namespace App { @@ -6,7 +9,14 @@ declare global { interface Locals { instance?: string } - // interface PageData {} + interface PageData { + slots?: { + sidebar?: { + component?: ComponentType + props?: any + } + } + } // interface Platform {} } declare const __VERSION__: string diff --git a/src/lib/auth.ts b/src/lib/auth.ts index 0b92e4f7..3f081c67 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -253,8 +253,8 @@ instance.subscribe(async (i) => { export async function setUserID(id: number) { const pd = get(profileData) if (id == -1) { - instance.set(DEFAULT_INSTANCE_URL) resetProfile() + instance.set(DEFAULT_INSTANCE_URL) return } diff --git a/src/lib/components/lemmy/SiteCard.svelte b/src/lib/components/lemmy/SiteCard.svelte index 6be6de09..2004f40b 100644 --- a/src/lib/components/lemmy/SiteCard.svelte +++ b/src/lib/components/lemmy/SiteCard.svelte @@ -25,7 +25,7 @@ export let version: string | undefined = undefined - +
{#if site.site.icon} @@ -59,20 +59,19 @@
-
- - diff --git a/src/lib/components/lemmy/community/CommunityCard.svelte b/src/lib/components/lemmy/community/CommunityCard.svelte index bf8fa565..90fef8f6 100644 --- a/src/lib/components/lemmy/community/CommunityCard.svelte +++ b/src/lib/components/lemmy/community/CommunityCard.svelte @@ -141,18 +141,21 @@ {/if} - +

{community_view.community.title}

- + !{community_view.community.name}@{new URL( community_view.community.actor_id ).hostname} @@ -209,7 +212,6 @@
@@ -76,13 +76,13 @@ @media (min-width: 1280px) { .content { - grid-template-columns: 1fr 3fr 1fr; + grid-template-columns: 20% 1fr 20%; justify-items: end center start; grid-template-areas: 'sidebar main suffix'; } } .limit-width { - max-width: 96rem; + max-width: 100rem; } diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 5b8bcb39..4dc9abcb 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -112,7 +112,13 @@
- {#if $site} + {#if $page.data.slots?.sidebar?.component} + + {:else if $site}