Fix some small issues

This commit is contained in:
Jon Staab 2025-02-03 15:50:19 -08:00
parent 08ee07d157
commit 0f705c459a
5 changed files with 40 additions and 35 deletions

View file

@ -28,7 +28,7 @@
}
const loginWithNip07 = async () => {
loading = 'nip07'
loading = "nip07"
try {
const pubkey = await getNip07()?.getPublicKey()
@ -47,7 +47,7 @@
}
const loginWithNip55 = async (app: any) => {
loading = 'nip55'
loading = "nip55"
try {
const signer = new Nip55Signer(app.packageName)

View file

@ -1,4 +1,4 @@
import type {Component} from "svelte"
import {asClassComponent} from "svelte/legacy"
import type {Writable} from "svelte/store"
import {derived} from "svelte/store"
import {createEditor, SvelteNodeViewRenderer} from "svelte-tiptap"
@ -84,7 +84,7 @@ export const makeEditor = ({
editor: (this as any).editor,
search: derived(profileSearch, s => s.searchValues),
getRelays: (pubkey: string) => ctx.app.router.FromPubkeys([pubkey]).getUrls(),
component: ProfileSuggestion,
component: asClassComponent(ProfileSuggestion),
}),
]
},

View file

@ -4,14 +4,21 @@
import tippy from "tippy.js"
import {onMount, mount, unmount} from "svelte"
let {component, children = undefined, props = {}, params = {}, popover = $bindable(), instance = $bindable(), ...restProps} = $props()
let {
component,
children = undefined,
props = {},
params = {},
popover = $bindable(),
instance = $bindable(),
...restProps
} = $props()
let reactiveProps = $derived(props)
const reactiveProps = $derived(props)
let element: Element
onMount(() => {
if (element) {
const target = document.createElement("div")
popover = tippy(element, {
@ -27,7 +34,6 @@
popover?.destroy()
unmount(instance)
}
}
})
</script>

View file

@ -143,7 +143,8 @@
<ChannelName {url} {room} />
</div>
{#if $notifications.has(roomPath)}
<div class="absolute right-1 top-1 h-2 w-2 rounded-full bg-primary" transition:fade></div>
<div class="absolute right-1 top-1 h-2 w-2 rounded-full bg-primary" transition:fade>
</div>
{/if}
</Link>
{/each}

View file

@ -1,5 +1,5 @@
<script lang="ts">
import {onDestroy} from "svelte"
import {onMount, onDestroy} from "svelte"
import {page} from "$app/stores"
import type {Readable} from "svelte/store"
import {now} from "@welshman/lib"
@ -172,8 +172,7 @@
setTimeout(onScroll, 100)
}
$: {
if (element) {
onMount(() => {
;({events, cleanup} = makeFeed({
element,
relays: [url],
@ -184,8 +183,7 @@
loading = false
},
}))
}
}
})
onDestroy(() => {
setChecked($page.url.pathname)