Improve siwe session status indicator

Signed-off-by: Sebastian Martinez <sebastinez@me.com>
This commit is contained in:
Sebastian Martinez
2022-05-18 15:45:47 +02:00
committed by Alexis Sellier
parent 93c9fcbd88
commit 41b82decfe
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -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} />
+1 -1
View File
@@ -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;