a
This commit is contained in:
parent
fd05a86ca1
commit
04765d915b
|
|
@ -78,10 +78,11 @@
|
|||
|
||||
'verification_failed' => 'Vérification échouée',
|
||||
'face_not_match' => 'Votre visage ne correspond pas à notre base de données.',
|
||||
'contact_support' => 'Veuillez contacter notre service client.',
|
||||
'contact_support' => 'Si vous pensez qu\'il s\'agit d\'une erreur, veuillez contacter notre service client.',
|
||||
'remaining_attempts' => 'Tentatives restantes',
|
||||
|
||||
'redirection_in' => 'Redirection dans %s secondes...',
|
||||
'redirection_in' => ' secondes avant redirection...',
|
||||
|
||||
'invalid_link' => 'Lien de vérification invalide',
|
||||
'expired_link' => 'Lien expiré ou invalide',
|
||||
'server_error' => 'Erreur de connexion au serveur',
|
||||
|
|
@ -141,10 +142,10 @@
|
|||
|
||||
'verification_failed' => 'Verification failed',
|
||||
'face_not_match' => 'Your face does not match our database.',
|
||||
'contact_support' => 'Please contact customer support.',
|
||||
'contact_support' => 'If you believe this is an error, please contact customer support.',
|
||||
'remaining_attempts' => 'Remaining attempts',
|
||||
|
||||
'redirection_in' => 'Redirecting in %s seconds...',
|
||||
'redirection_in' => 'seconds before redirection...',
|
||||
'invalid_link' => 'Invalid verification link',
|
||||
'expired_link' => 'Expired or invalid link',
|
||||
'server_error' => 'Server connection error',
|
||||
|
|
@ -897,19 +898,25 @@
|
|||
}
|
||||
|
||||
function showFailure(data) {
|
||||
|
||||
document.getElementById('result-icon').textContent = '❌';
|
||||
//document.getElementById('result-title').textContent = 'Vérification échouée';
|
||||
v_msg = "<?= t('verification_failed', $lang, $translations) ?>";
|
||||
alert("v_msg => "+v_msg);
|
||||
|
||||
const v_msg = "<?= t('verification_failed', $lang, $translations) ?>";
|
||||
const v_msg1 = "<?= t('face_not_match', $lang, $translations) ?>";
|
||||
const v_msg2 = "<?= t('contact_support', $lang, $translations) ?>";
|
||||
const v_msg3 = "<?= t('remaining_attempts', $lang, $translations) ?>";
|
||||
|
||||
document.getElementById('result-title').textContent = v_msg;
|
||||
document.getElementById('result-title').style.color = '#e74c3c';
|
||||
document.getElementById('result-message').innerHTML =
|
||||
`${data.message || 'Votre visage ne correspond pas à notre base de données.'}<br><br>
|
||||
Si vous pensez qu'il s'agit d'une erreur, veuillez contacter notre service client.<br>
|
||||
<strong>Tentatives restantes: ${data.attempts_remaining -1 || 0} </strong>`;
|
||||
|
||||
|
||||
document.getElementById('result-message').innerHTML = `
|
||||
${data.message || v_msg1}<br><br>
|
||||
${v_msg2}<br>
|
||||
<strong>${v_msg3}: ${data.attempts_remaining - 1 || 0}</strong>
|
||||
`;
|
||||
|
||||
showStep('step-result');
|
||||
|
||||
|
||||
// Permettre une nouvelle tentative si disponible
|
||||
if (data.attempts_remaining > 0) {
|
||||
setTimeout(() => {
|
||||
|
|
@ -917,14 +924,15 @@
|
|||
}, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function startCountdown(seconds, callback) {
|
||||
let remaining = seconds;
|
||||
const countdownEl = document.getElementById('countdown');
|
||||
|
||||
const interval = setInterval(() => {
|
||||
countdownEl.textContent = `Redirection dans ${remaining} secondes...`;
|
||||
remaining--;
|
||||
// countdownEl.textContent = `Redirection dans ${remaining} secondes...`;
|
||||
const v_msg4 = "<?= t('redirection_in', $lang, $translations) ?>";
|
||||
countdownEl.textContent = ${remaining} ${v_msg4};
|
||||
|
||||
if (remaining < 0) {
|
||||
clearInterval(interval);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user