diff --git a/lang/en-gb.js b/lang/en-gb.js
index 780f1cf..16be7ed 100644
--- a/lang/en-gb.js
+++ b/lang/en-gb.js
@@ -1429,5 +1429,26 @@ window.I18N['en-gb'] = {
"step5_update_title": "Automatic Update Check",
"step5_update_desc": "Periodically checks if new features or security patches are available for AP Manageur.",
"step5_backup_title": "Automatic Backups (Backup)",
- "step5_backup_desc": "Schedule regular backups of configuration, users, and rules to prevent data loss."
+ "step5_backup_desc": "Schedule regular backups of configuration, users, and rules to prevent data loss.",
+ "setup_launch_modal_title": "Initial Setup & Startup",
+ "setup_launch_badge": "Configuring in progress…",
+ "setup_launch_badge_complete": "Setup complete!",
+ "setup_step_label": "Step {step} / 5",
+ "setup_launch_starting": "Starting configuration…",
+ "setup_launch_details": "Initializing services and validating data…",
+ "setup_step1_admin": "Create administrator account & session",
+ "setup_step2_wifi": "Configure & start Wi-Fi AP",
+ "setup_step3_vpn": "Register VPN profiles",
+ "setup_step4_notif": "Configure alerts & notifications",
+ "setup_step5_prefs": "Preferences, updates & backups",
+ "setup_step1_admin_title": "Creating administrator account…",
+ "setup_step1_admin_desc": "Securing credentials and initializing session…",
+ "setup_step2_wifi_title": "Configuring Wi-Fi Access Point…",
+ "setup_step2_wifi_desc": "Applying SSID, security and network interfaces…",
+ "setup_step3_vpn_title": "Registering VPN profiles…",
+ "setup_step4_notif_title": "Saving alert events & notifications…",
+ "setup_step5_prefs_title": "Finalizing preferences, updates & backups…",
+ "setup_step5_prefs_desc": "Saving theme, application title, update interval and backup schedule…",
+ "setup_launch_success_title": "✅ AP Manageur configured successfully!",
+ "setup_launch_redirecting": "Redirecting to dashboard…"
};
diff --git a/lang/en-us.js b/lang/en-us.js
index 31cd449..121e8a9 100644
--- a/lang/en-us.js
+++ b/lang/en-us.js
@@ -1429,5 +1429,26 @@ window.I18N['en-us'] = {
"step5_update_title": "Automatic Update Check",
"step5_update_desc": "Periodically checks if new features or security patches are available for AP Manageur.",
"step5_backup_title": "Automatic Backups (Backup)",
- "step5_backup_desc": "Schedule regular backups of configuration, users, and rules to prevent data loss."
+ "step5_backup_desc": "Schedule regular backups of configuration, users, and rules to prevent data loss.",
+ "setup_launch_modal_title": "Initial Setup & Startup",
+ "setup_launch_badge": "Configuring in progress…",
+ "setup_launch_badge_complete": "Setup complete!",
+ "setup_step_label": "Step {step} / 5",
+ "setup_launch_starting": "Starting configuration…",
+ "setup_launch_details": "Initializing services and validating data…",
+ "setup_step1_admin": "Create administrator account & session",
+ "setup_step2_wifi": "Configure & start Wi-Fi AP",
+ "setup_step3_vpn": "Register VPN profiles",
+ "setup_step4_notif": "Configure alerts & notifications",
+ "setup_step5_prefs": "Preferences, updates & backups",
+ "setup_step1_admin_title": "Creating administrator account…",
+ "setup_step1_admin_desc": "Securing credentials and initializing session…",
+ "setup_step2_wifi_title": "Configuring Wi-Fi Access Point…",
+ "setup_step2_wifi_desc": "Applying SSID, security and network interfaces…",
+ "setup_step3_vpn_title": "Registering VPN profiles…",
+ "setup_step4_notif_title": "Saving alert events & notifications…",
+ "setup_step5_prefs_title": "Finalizing preferences, updates & backups…",
+ "setup_step5_prefs_desc": "Saving theme, application title, update interval and backup schedule…",
+ "setup_launch_success_title": "✅ AP Manageur configured successfully!",
+ "setup_launch_redirecting": "Redirecting to dashboard…"
};
diff --git a/lang/fr.js b/lang/fr.js
index 30029ea..fc7409f 100644
--- a/lang/fr.js
+++ b/lang/fr.js
@@ -1429,5 +1429,26 @@ window.I18N['fr'] = {
"step5_update_title": "Recherche de mise à jour automatique",
"step5_update_desc": "Vérifie périodiquement si de nouvelles fonctionnalités ou des correctifs de sécurité sont disponibles pour AP Manageur.",
"step5_backup_title": "Sauvegardes automatiques (Backup)",
- "step5_backup_desc": "Planifiez des sauvegardes régulières de la configuration, des utilisateurs et des règles pour prévenir toute perte de données."
+ "step5_backup_desc": "Planifiez des sauvegardes régulières de la configuration, des utilisateurs et des règles pour prévenir toute perte de données.",
+ "setup_launch_modal_title": "Configuration initiale & Démarrage",
+ "setup_launch_badge": "Configuration en cours…",
+ "setup_launch_badge_complete": "Configuration réussie !",
+ "setup_step_label": "Étape {step} / 5",
+ "setup_launch_starting": "Démarrage de la configuration…",
+ "setup_launch_details": "Initialisation des services et validation des données…",
+ "setup_step1_admin": "Création du compte administrateur & session",
+ "setup_step2_wifi": "Configuration & démarrage du Wi-Fi",
+ "setup_step3_vpn": "Enregistrement des profils VPN",
+ "setup_step4_notif": "Paramétrage des alertes & notifications",
+ "setup_step5_prefs": "Préférences, mises à jour & sauvegardes",
+ "setup_step1_admin_title": "Création du compte administrateur…",
+ "setup_step1_admin_desc": "Sécurisation des identifiants et création de la session…",
+ "setup_step2_wifi_title": "Configuration du point d’accès Wi-Fi…",
+ "setup_step2_wifi_desc": "Application des paramètres SSID, sécurité et interface réseau…",
+ "setup_step3_vpn_title": "Enregistrement des profils VPN…",
+ "setup_step4_notif_title": "Enregistrement des alertes et notifications…",
+ "setup_step5_prefs_title": "Finalisation des préférences, mises à jour & sauvegardes…",
+ "setup_step5_prefs_desc": "Enregistrement du thème, du titre, de la mise à jour auto et des sauvegardes…",
+ "setup_launch_success_title": "✅ Configuration réussie !",
+ "setup_launch_redirecting": "Redirection vers le tableau de bord…"
};
diff --git a/setup.html b/setup.html
index dc93c29..64d47ff 100644
--- a/setup.html
+++ b/setup.html
@@ -2999,6 +2999,83 @@
+
+
+
+
+
+
+
+
+
+
Configuration initiale & Démarrage
+
+ ⚙️
+ Configuration en cours…
+
+
+
+
+
+
+ Étape 1 / 5
+ 0%
+
+
+
+
+
+
+
Démarrage de la configuration…
+
Initialisation des services et validation des données…
+
+
+
+
+
+ 🛡️
+ Création du compte administrateur & session
+ ↻
+
+
+ 📶
+ Configuration & démarrage du Wi-Fi
+ ⏳
+
+
+ 🌐
+ Enregistrement des profils VPN
+ ⏳
+
+
+ 🔔
+ Paramétrage des alertes & notifications
+ ⏳
+
+
+ ⚙️
+ Préférences, mises à jour & sauvegardes
+ ⏳
+
+
+
+
+
+
+
+
@@ -3268,6 +3345,27 @@
'recap_auto_start_no': 'Démarrage auto : Non',
'btn_modify_settings': '← Modifier les réglages',
'btn_submit_setup': '🚀 Enregistrer et démarrer l\'AP',
+ 'setup_launch_modal_title': 'Configuration initiale & Démarrage',
+ 'setup_launch_badge': 'Configuration en cours…',
+ 'setup_launch_badge_complete': 'Configuration réussie !',
+ 'setup_step_label': 'Étape {step} / 5',
+ 'setup_launch_starting': 'Démarrage de la configuration…',
+ 'setup_launch_details': 'Initialisation des services et validation des données…',
+ 'setup_step1_admin': 'Création du compte administrateur & session',
+ 'setup_step2_wifi': 'Configuration & démarrage du Wi-Fi',
+ 'setup_step3_vpn': 'Enregistrement des profils VPN',
+ 'setup_step4_notif': 'Paramétrage des alertes & notifications',
+ 'setup_step5_prefs': 'Préférences, mises à jour & sauvegardes',
+ 'setup_step1_admin_title': 'Création du compte administrateur…',
+ 'setup_step1_admin_desc': 'Sécurisation des identifiants et création de la session…',
+ 'setup_step2_wifi_title': 'Configuration du point d’accès Wi-Fi…',
+ 'setup_step2_wifi_desc': 'Application des paramètres SSID, sécurité et interface réseau…',
+ 'setup_step3_vpn_title': 'Enregistrement des profils VPN…',
+ 'setup_step4_notif_title': 'Enregistrement des alertes et notifications…',
+ 'setup_step5_prefs_title': 'Finalisation des préférences, mises à jour & sauvegardes…',
+ 'setup_step5_prefs_desc': 'Enregistrement du thème, du titre, de la mise à jour auto et des sauvegardes…',
+ 'setup_launch_success_title': '✅ Configuration réussie !',
+ 'setup_launch_redirecting': 'Redirection vers le tableau de bord…',
'modal_backup_title': 'Restauration d\'une sauvegarde',
'modal_backup_desc': 'Sélectionnez les éléments de la sauvegarde que vous souhaitez restaurer dans le système :',
@@ -3464,6 +3562,27 @@
'recap_auto_start_no': 'Autostart: No',
'btn_modify_settings': '← Modify Settings',
'btn_submit_setup': '🚀 Save and Start AP',
+ 'setup_launch_modal_title': 'Initial Setup & Startup',
+ 'setup_launch_badge': 'Setup in progress…',
+ 'setup_launch_badge_complete': 'Setup complete!',
+ 'setup_step_label': 'Step {step} / 5',
+ 'setup_launch_starting': 'Starting setup process…',
+ 'setup_launch_details': 'Initializing services and validating data…',
+ 'setup_step1_admin': 'Administrator account & session creation',
+ 'setup_step2_wifi': 'Wi-Fi Access Point configuration & startup',
+ 'setup_step3_vpn': 'VPN profiles configuration',
+ 'setup_step4_notif': 'Alert events & notification settings',
+ 'setup_step5_prefs': 'Preferences, updates & backup schedules',
+ 'setup_step1_admin_title': 'Creating administrator account…',
+ 'setup_step1_admin_desc': 'Securing credentials and initializing session…',
+ 'setup_step2_wifi_title': 'Configuring Wi-Fi Access Point…',
+ 'setup_step2_wifi_desc': 'Applying SSID, security and network interfaces…',
+ 'setup_step3_vpn_title': 'Configuring VPN profiles…',
+ 'setup_step4_notif_title': 'Saving alert events & notifications…',
+ 'setup_step5_prefs_title': 'Finalizing preferences, updates & backups…',
+ 'setup_step5_prefs_desc': 'Saving theme, application title, update interval and backup schedule…',
+ 'setup_launch_success_title': '✅ AP Manageur configured successfully!',
+ 'setup_launch_redirecting': 'Redirecting to dashboard…',
'modal_backup_title': 'Restore Backup',
'modal_backup_desc': 'Select the components from your backup file that you wish to restore:',
@@ -3660,6 +3779,27 @@
'recap_auto_start_no': 'Autostart: No',
'btn_modify_settings': '← Modify Settings',
'btn_submit_setup': '🚀 Save and Start AP',
+ 'setup_launch_modal_title': 'Initial Setup & Startup',
+ 'setup_launch_badge': 'Setup in progress…',
+ 'setup_launch_badge_complete': 'Setup complete!',
+ 'setup_step_label': 'Step {step} / 5',
+ 'setup_launch_starting': 'Starting setup process…',
+ 'setup_launch_details': 'Initializing services and validating data…',
+ 'setup_step1_admin': 'Administrator account & session creation',
+ 'setup_step2_wifi': 'Wi-Fi Access Point configuration & startup',
+ 'setup_step3_vpn': 'VPN profiles configuration',
+ 'setup_step4_notif': 'Alert events & notification settings',
+ 'setup_step5_prefs': 'Preferences, updates & backup schedules',
+ 'setup_step1_admin_title': 'Creating administrator account…',
+ 'setup_step1_admin_desc': 'Securing credentials and initializing session…',
+ 'setup_step2_wifi_title': 'Configuring Wi-Fi Access Point…',
+ 'setup_step2_wifi_desc': 'Applying SSID, security and network interfaces…',
+ 'setup_step3_vpn_title': 'Configuring VPN profiles…',
+ 'setup_step4_notif_title': 'Saving alert events & notifications…',
+ 'setup_step5_prefs_title': 'Finalizing preferences, updates & backups…',
+ 'setup_step5_prefs_desc': 'Saving theme, application title, update interval and backup schedule…',
+ 'setup_launch_success_title': '✅ AP Manageur configured successfully!',
+ 'setup_launch_redirecting': 'Redirecting to dashboard…',
'modal_backup_title': 'Restore Backup',
'modal_backup_desc': 'Select the components from your backup file that you wish to restore:',
@@ -5764,19 +5904,26 @@
}
}
+ function closeSetupStartProgressModal() {
+ const modal = $('modalSetupStartProgress');
+ if (modal) modal.style.display = 'none';
+ isConfiguring = false;
+ const btn = $('btnSubmitSetup');
+ const btnBack = $('btnBackTo5');
+ if (btn) {
+ btn.disabled = false;
+ btn.style.opacity = '';
+ }
+ if (btnBack) btnBack.disabled = false;
+ }
+
async function submitSetup() {
if (isConfiguring) return;
- const msg = $('setupMessage');
const btn = $('btnSubmitSetup');
const btnBack = $('btnBackTo5');
- const progBox = $('setupProgressContainer');
- const progBar = $('setupProgressBar');
const isEn = currentLanguage.startsWith('en');
- msg.textContent = '';
- msg.style.color = 'var(--muted)';
-
const ssid = $('setupSsid') ? $('setupSsid').value.trim() : '';
const password = $('setupPassword') ? $('setupPassword').value : '';
const confirmation = $('setupPasswordConfirm') ? $('setupPasswordConfirm').value : '';
@@ -5797,17 +5944,86 @@
if (notifSt.anyChecked && !notifSt.ready) { goToStep(4); return validateStep4(); }
isConfiguring = true;
- btn.disabled = true;
+ if (btn) {
+ btn.disabled = true;
+ btn.style.opacity = '0.7';
+ }
if (btnBack) btnBack.disabled = true;
- btn.style.opacity = '0.7';
- if (progBox) progBox.style.display = 'block';
- if (progBar) progBar.style.width = '20%';
+ // Affichage de la fenêtre modale de progression (même style que la restauration)
+ const modal = $('modalSetupStartProgress');
+ if (modal) modal.style.display = 'flex';
+ if ($('setupStartErrorBox')) $('setupStartErrorBox').style.display = 'none';
+ if ($('setupStartIcon')) {
+ $('setupStartIcon').textContent = '🚀';
+ $('setupStartIcon').style.animation = 'iconFloat 2s ease-in-out infinite';
+ }
+ if ($('setupStartBadgeIcon')) {
+ $('setupStartBadgeIcon').textContent = '⚙️';
+ $('setupStartBadgeIcon').style.animation = 'spin 1.5s linear infinite';
+ }
+ if ($('setupStartBadgeText')) {
+ $('setupStartBadgeText').textContent = t('setup_launch_badge', 'Configuration en cours…');
+ }
+
+ function updateSetupModalStep(stepIdx, pct, statusText, detailsText, isError = false) {
+ if ($('setupStartProgressBar')) $('setupStartProgressBar').style.width = pct + '%';
+ if ($('setupStartPercent')) $('setupStartPercent').textContent = pct + '%';
+ if ($('setupStartStepLabel')) {
+ const tmpl = t('setup_step_label', isEn ? 'Étape {step} / 5' : 'Étape {step} / 5');
+ $('setupStartStepLabel').textContent = tmpl.replace('{step}', String(stepIdx));
+ }
+ if (statusText && $('setupStartStatusText')) {
+ $('setupStartStatusText').style.color = isError ? 'var(--red)' : 'var(--text)';
+ $('setupStartStatusText').textContent = statusText;
+ }
+ if (detailsText && $('setupStartDetails')) $('setupStartDetails').textContent = detailsText;
+
+ const steps = [
+ { id: 'setupStepAdmin', stateId: 'setupStepAdminState' },
+ { id: 'setupStepWifi', stateId: 'setupStepWifiState' },
+ { id: 'setupStepVpn', stateId: 'setupStepVpnState' },
+ { id: 'setupStepNotif', stateId: 'setupStepNotifState' },
+ { id: 'setupStepPrefs', stateId: 'setupStepPrefsState' }
+ ];
+
+ steps.forEach((s, idx) => {
+ const el = $(s.id);
+ const st = $(s.stateId);
+ if (!el || !st) return;
+ const num = idx + 1;
+ if (num < stepIdx) {
+ el.className = 'loader-step done';
+ el.style.borderColor = 'rgba(34, 197, 94, 0.3)';
+ st.textContent = '✓';
+ st.style.color = 'var(--green)';
+ } else if (num === stepIdx) {
+ if (isError) {
+ el.className = 'loader-step';
+ el.style.borderColor = 'rgba(239, 68, 68, 0.4)';
+ st.textContent = '❌';
+ st.style.color = 'var(--red)';
+ } else {
+ el.className = 'loader-step active';
+ el.style.borderColor = 'rgba(56, 189, 248, 0.4)';
+ st.textContent = '↻';
+ st.style.color = 'var(--blue)';
+ }
+ } else {
+ el.className = 'loader-step';
+ el.style.borderColor = 'transparent';
+ st.textContent = '⏳';
+ st.style.color = '';
+ }
+ });
+ }
try {
- // A. Création du compte administrateur
- msg.textContent = isEn ? '1/5 Creating administrator account…' : '1/5 Création du compte administrateur…';
- if (progBar) progBar.style.width = '25%';
+ // Étape 1 : Création du compte administrateur & session
+ updateSetupModalStep(1, 20,
+ t('setup_step1_admin_title', isEn ? 'Creating administrator account…' : 'Création du compte administrateur…'),
+ t('setup_step1_admin_desc', isEn ? 'Securing credentials and initializing session…' : 'Sécurisation des identifiants et création de la session…')
+ );
const rAdmin = await fetch(API_URL + '/api/auth/setup', {
method: 'POST',
@@ -5816,10 +6032,9 @@
});
const dAdmin = await rAdmin.json();
if (!rAdmin.ok && !dAdmin.message?.includes('déjà')) {
- throw new Error(dAdmin.error || 'Erreur lors de la création du compte');
+ throw new Error(dAdmin.error || (isEn ? 'Error creating administrator account' : 'Erreur lors de la création du compte'));
}
- // B. Connexion pour obtenir le jeton de session
let token = '';
try {
const rLog = await fetch(API_URL + '/api/login', {
@@ -5840,9 +6055,11 @@
const headers = getSetupAuthHeaders(token, true);
- // C. Configuration du réseau Wi-Fi
- msg.textContent = isEn ? '2/5 Configuring Wi-Fi Access Point…' : '2/5 Configuration du point d\'accès Wi-Fi…';
- if (progBar) progBar.style.width = '45%';
+ // Étape 2 : Configuration du point d'accès Wi-Fi
+ updateSetupModalStep(2, 40,
+ t('setup_step2_wifi_title', isEn ? 'Configuring Wi-Fi Access Point…' : 'Configuration du point d’accès Wi-Fi…'),
+ t('setup_step2_wifi_desc', isEn ? 'Applying SSID, security and network interfaces…' : 'Application des paramètres SSID, sécurité et interface réseau…')
+ );
const rSetup = await fetch(API_URL + '/api/setup', {
method: 'POST',
@@ -5857,12 +6074,17 @@
})
});
const dSetup = await rSetup.json();
- if (!rSetup.ok) throw new Error(dSetup.error || 'Erreur lors de la configuration du Wi-Fi');
+ if (!rSetup.ok) throw new Error(dSetup.error || (isEn ? 'Error configuring Wi-Fi network' : 'Erreur lors de la configuration du Wi-Fi'));
+
+ // Étape 3 : Profils VPN (si configurés)
+ updateSetupModalStep(3, 60,
+ t('setup_step3_vpn_title', isEn ? 'Configuring VPN profiles…' : 'Enregistrement des profils VPN…'),
+ setupVpnProfiles.length
+ ? (isEn ? `Registering ${setupVpnProfiles.length} VPN profile(s)…` : `Enregistrement de ${setupVpnProfiles.length} profil(s) VPN…`)
+ : (isEn ? 'No VPN profile configured (skipping)…' : 'Aucun profil VPN à enregistrer…')
+ );
- // D. Enregistrement des profils VPN (si ajoutés en Étape 5)
if (setupVpnProfiles.length) {
- msg.textContent = isEn ? '3/5 Saving VPN profiles…' : '3/5 Enregistrement des profils VPN…';
- if (progBar) progBar.style.width = '65%';
for (const p of setupVpnProfiles) {
try {
await fetch(API_URL + '/api/vpn/profiles', {
@@ -5883,10 +6105,15 @@
}
}
- // E. Enregistrement des notifications (si au moins un service configuré et testé)
+ // Étape 4 : Notifications & Alertes (si configurées)
+ updateSetupModalStep(4, 80,
+ t('setup_step4_notif_title', isEn ? 'Saving alert events & notifications…' : 'Enregistrement des alertes et notifications…'),
+ notifSt.ready
+ ? (isEn ? 'Configuring delivery channels and alert triggers…' : 'Configuration des canaux d’envoi et déclencheurs d’alerte…')
+ : (isEn ? 'No notification channel configured (skipping)…' : 'Aucun canal de notification à enregistrer…')
+ );
+
if (notifSt.ready) {
- msg.textContent = isEn ? '4/5 Saving notification channels & alert events…' : '4/5 Enregistrement des alertes et notifications…';
- if (progBar) progBar.style.width = '80%';
try {
const notifPayload = getNotificationFormPayload();
await fetch(API_URL + '/api/notifications/settings', {
@@ -5897,9 +6124,12 @@
} catch (_) { }
}
- // F. Enregistrement des préférences (Thème, langue, nom)
- msg.textContent = isEn ? '5/5 Finalizing preferences…' : '5/5 Finalisation des préférences…';
- if (progBar) progBar.style.width = '95%';
+ // Étape 5 : Préférences, recherche de mise à jour & planification des sauvegardes
+ updateSetupModalStep(5, 95,
+ t('setup_step5_prefs_title', isEn ? 'Finalizing preferences, updates & backups…' : 'Finalisation des préférences, mises à jour & sauvegardes…'),
+ t('setup_step5_prefs_desc', isEn ? 'Saving theme, application title, update interval and backup schedule…' : 'Enregistrement du thème, du titre, de la mise à jour auto et des sauvegardes…')
+ );
+
try {
await fetch(API_URL + '/api/preferences', {
method: 'POST',
@@ -5913,7 +6143,6 @@
});
} catch (_) { }
- // G. Enregistrement recherche de mise à jour & planification des sauvegardes
try {
const updEnabled = $('setupUpdateCheckerEnabled') ? $('setupUpdateCheckerEnabled').checked : true;
const updInterval = $('setupUpdateInterval') ? parseInt($('setupUpdateInterval').value, 10) : 1800;
@@ -5945,22 +6174,73 @@
});
} catch (_) { }
- if (progBar) progBar.style.width = '100%';
- msg.style.color = 'var(--green)';
- msg.textContent = isEn ? '✅ Configuration complete! Redirecting to dashboard…' : '✅ Configuration réussie ! Redirection vers le tableau de bord…';
+ // Succès complet !
+ if ($('setupStartProgressBar')) $('setupStartProgressBar').style.width = '100%';
+ if ($('setupStartPercent')) $('setupStartPercent').textContent = '100%';
+ if ($('setupStartIcon')) {
+ $('setupStartIcon').textContent = '✅';
+ $('setupStartIcon').style.animation = 'none';
+ }
+ if ($('setupStartBadgeIcon')) {
+ $('setupStartBadgeIcon').textContent = '✅';
+ $('setupStartBadgeIcon').style.animation = 'none';
+ }
+ if ($('setupStartBadgeText')) {
+ $('setupStartBadgeText').textContent = t('setup_launch_badge_complete', isEn ? 'Setup complete!' : 'Configuration réussie !');
+ }
+ if ($('setupStartStatusText')) {
+ $('setupStartStatusText').style.color = 'var(--green)';
+ $('setupStartStatusText').textContent = t('setup_launch_success_title', isEn ? '✅ AP Manageur configured successfully!' : '✅ Configuration réussie !');
+ }
+ if ($('setupStartDetails')) {
+ $('setupStartDetails').textContent = t('setup_launch_redirecting', isEn ? 'Redirecting to dashboard…' : 'Redirection vers le tableau de bord…');
+ }
+
+ // Marquer toutes les 5 étapes à 'done'
+ ['setupStepAdmin', 'setupStepWifi', 'setupStepVpn', 'setupStepNotif', 'setupStepPrefs'].forEach((id, idx) => {
+ const el = $(id);
+ const st = $(['setupStepAdminState', 'setupStepWifiState', 'setupStepVpnState', 'setupStepNotifState', 'setupStepPrefsState'][idx]);
+ if (el && st) {
+ el.className = 'loader-step done';
+ el.style.borderColor = 'rgba(34, 197, 94, 0.3)';
+ st.textContent = '✓';
+ st.style.color = 'var(--green)';
+ }
+ });
setTimeout(() => {
location.href = '/';
}, 1200);
} catch (err) {
- msg.style.color = 'var(--red)';
- msg.textContent = '❌ ' + (err.message || 'Une erreur est survenue');
+ if ($('setupStartIcon')) {
+ $('setupStartIcon').textContent = '❌';
+ $('setupStartIcon').style.animation = 'none';
+ }
+ if ($('setupStartBadgeIcon')) {
+ $('setupStartBadgeIcon').textContent = '⚠️';
+ $('setupStartBadgeIcon').style.animation = 'none';
+ }
+ if ($('setupStartBadgeText')) {
+ $('setupStartBadgeText').textContent = isEn ? 'Error' : 'Échec';
+ }
+ if ($('setupStartStatusText')) {
+ $('setupStartStatusText').style.color = 'var(--red)';
+ $('setupStartStatusText').textContent = isEn ? 'Configuration stopped' : 'La configuration a rencontré une erreur';
+ }
+ if ($('setupStartDetails')) {
+ $('setupStartDetails').textContent = err.message || (isEn ? 'An unexpected error occurred' : 'Une erreur inattendue est survenue');
+ }
+ if ($('setupStartErrorBox')) {
+ $('setupStartErrorBox').style.display = 'block';
+ if ($('setupStartErrorText')) $('setupStartErrorText').textContent = '❌ ' + (err.message || 'Une erreur est survenue');
+ }
isConfiguring = false;
- btn.disabled = false;
+ if (btn) {
+ btn.disabled = false;
+ btn.style.opacity = '';
+ }
if (btnBack) btnBack.disabled = false;
- btn.style.opacity = '';
- if (progBox) progBox.style.display = 'none';
}
}
diff --git a/version.json b/version.json
index df9a5ec..6afa1f8 100644
--- a/version.json
+++ b/version.json
@@ -1,5 +1,5 @@
{
"version": "V1.2 (Bêta)",
- "commit": "2b4e6570bfc6f939abdbbdd436ad4222beaf8258",
- "build_date": "2026-11-23T16:27:08Z"
+ "commit": "e905ce909768b6edbc136cebff3e15c7da86ba96",
+ "build_date": "2026-11-23T16:39:51Z"
}
\ No newline at end of file