Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Show disabled siwe button
Alexis Sellier committed 4 years ago
commit 7b885b93d6cb2e84877352fb231a9bc772a531f9
parent 29c55b51cd0328777af4c35d01b126899aa91172
2 files changed +5 -2
modified src/SiweConnect.svelte
@@ -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 {
modified src/base/seeds/View.svelte
@@ -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>