Monitor signer status

This commit is contained in:
Jon Staab
2025-07-30 15:54:10 -07:00
parent 8697cc23be
commit 03b42c8276
5 changed files with 46 additions and 7 deletions
+1 -1
View File
@@ -234,7 +234,7 @@ export const checkRelayAccess = async (url: string, claim = "") => {
if (error) {
const message =
socket.auth.details?.replace(/^\w+: /, "") ||
error?.replace(/^\w+: /, "") ||
error.replace(/^\w+: /, "") ||
"join request rejected"
// If it's a strict NIP 29 relay don't worry about requesting access
+10
View File
@@ -4,6 +4,11 @@
import Icon from "@lib/components/Icon.svelte"
import Button from "@lib/components/Button.svelte"
import {toast, popToast} from "@app/toast"
const onActionClick = () => {
$toast!.action!.onclick()
popToast($toast!.id)
}
</script>
{#if $toast}
@@ -18,6 +23,11 @@
class:alert-error={theme === "error"}>
<p class="welshman-content-error">
{@html renderAsHtml(parse({content: $toast.message}))}
{#if $toast.action}
<Button class="cursor-pointer underline" onclick={onActionClick}>
{$toast.action.message}
</Button>
{/if}
</p>
<Button class="flex items-center opacity-75" onclick={() => popToast($toast.id)}>
<Icon icon="close-circle" />
+4
View File
@@ -6,6 +6,10 @@ export type ToastParams = {
message: string
timeout?: number
theme?: "error"
action?: {
message: string
onclick: () => void
}
}
export type Toast = ToastParams & {