mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 11:20:36 +08:00
Show disabled siwe button
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user