mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-30 16:50:47 +08:00
Improve siwe session status indicator
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
This commit is contained in:
@@ -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 </span><Address address={siweSession.address} {config} compact resolve />
|
||||
</div>
|
||||
{:else}
|
||||
<SiweConnect {seed} {config} />
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user