fix: uniformize block-sync page style and redirect to pairing

**Motivations :**
- Uniformiser le style de la page block-sync avec les autres pages de setup
- Corriger la redirection pour aller vers la page de pairing au lieu de checkStorageStateAndNavigate

**Modifications :**
- Uniformiser le style HTML/CSS de block-sync.html avec birthday-setup et wallet-setup
- Changer la redirection du bouton pour aller vers /src/pages/home/home.html
- Utiliser le même fond dégradé et la même carte blanche centrée

**Pages affectées :**
- src/pages/block-sync/block-sync.html (style uniformisé)
- src/pages/block-sync/block-sync.ts (redirection vers pairing)
This commit is contained in:
NicolasCantu 2025-10-29 17:05:56 +01:00
parent 0ea661b766
commit 0d3163b5b2
4 changed files with 119 additions and 98 deletions

View File

@ -3,98 +3,98 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Synchronisation des Blocs - LeCoffre.io</title>
<link rel="stylesheet" href="../../4nk.css">
<title>Synchronisation des Blocs - LeCoffre</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
margin: 0;
padding: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.container {
background: white;
border-radius: 12px;
padding: 40px;
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
max-width: 600px;
margin: 0 auto;
padding: 2rem;
width: 100%;
}
h1 {
text-align: center;
color: #333;
margin-bottom: 10px;
}
.subtitle {
text-align: center;
color: #666;
margin-bottom: 30px;
}
.status {
font-size: 1.2rem;
margin: 1rem 0;
padding: 1rem;
text-align: center;
padding: 20px;
border-radius: 8px;
transition: all 0.3s ease;
margin-bottom: 20px;
}
.status.loading {
background-color: #e3f2fd;
background: #e3f2fd;
color: #1976d2;
border: 1px solid #bbdefb;
}
.status.success {
background-color: #e8f5e8;
background: #e8f5e8;
color: #2e7d32;
border: 1px solid #c8e6c9;
}
.status.error {
background-color: #ffebee;
background: #ffebee;
color: #c62828;
border: 1px solid #ffcdd2;
}
.progress-container {
.progress {
width: 100%;
background-color: #f0f0f0;
border-radius: 10px;
height: 8px;
background: #e0e0e0;
border-radius: 4px;
overflow: hidden;
margin: 1rem 0;
margin: 20px 0;
}
.progress-bar {
height: 20px;
background: linear-gradient(90deg, #4caf50, #8bc34a);
height: 100%;
background: #667eea;
width: 0%;
transition: width 0.3s ease;
border-radius: 10px;
}
.continue-btn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 12px 30px;
border-radius: 25px;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 1rem;
}
.continue-btn:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.continue-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.sync-details {
background-color: #f8f9fa;
border-radius: 8px;
padding: 1rem;
margin: 1rem 0;
padding: 20px;
margin: 20px 0;
text-align: left;
}
.sync-details h3 {
margin-top: 0;
color: #495057;
text-align: center;
margin-bottom: 15px;
}
.sync-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.5rem 0;
padding: 0.75rem 0;
border-bottom: 1px solid #e9ecef;
}
@ -117,19 +117,42 @@
.sync-status.error {
color: #dc3545;
}
.continue-btn {
width: 100%;
background: #667eea;
color: white;
border: none;
border-radius: 8px;
padding: 15px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
margin-top: 20px;
transition: background 0.3s ease;
}
.continue-btn:hover:not(:disabled) {
background: #5a6fd8;
}
.continue-btn:disabled {
background: #ccc;
cursor: not-allowed;
}
</style>
</head>
<body>
<div class="container">
<h1>🔄 Synchronisation des Blocs</h1>
<p>Synchronisation avec le réseau Bitcoin pour récupérer l'historique des transactions</p>
<p class="subtitle">Synchronisation avec le réseau Bitcoin pour récupérer l'historique des transactions</p>
<div id="status" class="status loading">
<div class="status loading" id="status">
🔄 Initialisation de la synchronisation...
</div>
<div class="progress-container">
<div id="progressBar" class="progress-bar"></div>
<div class="progress">
<div class="progress-bar" id="progressBar"></div>
</div>
<div class="sync-details">

View File

@ -31,11 +31,9 @@ document.addEventListener("DOMContentLoaded", async () => {
// Gestion du bouton continuer (définie avant le try pour être toujours disponible)
if (continueBtn) {
continueBtn.addEventListener('click', async () => {
console.log('🏠 Redirecting to main application...');
// Rediriger vers l'application principale
console.log('🔄 Block sync completed, checking storage state...');
const { checkStorageStateAndNavigate } = await import('../../router');
await checkStorageStateAndNavigate();
console.log('🔗 Redirecting to pairing page...');
// Rediriger vers la page de pairing
window.location.href = '/src/pages/home/home.html';
});
}