feat: add auto-redirect to pairing after block sync and update button text
**Motivations :** - Passer automatiquement au pairing après 3 secondes une fois la synchronisation terminée - Améliorer le texte du bouton pour indiquer qu'on va au pairing **Modifications :** - Ajouter redirection automatique après 3 secondes quand synchronisation terminée (blocs déjà synchronisés ou scan complété) - Changer le texte du bouton de "Terminer la synchronisation" à "Aller au pairing" - Mettre à jour le statut pour indiquer la redirection automatique **Pages affectées :** - src/pages/block-sync/block-sync.html (texte du bouton) - src/pages/block-sync/block-sync.ts (redirection automatique après 3 secondes)
This commit is contained in:
parent
0d3163b5b2
commit
af78165aee
@ -180,7 +180,7 @@
|
||||
</div>
|
||||
|
||||
<button id="continueBtn" class="continue-btn" disabled>
|
||||
Terminer la synchronisation
|
||||
Aller au pairing
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@ -180,7 +180,14 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
updateProgress(100);
|
||||
updateSyncItem('blocksScanned', lastScan.toString(), 'completed');
|
||||
updateSyncItem('blocksToScan', '0', 'completed');
|
||||
|
||||
// Redirection automatique après 3 secondes
|
||||
updateStatus('✅ Redirection automatique vers le pairing dans 3 secondes...', 'success');
|
||||
continueBtn.disabled = false;
|
||||
setTimeout(() => {
|
||||
console.log('🔗 Auto-redirecting to pairing page...');
|
||||
window.location.href = '/src/pages/home/home.html';
|
||||
}, 3000);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -214,6 +221,13 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
}
|
||||
|
||||
console.log('🎉 Block sync completed successfully');
|
||||
|
||||
// Redirection automatique après 3 secondes
|
||||
updateStatus('✅ Redirection automatique vers le pairing dans 3 secondes...', 'success');
|
||||
setTimeout(() => {
|
||||
console.log('🔗 Auto-redirecting to pairing page...');
|
||||
window.location.href = '/src/pages/home/home.html';
|
||||
}, 3000);
|
||||
} else {
|
||||
throw new Error('Failed to verify wallet update - last_scan not found');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user