forked from coracle/flotilla
Fix some small issues
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const loginWithNip07 = async () => {
|
const loginWithNip07 = async () => {
|
||||||
loading = 'nip07'
|
loading = "nip07"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const pubkey = await getNip07()?.getPublicKey()
|
const pubkey = await getNip07()?.getPublicKey()
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const loginWithNip55 = async (app: any) => {
|
const loginWithNip55 = async (app: any) => {
|
||||||
loading = 'nip55'
|
loading = "nip55"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const signer = new Nip55Signer(app.packageName)
|
const signer = new Nip55Signer(app.packageName)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type {Component} from "svelte"
|
import {asClassComponent} from "svelte/legacy"
|
||||||
import type {Writable} from "svelte/store"
|
import type {Writable} from "svelte/store"
|
||||||
import {derived} from "svelte/store"
|
import {derived} from "svelte/store"
|
||||||
import {createEditor, SvelteNodeViewRenderer} from "svelte-tiptap"
|
import {createEditor, SvelteNodeViewRenderer} from "svelte-tiptap"
|
||||||
@@ -84,7 +84,7 @@ export const makeEditor = ({
|
|||||||
editor: (this as any).editor,
|
editor: (this as any).editor,
|
||||||
search: derived(profileSearch, s => s.searchValues),
|
search: derived(profileSearch, s => s.searchValues),
|
||||||
getRelays: (pubkey: string) => ctx.app.router.FromPubkeys([pubkey]).getUrls(),
|
getRelays: (pubkey: string) => ctx.app.router.FromPubkeys([pubkey]).getUrls(),
|
||||||
component: ProfileSuggestion,
|
component: asClassComponent(ProfileSuggestion),
|
||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,29 +4,35 @@
|
|||||||
import tippy from "tippy.js"
|
import tippy from "tippy.js"
|
||||||
import {onMount, mount, unmount} from "svelte"
|
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
|
let element: Element
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (element) {
|
const target = document.createElement("div")
|
||||||
const target = document.createElement("div")
|
|
||||||
|
|
||||||
popover = tippy(element, {
|
popover = tippy(element, {
|
||||||
content: target,
|
content: target,
|
||||||
animation: "shift-away",
|
animation: "shift-away",
|
||||||
appendTo: document.querySelector(".tippy-target")!,
|
appendTo: document.querySelector(".tippy-target")!,
|
||||||
...params,
|
...params,
|
||||||
})
|
})
|
||||||
|
|
||||||
instance = mount(component, {target, props: reactiveProps})
|
instance = mount(component, {target, props: reactiveProps})
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
popover?.destroy()
|
popover?.destroy()
|
||||||
unmount(instance)
|
unmount(instance)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -143,7 +143,8 @@
|
|||||||
<ChannelName {url} {room} />
|
<ChannelName {url} {room} />
|
||||||
</div>
|
</div>
|
||||||
{#if $notifications.has(roomPath)}
|
{#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}
|
{/if}
|
||||||
</Link>
|
</Link>
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {onDestroy} from "svelte"
|
import {onMount, onDestroy} from "svelte"
|
||||||
import {page} from "$app/stores"
|
import {page} from "$app/stores"
|
||||||
import type {Readable} from "svelte/store"
|
import type {Readable} from "svelte/store"
|
||||||
import {now} from "@welshman/lib"
|
import {now} from "@welshman/lib"
|
||||||
@@ -172,20 +172,18 @@
|
|||||||
setTimeout(onScroll, 100)
|
setTimeout(onScroll, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
$: {
|
onMount(() => {
|
||||||
if (element) {
|
;({events, cleanup} = makeFeed({
|
||||||
;({events, cleanup} = makeFeed({
|
element,
|
||||||
element,
|
relays: [url],
|
||||||
relays: [url],
|
feedFilters: [filter],
|
||||||
feedFilters: [filter],
|
subscriptionFilters: [{kinds: [DELETE, REACTION, MESSAGE], "#h": [room], since: now()}],
|
||||||
subscriptionFilters: [{kinds: [DELETE, REACTION, MESSAGE], "#h": [room], since: now()}],
|
initialEvents: getEventsForUrl(repository, url, [{...filter, limit: 20}]),
|
||||||
initialEvents: getEventsForUrl(repository, url, [{...filter, limit: 20}]),
|
onExhausted: () => {
|
||||||
onExhausted: () => {
|
loading = false
|
||||||
loading = false
|
},
|
||||||
},
|
}))
|
||||||
}))
|
})
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
setChecked($page.url.pathname)
|
setChecked($page.url.pathname)
|
||||||
|
|||||||
Reference in New Issue
Block a user