Monitor relay connections for restricted responses and show error to user

This commit is contained in:
Jon Staab
2025-09-03 15:29:57 -07:00
parent 4001e877b4
commit 95698813c6
9 changed files with 226 additions and 75 deletions
+6 -1
View File
@@ -1,7 +1,8 @@
import type {Component} from "svelte"
import {writable} from "svelte/store"
import {derived, writable} from "svelte/store"
import {randomId, always, assoc, Emitter} from "@welshman/lib"
import {goto} from "$app/navigation"
import {page} from "$app/stores"
export type ModalOptions = {
drawer?: boolean
@@ -21,6 +22,10 @@ export const emitter = new Emitter()
export const modals = writable<Record<string, Modal>>({})
export const modal = derived([page, modals], ([$page, $modals]) => {
return $modals[$page.url.hash.slice(1)]
})
export const pushModal = (
component: Component<any>,
props: Record<string, any> = {},