APmanageur Wi-Fi V1.0

This commit is contained in:
yoannmultigaming committed 2026-11-18 16:50:21 +01:00
1 parent ca3cf6a55c
commit c30c47879a
1 file changed
+275 -33
+275 -33
View File
@@ -301,13 +301,17 @@
.step-panel { .step-panel {
display: none; display: none;
animation: fadeIn .2s ease; animation: stepSlideInNext .28s cubic-bezier(0.22, 1, 0.36, 1);
} }
.step-panel.active { .step-panel.active {
display: block; display: block;
} }
.step-panel.slide-prev {
animation: stepSlideInPrev .28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes fadeIn { @keyframes fadeIn {
from { from {
opacity: 0; opacity: 0;
@@ -320,6 +324,186 @@
} }
} }
@keyframes stepSlideInNext {
from {
opacity: 0;
transform: translateX(18px) translateY(2px);
}
to {
opacity: 1;
transform: translateX(0) translateY(0);
}
}
@keyframes stepSlideInPrev {
from {
opacity: 0;
transform: translateX(-18px) translateY(2px);
}
to {
opacity: 1;
transform: translateX(0) translateY(0);
}
}
@keyframes fieldReveal {
from {
opacity: 0;
transform: translateY(-6px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes eyePop {
0% {
transform: scale(1);
}
40% {
transform: scale(1.22) rotate(-8deg);
}
75% {
transform: scale(0.92) rotate(4deg);
}
100% {
transform: scale(1) rotate(0);
}
}
@keyframes badgePop {
0% {
transform: scale(0.82);
}
60% {
transform: scale(1.14);
}
100% {
transform: scale(1);
}
}
@keyframes errShake {
0%, 100% {
transform: translateX(0);
}
20% {
transform: translateX(-5px);
}
40% {
transform: translateX(5px);
}
60% {
transform: translateX(-3px);
}
80% {
transform: translateX(3px);
}
}
@keyframes modalPop {
from {
opacity: 0;
transform: scale(0.94) translateY(10px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
.pwd-eye-btn {
transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.pwd-eye-btn:hover {
transform: scale(1.06);
border-color: var(--blue);
}
.pwd-eye-btn.eye-pop {
animation: eyePop .32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pwd-eye-btn.is-visible {
border-color: var(--blue);
box-shadow: 0 0 0 2px rgba(92, 167, 255, 0.22);
}
.step-item.active .step-badge,
.step-item.completed .step-badge {
animation: badgePop .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lang-card,
.theme-card,
.mode-card,
.recap-box {
transition: transform .2s cubic-bezier(0.22, 1, 0.36, 1), border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.lang-card:hover,
.theme-card:hover,
.mode-card:hover {
transform: translateY(-2px);
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.lang-card:active,
.theme-card:active,
.mode-card:active {
transform: translateY(0) scale(0.98);
}
.field-reveal {
animation: fieldReveal .24s cubic-bezier(0.22, 1, 0.36, 1);
}
.err-shake {
animation: errShake .34s ease;
}
#modalSetupVpn > div,
#modalSetupBackup > div {
animation: modalPop .24s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
.step-panel,
.step-panel.slide-prev,
.pwd-eye-btn.eye-pop,
.step-item.active .step-badge,
.step-item.completed .step-badge,
.field-reveal,
.err-shake,
#modalSetupVpn > div,
#modalSetupBackup > div {
animation: none !important;
}
.pwd-eye-btn,
.lang-card,
.theme-card,
.mode-card,
.recap-box {
transition: none !important;
}
}
.panel-header { .panel-header {
margin-bottom: 20px; margin-bottom: 20px;
padding-bottom: 14px; padding-bottom: 14px;
@@ -964,8 +1148,9 @@
<div style="display:flex;gap:8px;margin-bottom:16px"> <div style="display:flex;gap:8px;margin-bottom:16px">
<input id="setupPassword" type="password" minlength="8" maxlength="63" placeholder="8 caractères minimum" <input id="setupPassword" type="password" minlength="8" maxlength="63" placeholder="8 caractères minimum"
data-i18n-placeholder="step2_pwd_ph" style="margin:0"> data-i18n-placeholder="step2_pwd_ph" style="margin:0">
<button class="secondary" type="button" onclick="togglePasswordVisibility('setupPassword', this)" <button class="secondary pwd-eye-btn" type="button" onclick="togglePasswordVisibility('setupPassword', this)"
title="Afficher/masquer">👁️</button> title="Afficher" aria-label="Afficher" data-i18n-title="toggle_pwd_show"
data-i18n-aria-label="toggle_pwd_show">👁️</button>
</div> </div>
<label class="label" for="setupPasswordConfirm" data-i18n="step2_pwd_confirm_label">Confirmation du mot de <label class="label" for="setupPasswordConfirm" data-i18n="step2_pwd_confirm_label">Confirmation du mot de
@@ -973,8 +1158,9 @@
<div style="display:flex;gap:8px;margin-bottom:16px"> <div style="display:flex;gap:8px;margin-bottom:16px">
<input id="setupPasswordConfirm" type="password" minlength="8" maxlength="63" <input id="setupPasswordConfirm" type="password" minlength="8" maxlength="63"
placeholder="Confirmation identique" data-i18n-placeholder="step2_pwd_confirm_ph" style="margin:0"> placeholder="Confirmation identique" data-i18n-placeholder="step2_pwd_confirm_ph" style="margin:0">
<button class="secondary" type="button" onclick="togglePasswordVisibility('setupPasswordConfirm', this)" <button class="secondary pwd-eye-btn" type="button" onclick="togglePasswordVisibility('setupPasswordConfirm', this)"
title="Afficher/masquer">👁️</button> title="Afficher" aria-label="Afficher" data-i18n-title="toggle_pwd_show"
data-i18n-aria-label="toggle_pwd_show">👁️</button>
</div> </div>
<label class="label" for="setupSecurity" data-i18n="step2_sec_label">Type de sécurité Wi-Fi</label> <label class="label" for="setupSecurity" data-i18n="step2_sec_label">Type de sécurité Wi-Fi</label>
@@ -1062,8 +1248,9 @@
<div style="display:flex;gap:8px;margin-bottom:16px"> <div style="display:flex;gap:8px;margin-bottom:16px">
<input id="setupAdminPassword" type="password" minlength="4" maxlength="128" <input id="setupAdminPassword" type="password" minlength="4" maxlength="128"
placeholder="Mot de passe robuste" data-i18n-placeholder="step3_pwd_ph" style="margin:0"> placeholder="Mot de passe robuste" data-i18n-placeholder="step3_pwd_ph" style="margin:0">
<button class="secondary" type="button" onclick="togglePasswordVisibility('setupAdminPassword', this)" <button class="secondary pwd-eye-btn" type="button" onclick="togglePasswordVisibility('setupAdminPassword', this)"
title="Afficher/masquer">👁️</button> title="Afficher" aria-label="Afficher" data-i18n-title="toggle_pwd_show"
data-i18n-aria-label="toggle_pwd_show">👁️</button>
</div> </div>
<label class="label" for="setupAdminPasswordConfirm" data-i18n="step3_pwd_confirm_label">Confirmation du mot <label class="label" for="setupAdminPasswordConfirm" data-i18n="step3_pwd_confirm_label">Confirmation du mot
@@ -1071,9 +1258,10 @@
<div style="display:flex;gap:8px;margin-bottom:16px"> <div style="display:flex;gap:8px;margin-bottom:16px">
<input id="setupAdminPasswordConfirm" type="password" minlength="4" maxlength="128" <input id="setupAdminPasswordConfirm" type="password" minlength="4" maxlength="128"
placeholder="Ressaisissez le mot de passe" data-i18n-placeholder="step3_pwd_confirm_ph" style="margin:0"> placeholder="Ressaisissez le mot de passe" data-i18n-placeholder="step3_pwd_confirm_ph" style="margin:0">
<button class="secondary" type="button" <button class="secondary pwd-eye-btn" type="button"
onclick="togglePasswordVisibility('setupAdminPasswordConfirm', this)" onclick="togglePasswordVisibility('setupAdminPasswordConfirm', this)"
title="Afficher/masquer">👁️</button> title="Afficher" aria-label="Afficher" data-i18n-title="toggle_pwd_show"
data-i18n-aria-label="toggle_pwd_show">👁️</button>
</div> </div>
<div class="notice" style="margin-top:8px" data-i18n-html="step3_security_note"> <div class="notice" style="margin-top:8px" data-i18n-html="step3_security_note">
@@ -1191,8 +1379,9 @@
<div style="display:flex;gap:8px;margin:7px 0 16px"> <div style="display:flex;gap:8px;margin:7px 0 16px">
<input id="notifEmailPass" type="password" placeholder="Mot de passe ou mot de passe d’application" <input id="notifEmailPass" type="password" placeholder="Mot de passe ou mot de passe d’application"
data-i18n-placeholder="placeholder_email_pass" style="margin:0"> data-i18n-placeholder="placeholder_email_pass" style="margin:0">
<button id="toggleNotifEmailPass" class="secondary" type="button" <button id="toggleNotifEmailPass" class="secondary pwd-eye-btn" type="button"
aria-label="Afficher le mot de passe" title="Afficher le mot de passe" aria-label="Afficher" title="Afficher" data-i18n-title="toggle_pwd_show"
data-i18n-aria-label="toggle_pwd_show"
onclick="togglePasswordVisibility('notifEmailPass', this)">👁️</button> onclick="togglePasswordVisibility('notifEmailPass', this)">👁️</button>
</div> </div>
@@ -1354,8 +1543,9 @@
d’application (Token APPS)</label> d’application (Token APPS)</label>
<div style="display:flex;gap:8px;margin:7px 0 16px"> <div style="display:flex;gap:8px;margin:7px 0 16px">
<input id="notifGotifyToken" type="password" placeholder="gtfya.xxxx ou Axxxx" style="margin:0"> <input id="notifGotifyToken" type="password" placeholder="gtfya.xxxx ou Axxxx" style="margin:0">
<button id="toggleNotifGotifyToken" class="secondary" type="button" <button id="toggleNotifGotifyToken" class="secondary pwd-eye-btn" type="button"
aria-label="Afficher le jeton" title="Afficher le jeton" aria-label="Afficher" title="Afficher" data-i18n-title="toggle_pwd_show"
data-i18n-aria-label="toggle_pwd_show"
onclick="togglePasswordVisibility('notifGotifyToken', this)">👁️</button> onclick="togglePasswordVisibility('notifGotifyToken', this)">👁️</button>
</div> </div>
</div> </div>
@@ -1473,8 +1663,8 @@
(optionnel pour topic privé)</label> (optionnel pour topic privé)</label>
<div style="display:flex;gap:8px;margin:7px 0 16px"> <div style="display:flex;gap:8px;margin:7px 0 16px">
<input id="notifNtfyToken" type="password" placeholder="tk_xxxxxxxxxxxx" style="margin:0"> <input id="notifNtfyToken" type="password" placeholder="tk_xxxxxxxxxxxx" style="margin:0">
<button id="toggleNotifNtfyToken" class="secondary" type="button" aria-label="Afficher le jeton" <button id="toggleNotifNtfyToken" class="secondary pwd-eye-btn" type="button" aria-label="Afficher"
title="Afficher le jeton" title="Afficher" data-i18n-title="toggle_pwd_show" data-i18n-aria-label="toggle_pwd_show"
onclick="togglePasswordVisibility('notifNtfyToken', this)">👁️</button> onclick="togglePasswordVisibility('notifNtfyToken', this)">👁️</button>
</div> </div>
</div> </div>
@@ -1525,8 +1715,9 @@
<div style="display:flex;gap:8px;margin:7px 0 16px"> <div style="display:flex;gap:8px;margin:7px 0 16px">
<input id="notifPushbulletToken" type="password" placeholder="o.xxxxxxxxxxxxxxxxxxxxxxxxxxxx" <input id="notifPushbulletToken" type="password" placeholder="o.xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
style="margin:0"> style="margin:0">
<button id="toggleNotifPushbulletToken" class="secondary" type="button" <button id="toggleNotifPushbulletToken" class="secondary pwd-eye-btn" type="button"
aria-label="Afficher le jeton" title="Afficher le jeton" aria-label="Afficher" title="Afficher" data-i18n-title="toggle_pwd_show"
data-i18n-aria-label="toggle_pwd_show"
onclick="togglePasswordVisibility('notifPushbulletToken', this)">👁️</button> onclick="togglePasswordVisibility('notifPushbulletToken', this)">👁️</button>
</div> </div>
@@ -1577,8 +1768,9 @@
<div style="display:flex;gap:8px;margin:7px 0 16px"> <div style="display:flex;gap:8px;margin:7px 0 16px">
<input id="notifPushoverUser" type="password" placeholder="uQiRzpo4DXghDmr9Qnoxf5p6Bp3..." <input id="notifPushoverUser" type="password" placeholder="uQiRzpo4DXghDmr9Qnoxf5p6Bp3..."
style="margin:0"> style="margin:0">
<button id="toggleNotifPushoverUser" class="secondary" type="button" <button id="toggleNotifPushoverUser" class="secondary pwd-eye-btn" type="button"
aria-label="Afficher la clé" title="Afficher la clé" aria-label="Afficher" title="Afficher" data-i18n-title="toggle_pwd_show"
data-i18n-aria-label="toggle_pwd_show"
onclick="togglePasswordVisibility('notifPushoverUser', this)">👁️</button> onclick="togglePasswordVisibility('notifPushoverUser', this)">👁️</button>
</div> </div>
</div> </div>
@@ -1588,8 +1780,9 @@
<div style="display:flex;gap:8px;margin:7px 0 16px"> <div style="display:flex;gap:8px;margin:7px 0 16px">
<input id="notifPushoverToken" type="password" placeholder="azGDORePK8gMaC0QOYAMyEEuzJ3..." <input id="notifPushoverToken" type="password" placeholder="azGDORePK8gMaC0QOYAMyEEuzJ3..."
style="margin:0"> style="margin:0">
<button id="toggleNotifPushoverToken" class="secondary" type="button" <button id="toggleNotifPushoverToken" class="secondary pwd-eye-btn" type="button"
aria-label="Afficher le jeton" title="Afficher le jeton" aria-label="Afficher" title="Afficher" data-i18n-title="toggle_pwd_show"
data-i18n-aria-label="toggle_pwd_show"
onclick="togglePasswordVisibility('notifPushoverToken', this)">👁️</button> onclick="togglePasswordVisibility('notifPushoverToken', this)">👁️</button>
</div> </div>
</div> </div>
@@ -1693,8 +1886,8 @@
<div style="display:flex;gap:8px;margin:7px 0 16px"> <div style="display:flex;gap:8px;margin:7px 0 16px">
<input id="notifTelegramToken" type="password" placeholder="123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ" <input id="notifTelegramToken" type="password" placeholder="123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ"
style="margin:0"> style="margin:0">
<button id="toggleNotifTelegramToken" class="secondary" type="button" aria-label="Afficher le jeton" <button id="toggleNotifTelegramToken" class="secondary pwd-eye-btn" type="button" aria-label="Afficher"
title="Afficher le jeton" title="Afficher" data-i18n-title="toggle_pwd_show" data-i18n-aria-label="toggle_pwd_show"
onclick="togglePasswordVisibility('notifTelegramToken', this)">👁️</button> onclick="togglePasswordVisibility('notifTelegramToken', this)">👁️</button>
</div> </div>
@@ -2416,7 +2609,9 @@
'modal_vpn_auth_opt': 'Identifiants OpenVPN (si requis par le fournisseur) :', 'modal_vpn_auth_opt': 'Identifiants OpenVPN (si requis par le fournisseur) :',
'modal_vpn_autoconnect': 'Connexion automatique au démarrage', 'modal_vpn_autoconnect': 'Connexion automatique au démarrage',
'modal_vpn_save_btn': 'Ajouter ce profil', 'modal_vpn_save_btn': 'Ajouter ce profil',
'btn_cancel': 'Annuler' 'btn_cancel': 'Annuler',
'toggle_pwd_show': 'Afficher',
'toggle_pwd_hide': 'Masquer'
}, },
'en-us': { 'en-us': {
'page_title': 'Initial Setup - AP Manageur', 'page_title': 'Initial Setup - AP Manageur',
@@ -2551,7 +2746,9 @@
'modal_vpn_auth_opt': 'OpenVPN Credentials (if required by provider):', 'modal_vpn_auth_opt': 'OpenVPN Credentials (if required by provider):',
'modal_vpn_autoconnect': 'Automatic connection on startup', 'modal_vpn_autoconnect': 'Automatic connection on startup',
'modal_vpn_save_btn': 'Add this profile', 'modal_vpn_save_btn': 'Add this profile',
'btn_cancel': 'Cancel' 'btn_cancel': 'Cancel',
'toggle_pwd_show': 'Show',
'toggle_pwd_hide': 'Hide'
}, },
'en-gb': { 'en-gb': {
'page_title': 'Initial Setup - AP Manageur', 'page_title': 'Initial Setup - AP Manageur',
@@ -2686,7 +2883,9 @@
'modal_vpn_auth_opt': 'OpenVPN Credentials (if required by provider):', 'modal_vpn_auth_opt': 'OpenVPN Credentials (if required by provider):',
'modal_vpn_autoconnect': 'Automatic connection on startup', 'modal_vpn_autoconnect': 'Automatic connection on startup',
'modal_vpn_save_btn': 'Add this profile', 'modal_vpn_save_btn': 'Add this profile',
'btn_cancel': 'Cancel' 'btn_cancel': 'Cancel',
'toggle_pwd_show': 'Show',
'toggle_pwd_hide': 'Hide'
} }
}; };
@@ -2781,14 +2980,34 @@
function togglePasswordVisibility(id, btn) { function togglePasswordVisibility(id, btn) {
const el = $(id); const el = $(id);
if (!el) return; if (!el) return;
const isPwd = el.type === 'password'; const show = el.type === 'password';
el.type = isPwd ? 'text' : 'password'; el.type = show ? 'text' : 'password';
if (btn) btn.textContent = isPwd ? '🙈' : '👁️'; if (btn) {
btn.textContent = show ? '🙈' : '👁️';
const key = show ? 'toggle_pwd_hide' : 'toggle_pwd_show';
const label = t(key, show ? 'Masquer' : 'Afficher');
btn.setAttribute('data-i18n-title', key);
btn.setAttribute('data-i18n-aria-label', key);
btn.setAttribute('title', label);
btn.setAttribute('aria-label', label);
btn.classList.toggle('is-visible', show);
btn.classList.remove('eye-pop');
void btn.offsetWidth;
btn.classList.add('eye-pop');
}
} }
function onModeChange() { function onModeChange() {
const isBridge = $('setupModeBridge') && $('setupModeBridge').checked; const isBridge = $('setupModeBridge') && $('setupModeBridge').checked;
if ($('setupBridgeBlock')) $('setupBridgeBlock').style.display = isBridge ? 'block' : 'none'; const bBox = $('setupBridgeBlock');
if (bBox) {
bBox.style.display = isBridge ? 'block' : 'none';
if (isBridge) {
bBox.classList.remove('field-reveal');
void bBox.offsetWidth;
bBox.classList.add('field-reveal');
}
}
if ($('cardModeAp')) $('cardModeAp').classList.toggle('selected', !isBridge); if ($('cardModeAp')) $('cardModeAp').classList.toggle('selected', !isBridge);
if ($('cardModeBridge')) $('cardModeBridge').classList.toggle('selected', isBridge); if ($('cardModeBridge')) $('cardModeBridge').classList.toggle('selected', isBridge);
} }
@@ -2824,7 +3043,15 @@
const cap = t.charAt(0).toUpperCase() + t.slice(1); const cap = t.charAt(0).toUpperCase() + t.slice(1);
const en = $('notif' + cap + 'Enabled')?.checked; const en = $('notif' + cap + 'Enabled')?.checked;
const f = $('notif' + cap + 'Fields'); const f = $('notif' + cap + 'Fields');
if (f) f.style.display = en ? 'block' : 'none'; if (f) {
const wasHidden = f.style.display === 'none' || !f.style.display;
f.style.display = en ? 'block' : 'none';
if (en && wasHidden) {
f.classList.remove('field-reveal');
void f.offsetWidth;
f.classList.add('field-reveal');
}
}
}); });
updateStep4ContinueState(); updateStep4ContinueState();
} }
@@ -3404,13 +3631,22 @@
return; return;
} }
} }
const prevStep = currentStep;
currentStep = stepNum; currentStep = stepNum;
maxStepReached = Math.max(maxStepReached, stepNum); maxStepReached = Math.max(maxStepReached, stepNum);
// Panneaux // Panneaux (animation directionnelle gauche/droite)
for (let i = 1; i <= 6; i++) { for (let i = 1; i <= 6; i++) {
const panel = $('panelStep' + i); const panel = $('panelStep' + i);
if (panel) panel.classList.toggle('active', i === stepNum); if (panel) {
panel.classList.remove('slide-prev');
if (i === stepNum) {
if (stepNum < prevStep) panel.classList.add('slide-prev');
panel.classList.add('active');
} else {
panel.classList.remove('active');
}
}
} }
// Stepper // Stepper
@@ -3565,8 +3801,14 @@
function showError(el, msg) { function showError(el, msg) {
if (!el) return; if (!el) return;
const changed = el.style.display === 'none' || el.textContent !== msg;
el.textContent = msg; el.textContent = msg;
el.style.display = 'block'; el.style.display = 'block';
if (changed) {
el.classList.remove('err-shake');
void el.offsetWidth;
el.classList.add('err-shake');
}
} }
/* ============================================================ */ /* ============================================================ */