refacto: Deleting email mentions as there's no emailing system
This commit is contained in:
@@ -35,10 +35,6 @@
|
||||
<label>Nom d'utilisateur</label>
|
||||
<input type="text" id="regUsername" autocomplete="username" required />
|
||||
</div>
|
||||
<div class="authField">
|
||||
<label>Adresse courriel</label>
|
||||
<input type="email" id="regEmail" autocomplete="email" required />
|
||||
</div>
|
||||
<div class="authField">
|
||||
<label>Mot de passe <span class="authHint">(6 caractères min.)</span></label>
|
||||
<input type="password" id="regPassword" autocomplete="new-password" required />
|
||||
@@ -64,6 +60,7 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<p class="authNotice">⚠ En cas d'oubli du mot de passe, aucune récupération n'est possible.</p>
|
||||
<div class="authError hidden" id="registerError"></div>
|
||||
<button type="submit" class="authSubmit">Créer le compte</button>
|
||||
</form>
|
||||
|
||||
@@ -42,11 +42,11 @@ export async function apiLogin(username, password) {
|
||||
});
|
||||
}
|
||||
|
||||
export async function apiRegister(username, email, password, team) {
|
||||
export async function apiRegister(username, password, team) {
|
||||
return fetch("/api/auth/register", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ username, email, password, team }),
|
||||
body: JSON.stringify({ username, password, team }),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ const loginUsernameEl = document.getElementById("loginUsername");
|
||||
const loginPasswordEl = document.getElementById("loginPassword");
|
||||
const loginErrorEl = document.getElementById("loginError");
|
||||
const regUsernameEl = document.getElementById("regUsername");
|
||||
const regEmailEl = document.getElementById("regEmail");
|
||||
const regPasswordEl = document.getElementById("regPassword");
|
||||
const registerErrorEl = document.getElementById("registerError");
|
||||
const regCountBlueEl = document.getElementById("regCountBlue");
|
||||
@@ -126,12 +125,11 @@ registerForm.addEventListener("submit", async (e) => {
|
||||
e.preventDefault();
|
||||
clearError(registerErrorEl);
|
||||
const username = regUsernameEl.value.trim();
|
||||
const email = regEmailEl.value.trim();
|
||||
const password = regPasswordEl.value;
|
||||
const teamInput = registerForm.querySelector('input[name="regTeam"]:checked');
|
||||
if (!teamInput) { showError(registerErrorEl, "Please choose a team."); return; }
|
||||
try {
|
||||
const res = await apiRegister(username, email, password, teamInput.value);
|
||||
const res = await apiRegister(username, password, teamInput.value);
|
||||
const data = await res.json();
|
||||
if (!res.ok) {
|
||||
const msgs = {
|
||||
|
||||
@@ -182,6 +182,14 @@ body {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.authNotice {
|
||||
margin: 0;
|
||||
font-size: 11px;
|
||||
color: rgba(255, 193, 113, 0.85);
|
||||
text-align: center;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.authSubmit {
|
||||
margin-top: 4px;
|
||||
padding: 12px;
|
||||
|
||||
Reference in New Issue
Block a user