Show disabled siwe button

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2022-05-18 15:45:47 +02:00
parent 29c55b51cd
commit 7b885b93d6
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -8,6 +8,8 @@
export let seed: Seed;
export let config: Config;
export let caption = "Sign in";
export let tooltip = "";
export let disabled = false;
let connection: Connection = Connection.Disconnected;
</script>
@@ -20,7 +22,8 @@
<button
class="tiny secondary"
disabled={connection === Connection.Connecting}
title={tooltip}
disabled={disabled || (connection === Connection.Connecting)}
on:click={async () => {
connection = Connection.Connecting;
try {
+1 -1
View File
@@ -107,7 +107,7 @@
<SiweConnect {seed} {config} />
{/if}
{:else}
<div class="subtle">Please connect your wallet.</div>
<SiweConnect disabled {seed} {config} tooltip={"Connect your wallet to sign in"} />
{/if}
</div>
</header>