Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Improve siwe session status indicator
Sebastian Martinez committed 4 years ago
commit 41b82decfe0418a484f338de53b96344011608ce
parent 93c9fcbd8845e88eeeb22ac20e93ab76c1e403d5
2 files changed +7 -3
modified src/base/seeds/View.svelte
@@ -56,6 +56,10 @@
    display: flex;
    align-items: center;
  }
+
  .session-info {
+
    display: flex;
+
    flex-direction: row;
+
  }
  .desktop {
    display: block !important;
  }
@@ -97,8 +101,8 @@
      <div class="siwe">
        {#if session?.signer}
          {#if siweSession}
-
            <div>
-
              <Address address={siweSession.address} {config} compact resolve />
+
            <div class="session-info">
+
              <span style:margin-right="0.5rem">Signed in as&nbsp;</span><Address address={siweSession.address} {config} compact resolve />
            </div>
          {:else}
            <SiweConnect {seed} {config} />
modified src/siwe.ts
@@ -39,7 +39,7 @@ export async function createUnauthorizedSession(host: Host): Promise<{ nonce: st
  return await new Request(`sessions`, host).post();
}

-
/// Signs the user into given seed and returns when succesfull a session id
+
/// Signs the user into given seed and returns when successfull a session id
export async function signInWithEthereum(seed: Seed, config: Config): Promise<{ id: string } | null> {
  if (! config.signer) {
    return null;