forked from coracle/flotilla
Monitor signer status
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -6,6 +6,10 @@ export type ToastParams = {
|
||||
message: string
|
||||
timeout?: number
|
||||
theme?: "error"
|
||||
action?: {
|
||||
message: string
|
||||
onclick: () => void
|
||||
}
|
||||
}
|
||||
|
||||
export type Toast = ToastParams & {
|
||||
|
||||
Reference in New Issue
Block a user