pop up confirmation for create profile

This commit is contained in:
counterweight 2025-02-28 12:42:13 +01:00
parent dff090a9d4
commit 12bc0d2b84
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
3 changed files with 14 additions and 2 deletions

View file

@ -85,7 +85,7 @@ h1 {
align-items: center; align-items: center;
left: 50%; left: 50%;
transform: translate(-50%, -500px); transform: translate(-50%, -500px);
transition: transform 2s ease-in-out; transition: transform 1s ease-in-out;
} }
.top-notification-good.revealed { .top-notification-good.revealed {

View file

@ -1,3 +1,7 @@
const createProfileConfirmation = document.querySelector(
'#create-profile-success'
);
function debounce(func, wait) { function debounce(func, wait) {
let timeout; let timeout;
return function (...args) { return function (...args) {
@ -59,9 +63,10 @@ async function createProfile(allInputs) {
body: JSON.stringify({ nym }), body: JSON.stringify({ nym }),
}); });
createProfileConfirmation.classList.add('revealed');
setTimeout(() => { setTimeout(() => {
window.location.href = '/home'; window.location.href = '/home';
}, 1000); }, 5000);
} }
function onLoadErrands(allInputs, submitProfileButton) { function onLoadErrands(allInputs, submitProfileButton) {

View file

@ -114,6 +114,13 @@
</button> </button>
</div> </div>
</div> </div>
</div>
<div id="create-profile-success" class="top-notification-good">
<img src="/img/circle-check-white.svg" />
<p>
¡Bien! Tu perfil está completo. Te estamos llevando a la aplicación...
</p>
</div> </div>
</main> </main>
</body> </body>