nice success message

This commit is contained in:
counterweight 2025-02-13 01:28:31 +01:00
parent 564dcb8083
commit bee8218e40
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
2 changed files with 19 additions and 9 deletions

View file

@ -48,13 +48,19 @@ async function acceptInvite() {
return; return;
} }
const verifyResponse = await fetch("/api/signup/nostr-verify", { let verifyResponse;
method: "POST", try {
headers: { "Content-Type": "application/json" }, verifyResponse = await fetch("/api/signup/nostr-verify", {
body: JSON.stringify(signedEvent), method: "POST",
}); headers: { "Content-Type": "application/json" },
body: JSON.stringify(signedEvent),
if (verifyResponse.status === 200) { });
} catch (error) {
console.log(`Something went wrong: ${error}`);
return;
} }
}
if (verifyResponse.ok) {
document.querySelector('#sign-up-success').style.display = 'block';
}
}

View file

@ -42,6 +42,10 @@
</li> </li>
</ul> </ul>
</div> </div>
<div id="sign-up-success" style="display:none">
<p>¡Bien! Hemos dado de alta tu clave de Nostr.</p>
<p>Te vamos a redirigir a la seca, espera un momento.</p>
</div>
<p>¿No tienes cuenta de Nostr? <a href="https://start.njump.me/" target="_blank" rel="noopener noreferrer">Crea <p>¿No tienes cuenta de Nostr? <a href="https://start.njump.me/" target="_blank" rel="noopener noreferrer">Crea
una aquí.</a< /p> una aquí.</a< /p>
</body> </body>