Spaces:
Sleeping
Sleeping
fix(ui): reset intro modal visibility with v2 key and add localized tooltip to name input
Browse files- templates/start.html +6 -4
templates/start.html
CHANGED
|
@@ -67,6 +67,8 @@
|
|
| 67 |
<div id="formulario-perfil">
|
| 68 |
<label for="name">Seu nome:</label>
|
| 69 |
<input type="text" id="name" name="name" required
|
|
|
|
|
|
|
| 70 |
oninvalid="this.setCustomValidity('Por favor, preencha seu nome')"
|
| 71 |
oninput="this.setCustomValidity('')"><br><br>
|
| 72 |
|
|
@@ -96,14 +98,14 @@
|
|
| 96 |
// Função para fechar o modal
|
| 97 |
function closeModal() {
|
| 98 |
modal.style.display = "none";
|
| 99 |
-
// Marca na sessão que o intro já foi visto
|
| 100 |
-
sessionStorage.setItem('
|
| 101 |
}
|
| 102 |
|
| 103 |
// Ao carregar a página, verifica se deve mostrar o modal
|
| 104 |
window.addEventListener('load', function() {
|
| 105 |
-
// Se NÃO tiver a flag '
|
| 106 |
-
if (!sessionStorage.getItem('
|
| 107 |
modal.style.display = "block";
|
| 108 |
}
|
| 109 |
});
|
|
|
|
| 67 |
<div id="formulario-perfil">
|
| 68 |
<label for="name">Seu nome:</label>
|
| 69 |
<input type="text" id="name" name="name" required
|
| 70 |
+
placeholder="Digite seu nome aqui..."
|
| 71 |
+
title="Por favor, preencha seu nome"
|
| 72 |
oninvalid="this.setCustomValidity('Por favor, preencha seu nome')"
|
| 73 |
oninput="this.setCustomValidity('')"><br><br>
|
| 74 |
|
|
|
|
| 98 |
// Função para fechar o modal
|
| 99 |
function closeModal() {
|
| 100 |
modal.style.display = "none";
|
| 101 |
+
// Marca na sessão que o intro já foi visto (chave atualizada para resetar para usuários antigos)
|
| 102 |
+
sessionStorage.setItem('introShown_v2', 'true');
|
| 103 |
}
|
| 104 |
|
| 105 |
// Ao carregar a página, verifica se deve mostrar o modal
|
| 106 |
window.addEventListener('load', function() {
|
| 107 |
+
// Se NÃO tiver a flag 'introShown_v2' na sessão, mostra o modal
|
| 108 |
+
if (!sessionStorage.getItem('introShown_v2')) {
|
| 109 |
modal.style.display = "block";
|
| 110 |
}
|
| 111 |
});
|