From 03b42c8276c675223e91aa45e372299dd8302002 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Wed, 30 Jul 2025 15:54:10 -0700 Subject: [PATCH] Monitor signer status --- src/app/commands.ts | 2 +- src/app/components/Toast.svelte | 10 ++++++++ src/app/toast.ts | 4 ++++ src/routes/+layout.svelte | 29 ++++++++++++++++++++++-- src/routes/spaces/[relay]/+layout.svelte | 8 +++---- 5 files changed, 46 insertions(+), 7 deletions(-) diff --git a/src/app/commands.ts b/src/app/commands.ts index 173fa3b6..9ec577e5 100644 --- a/src/app/commands.ts +++ b/src/app/commands.ts @@ -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 diff --git a/src/app/components/Toast.svelte b/src/app/components/Toast.svelte index 6a4f7d61..d9cf3c83 100644 --- a/src/app/components/Toast.svelte +++ b/src/app/components/Toast.svelte @@ -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) + } {#if $toast} @@ -18,6 +23,11 @@ class:alert-error={theme === "error"}>

{@html renderAsHtml(parse({content: $toast.message}))} + {#if $toast.action} + + {/if}