Detect nip29 properly before choosing smart path, more robust auth error checking

This commit is contained in:
Jon Staab
2025-11-04 16:14:32 -08:00
parent 6429f82829
commit 501ce8067d
12 changed files with 56 additions and 45 deletions
@@ -1,24 +1,19 @@
<script lang="ts">
import {goto} from "$app/navigation"
import {displayRelayUrl} from "@welshman/util"
import PrimaryNavItem from "@lib/components/PrimaryNavItem.svelte"
import SpaceAvatar from "@app/components/SpaceAvatar.svelte"
import {encodeRelay} from "@app/core/state"
import {makeSpacePath} from "@app/util/routes"
import {lastPageBySpaceUrl} from "@app/util/history"
import {makeSpacePath, goToSpace} from "@app/util/routes"
import {notifications} from "@app/util/notifications"
const {url} = $props()
const path = makeSpacePath(url)
const onClick = () => goto(lastPageBySpaceUrl.get(encodeRelay(url)) || path)
const onClick = () => goToSpace(url)
</script>
<PrimaryNavItem
onclick={onClick}
title={displayRelayUrl(url)}
class="tooltip-right"
notification={$notifications.has(path)}>
notification={$notifications.has(makeSpacePath(url))}>
<SpaceAvatar {url} />
</PrimaryNavItem>