forked from coracle/flotilla
Fix failure to navigate, quote transitions
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import {onMount} from "svelte"
|
||||
import {nip19} from "nostr-tools"
|
||||
import {get, derived} from "svelte/store"
|
||||
import {page} from "$app/stores"
|
||||
import {dev} from "$app/environment"
|
||||
import {bytesToHex, hexToBytes} from "@noble/hashes/utils"
|
||||
import {identity, uniq, sleep, take, sortBy, ago, now, HOUR, WEEK, Worker} from "@welshman/lib"
|
||||
@@ -257,9 +256,7 @@
|
||||
{:then}
|
||||
<div data-theme={$theme}>
|
||||
<AppContainer>
|
||||
{#key $page.url.pathname}
|
||||
<slot />
|
||||
{/key}
|
||||
<slot />
|
||||
</AppContainer>
|
||||
<ModalContainer />
|
||||
<div class="tippy-target" />
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<script lang="ts">
|
||||
import {onMount} from "svelte"
|
||||
import {page} from "$app/stores"
|
||||
import {ctx} from "@welshman/lib"
|
||||
import {WRAP} from "@welshman/util"
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {pubkey, repository} from "@welshman/app"
|
||||
import {pubkey} from "@welshman/app"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Page from "@lib/components/Page.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
@@ -13,7 +12,7 @@
|
||||
import SecondaryNavSection from "@lib/components/SecondaryNavSection.svelte"
|
||||
import ChatStart from "@app/components/ChatStart.svelte"
|
||||
import ChatItem from "@app/components/ChatItem.svelte"
|
||||
import {chatSearch, pullConservatively, ensureUnwrapped} from "@app/state"
|
||||
import {chatSearch, pullConservatively} from "@app/state"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
const startChat = () => pushModal(ChatStart)
|
||||
@@ -23,23 +22,9 @@
|
||||
relays: ctx.app.router.UserInbox().getUrls(),
|
||||
})
|
||||
|
||||
const onUpdate = ({added}: {added: TrustedEvent[]}) => {
|
||||
for (const event of added) {
|
||||
ensureUnwrapped(event)
|
||||
}
|
||||
}
|
||||
|
||||
let term = ""
|
||||
|
||||
$: chats = $chatSearch.searchOptions(term).filter(c => c.pubkeys.length > 1)
|
||||
|
||||
onMount(() => {
|
||||
repository.on("update", onUpdate)
|
||||
|
||||
return () => {
|
||||
repository.off("update", onUpdate)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<SecondaryNav>
|
||||
@@ -67,5 +52,7 @@
|
||||
</div>
|
||||
</SecondaryNav>
|
||||
<Page>
|
||||
<slot />
|
||||
{#key $page.url.pathname}
|
||||
<slot />
|
||||
{/key}
|
||||
</Page>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {page} from "$app/stores"
|
||||
</script>
|
||||
|
||||
{#key $page.params.relay}
|
||||
<slot />
|
||||
{/key}
|
||||
@@ -60,5 +60,7 @@
|
||||
<MenuSpace {url} />
|
||||
</SecondaryNav>
|
||||
<Page>
|
||||
<slot />
|
||||
{#key $page.url.pathname}
|
||||
<slot />
|
||||
{/key}
|
||||
</Page>
|
||||
|
||||
Reference in New Issue
Block a user