- {#if isRepost}
-
- {#if repostKinds.includes(event.kind)}
-
-
-
- {event.kind === 6 ? 'Reposted content:' : 'Generic reposted content:'}
-
- {@render repostContent(event.content)}
-
- {:else if event.kind === 1 && event.getMatchingTags("q").length > 0}
-
-
-
- Quote repost:
+
+ {#if isRepost}
+
+ {#if repostKinds.includes(event.kind)}
+
+
+
+ {event.kind === 6 ? 'Reposted content:' : 'Generic reposted content:'}
+
+ {@render repostContent(event.content)}
- {@render quotedContent(event, [], ndk)}
- {#if content}
-
-
- Added comment:
-
- {#if repostKinds.includes(kind)}
- {@html content}
- {:else}
- {@render basicMarkup(content, ndk)}
- {/if}
+ {:else if event.kind === 1 && event.getMatchingTags("q").length > 0}
+
+
+
+ Quote repost:
+ {@render quotedContent(event, [], ndk)}
+ {#if content}
+
+
+ Added comment:
+
+ {#if repostKinds.includes(kind)}
+ {@html content}
+ {:else}
+ {@render basicMarkup(content, ndk)}
+ {/if}
+
+ {/if}
+
+ {/if}
+ {:else}
+
+
+ {#if repostKinds.includes(kind)}
+ {@html content}
+ {:else}
+ {@render basicMarkup(content, ndk)}
{/if}
- {/if}
- {:else}
-
-
- {#if repostKinds.includes(kind)}
- {@html content}
- {:else}
- {@render basicMarkup(content, ndk)}
+ {#if shouldTruncate}
+
{/if}
-
- {#if shouldTruncate}
-
{/if}
- {/if}
diff --git a/src/lib/components/publications/Publication.svelte b/src/lib/components/publications/Publication.svelte
index 4664ac6..346d1cc 100644
--- a/src/lib/components/publications/Publication.svelte
+++ b/src/lib/components/publications/Publication.svelte
@@ -7,7 +7,7 @@
SidebarGroup,
SidebarWrapper,
Heading,
- CloseButton,
+ CloseButton, uiHelpers
} from "flowbite-svelte";
import { getContext, onDestroy, onMount } from "svelte";
import {
@@ -143,6 +143,10 @@
let currentBlogEvent: null | NDKEvent = $state(null);
const isLeaf = $derived(indexEvent.kind === 30041);
+ const tocSidebarUi = uiHelpers();
+ const closeTocSidebar = tocSidebarUi.close;
+ const isTocOpen = $state($publicationColumnVisibility.toc);
+
function isInnerActive() {
return currentBlog !== null && $publicationColumnVisibility.inner;
}
@@ -249,16 +253,21 @@
{#if publicationType !== "blog" || !isLeaf}
- {#if $publicationColumnVisibility.toc}
- {/if}
{/if}
diff --git a/src/lib/components/publications/PublicationFeed.svelte b/src/lib/components/publications/PublicationFeed.svelte
index c353627..3f88bf2 100644
--- a/src/lib/components/publications/PublicationFeed.svelte
+++ b/src/lib/components/publications/PublicationFeed.svelte
@@ -680,7 +680,7 @@
>
{#if loading && eventsInView.length === 0}
{#each getSkeletonIds() as id}
-
+
{/each}
{:else if eventsInView.length > 0}
{#each eventsInView as event}
diff --git a/src/lib/components/publications/TableOfContents.svelte b/src/lib/components/publications/TableOfContents.svelte
index cacee90..aec65b4 100644
--- a/src/lib/components/publications/TableOfContents.svelte
+++ b/src/lib/components/publications/TableOfContents.svelte
@@ -166,7 +166,9 @@
spanClass="px-2 text-ellipsis"
class={`${isVisible ? "toc-highlight" : ""} ${isLastEntry ? "pb-4" : ""}`}
onclick={() => handleSectionClick(address)}
- />
+ >
+
+
{:else}
{@const childDepth = depth + 1}
import CopyToClipboard from "$components/util/CopyToClipboard.svelte";
import NetworkStatus from "$components/NetworkStatus.svelte";
- import {
- logoutUser,
- userStore,
- loginWithExtension,
- loginWithAmber,
- loginWithNpub
- } from "$lib/stores/userStore";
- import { Avatar, Dropdown, DropdownGroup, DropdownItem, DropdownHeader } from "flowbite-svelte";
- import { Globe, Loader, Book, Smartphone } from "@lucide/svelte";
+ import { loginWithAmber, loginWithExtension, loginWithNpub, logoutUser, userStore } from "$lib/stores/userStore";
+ import { Avatar, Dropdown, DropdownGroup, DropdownHeader, DropdownItem } from "flowbite-svelte";
+ import { Book, Globe, Loader, Smartphone } from "@lucide/svelte";
import { get } from "svelte/store";
import { goto } from "$app/navigation";
import NDK, { NDKNip46Signer, NDKPrivateKeySigner } from "@nostr-dev-kit/ndk";
@@ -112,8 +106,7 @@
// Reset the refresh flag when user logs out
$effect(() => {
- const currentUser = userState;
- if (!currentUser.signedIn) {
+ if (!userState.signedIn) {
hasRefreshedProfile = false;
}
});
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 54fd21c..c4e1886 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -3,10 +3,10 @@
import { onMount, setContext } from "svelte";
import { goto } from "$app/navigation";
import { cleanupNdk, getPersistedLogin } from "$lib/ndk";
- import { userStore, loginMethodStorageKey } from "$lib/stores/userStore";
+ import { loginMethodStorageKey, userStore } from "$lib/stores/userStore";
import type { LayoutProps } from "./$types";
import { page } from "$app/state";
- import { ANavbar, AFooter } from "$lib/a/index.js";
+ import { AFooter, ANavbar } from "$lib/a/index.js";
// Define children prop for Svelte 5
let { data, children }: LayoutProps = $props();
@@ -52,11 +52,9 @@
// If we have a persisted pubkey and login method, restore the session
if (persistedPubkey && loginMethod) {
console.log("Layout: Found persisted authentication, attempting to restore...");
-
- const currentUserState = $userStore;
-
+
// Only restore if not already signed in
- if (!currentUserState.signedIn) {
+ if (!$userStore.signedIn) {
console.log("Layout: User not currently signed in, restoring authentication...");
if (loginMethod === "extension") {
diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte
index ccfcb66..4e08804 100644
--- a/src/routes/about/+page.svelte
+++ b/src/routes/about/+page.svelte
@@ -2,7 +2,6 @@
import { userBadge } from "$lib/snippets/UserSnippets.svelte";
import { Heading, Img, P, A } from "flowbite-svelte";
import { goto } from "$app/navigation";
- import RelayStatus from "$lib/components/RelayStatus.svelte";
import { getNdkContext } from "$lib/ndk";
// Get the git tag version from environment variables
diff --git a/src/routes/contact/+page.svelte b/src/routes/contact/+page.svelte
index 340e63f..fa74cca 100644
--- a/src/routes/contact/+page.svelte
+++ b/src/routes/contact/+page.svelte
@@ -1,14 +1,5 @@