AP manageur V1.2 (Bêta)
This commit is contained in:
1 parent
a53fa69034
commit
e26c08e41d
2 files changed
+38
-10
No files matched your search
+36
-8
@@ -3322,7 +3322,7 @@
|
|||||||
<label class="label" for="settingsSsid" data-i18n="settings_ssid_label">Nom du SSID</label>
|
<label class="label" for="settingsSsid" data-i18n="settings_ssid_label">Nom du SSID</label>
|
||||||
<input id="settingsSsid" type="text" maxlength="32">
|
<input id="settingsSsid" type="text" maxlength="32">
|
||||||
<label class="label" for="settingsPassword" data-i18n="settings_pwd_label">Mot de passe Wi‑Fi</label>
|
<label class="label" for="settingsPassword" data-i18n="settings_pwd_label">Mot de passe Wi‑Fi</label>
|
||||||
<div style="display:flex;gap:8px;margin:7px 0 16px">
|
<div style="display:flex;gap:8px;margin:7px 0 6px">
|
||||||
<input id="settingsPassword" type="password" minlength="8" maxlength="63" style="margin:0">
|
<input id="settingsPassword" type="password" minlength="8" maxlength="63" style="margin:0">
|
||||||
<button id="toggleSettingsPassword" class="secondary" type="button" aria-label="Afficher le mot de passe"
|
<button id="toggleSettingsPassword" class="secondary" type="button" aria-label="Afficher le mot de passe"
|
||||||
title="Afficher le mot de passe" data-i18n-title="btn_show_pwd" data-i18n-aria-label="btn_show_pwd"><svg
|
title="Afficher le mot de passe" data-i18n-title="btn_show_pwd" data-i18n-aria-label="btn_show_pwd"><svg
|
||||||
@@ -3332,7 +3332,16 @@
|
|||||||
<circle cx="12" cy="12" r="3" />
|
<circle cx="12" cy="12" r="3" />
|
||||||
</svg></button>
|
</svg></button>
|
||||||
</div>
|
</div>
|
||||||
<label class="label" for="settingsSecurity" data-i18n="settings_security_label">Sécurité Wi‑Fi</label>
|
|
||||||
|
<div id="pwdStrengthWrap_wifi" style="margin:0 0 16px;display:none">
|
||||||
|
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:4px;font-size:11.5px">
|
||||||
|
<span class="muted" data-i18n="pwd_strength_label">Force du mot de passe :</span>
|
||||||
|
<span id="pwdStrengthText_wifi" style="font-weight:700"></span>
|
||||||
|
</div>
|
||||||
|
<div style="height:4px;background:var(--line);border-radius:4px;overflow:hidden">
|
||||||
|
<div id="pwdStrengthBar_wifi" style="height:100%;width:0%;border-radius:4px;transition:width .25s ease, background-color .25s ease"></div>
|
||||||
|
</div>
|
||||||
|
</div> <label class="label" for="settingsSecurity" data-i18n="settings_security_label">Sécurité Wi‑Fi</label>
|
||||||
<select id="settingsSecurity"
|
<select id="settingsSecurity"
|
||||||
style="display:block;width:100%;margin:7px 0 16px;padding:12px;border-radius:9px;border:1px solid var(--line);background:var(--panel2);color:var(--text);font-size:15px">
|
style="display:block;width:100%;margin:7px 0 16px;padding:12px;border-radius:9px;border:1px solid var(--line);background:var(--panel2);color:var(--text);font-size:15px">
|
||||||
<option value="wpa1">WPA1</option>
|
<option value="wpa1">WPA1</option>
|
||||||
@@ -7885,6 +7894,7 @@
|
|||||||
try {
|
try {
|
||||||
updatePasswordStrengthIndicator('new');
|
updatePasswordStrengthIndicator('new');
|
||||||
updatePasswordStrengthIndicator('confirm');
|
updatePasswordStrengthIndicator('confirm');
|
||||||
|
updatePasswordStrengthIndicator('wifi');
|
||||||
} catch (_) { }
|
} catch (_) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9764,6 +9774,7 @@ ${vpnBadgeTopo}
|
|||||||
$('uptime').textContent = status.active ? uptime(status.uptime_seconds) : '—';
|
$('uptime').textContent = status.active ? uptime(status.uptime_seconds) : '—';
|
||||||
$('settingsSsid').value = status.ssid || '';
|
$('settingsSsid').value = status.ssid || '';
|
||||||
$('settingsPassword').value = status.password || '';
|
$('settingsPassword').value = status.password || '';
|
||||||
|
if (typeof updatePasswordStrengthIndicator === 'function') { try { updatePasswordStrengthIndicator('wifi'); } catch (_) { } }
|
||||||
$('settingsSecurity').value = status.security || 'wpa2';
|
$('settingsSecurity').value = status.security || 'wpa2';
|
||||||
if ($('settingsMaxClients')) $('settingsMaxClients').value = status.max_clients !== undefined ? status.max_clients : 0;
|
if ($('settingsMaxClients')) $('settingsMaxClients').value = status.max_clients !== undefined ? status.max_clients : 0;
|
||||||
const isBridge = status.mode === 'bridge';
|
const isBridge = status.mode === 'bridge';
|
||||||
@@ -13627,12 +13638,24 @@ ${vpnBadgeTopo}
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updatePasswordStrengthIndicator(type) {
|
function updatePasswordStrengthIndicator(type) {
|
||||||
const isConfirm = (type === 'confirm');
|
let input, wrap, bar, text, matchText = null;
|
||||||
const input = isConfirm ? $('authSettingsPasswordConfirm') : $('authSettingsPassword');
|
if (type === 'confirm') {
|
||||||
const wrap = isConfirm ? $('pwdStrengthWrap_confirm') : $('pwdStrengthWrap_new');
|
input = $('authSettingsPasswordConfirm');
|
||||||
const bar = isConfirm ? $('pwdStrengthBar_confirm') : $('pwdStrengthBar_new');
|
wrap = $('pwdStrengthWrap_confirm');
|
||||||
const text = isConfirm ? $('pwdStrengthText_confirm') : $('pwdStrengthText_new');
|
bar = $('pwdStrengthBar_confirm');
|
||||||
const matchText = isConfirm ? $('pwdMatchText_confirm') : null;
|
text = $('pwdStrengthText_confirm');
|
||||||
|
matchText = $('pwdMatchText_confirm');
|
||||||
|
} else if (type === 'wifi') {
|
||||||
|
input = $('settingsPassword');
|
||||||
|
wrap = $('pwdStrengthWrap_wifi');
|
||||||
|
bar = $('pwdStrengthBar_wifi');
|
||||||
|
text = $('pwdStrengthText_wifi');
|
||||||
|
} else {
|
||||||
|
input = $('authSettingsPassword');
|
||||||
|
wrap = $('pwdStrengthWrap_new');
|
||||||
|
bar = $('pwdStrengthBar_new');
|
||||||
|
text = $('pwdStrengthText_new');
|
||||||
|
}
|
||||||
|
|
||||||
if (!input || !wrap || !bar || !text) return;
|
if (!input || !wrap || !bar || !text) return;
|
||||||
const val = input.value;
|
const val = input.value;
|
||||||
@@ -13680,6 +13703,11 @@ ${vpnBadgeTopo}
|
|||||||
updatePasswordStrengthIndicator('confirm');
|
updatePasswordStrengthIndicator('confirm');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if ($('settingsPassword')) {
|
||||||
|
$('settingsPassword').addEventListener('input', () => {
|
||||||
|
updatePasswordStrengthIndicator('wifi');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$('apControl').onclick = () => controlAp(status.active ? 'stop' : 'start');
|
$('apControl').onclick = () => controlAp(status.active ? 'stop' : 'start');
|
||||||
$('apRestart').onclick = () => { if (status && status.active) controlAp('restart'); };
|
$('apRestart').onclick = () => { if (status && status.active) controlAp('restart'); };
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "V1.2 (Bêta)",
|
"version": "V1.2 (Bêta)",
|
||||||
"commit": "ff840ae03ed9362f1aeffa039ba70f6e89cef18c",
|
"commit": "a53fa690348af669cd4a143007923d2a362f5473",
|
||||||
"build_date": "2026-11-23T14:36:06Z"
|
"build_date": "2026-11-23T15:07:25Z"
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user