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