Skip to content

Commit

Permalink
HotFix
Browse files Browse the repository at this point in the history
- usuario logado nome
  • Loading branch information
luizhenrique055 committed Jun 24, 2021
1 parent a08451c commit d0ce29a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
10 changes: 6 additions & 4 deletions javascript/criarconta.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

function validateEmail(email) {
var re = /\S+@\S+\.\S+/;
return re.test(email);
}

function CriarConta() {
var nomeUsuario = document.getElementById('nomeUsuario').value;
var emailUsuario = document.getElementById('emailUsuario').value;
Expand Down Expand Up @@ -102,9 +108,5 @@ function CriarConta() {
}
}

function validateEmail(email) {
var re = /\S+@\S+\.\S+/;
return re.test(email);
}

}
11 changes: 8 additions & 3 deletions javascript/indexLogin.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,20 @@ function Login() {
onOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)


}
});

Toast.fire({
icon: 'success',
title: `Bem vindo, ${usuariosGravados[usuarioIndex].nomeUsuario} !`
});
localStorage.setItem('usuarioLogado', JSON.stringify(usuarioLogado.nomeUsuario)); //salvando nome no localstorage
window.location.href = 'telaInterna.html';


localStorage.setItem('usuarioLogado', JSON.stringify(usuariosGravados[usuarioIndex].nomeUsuario)); //salvando nome no localstorage
window.location.href = 'telaInterna.html';

}
}
}
Expand Down

0 comments on commit d0ce29a

Please sign in to comment.