diff --git a/index.html b/index.html
index 8351629..5a8997e 100644
--- a/index.html
+++ b/index.html
@@ -2200,12 +2200,7 @@
Clients connectés
@@ -7730,37 +7725,6 @@ ${vpnBadgeTopo}
});
}
- let _switchingMode = false;
- async function quickSwitchMode(targetMode) {
- if (_switchingMode) return;
- const isBridge = status && status.mode === 'bridge';
- const nextMode = targetMode || (isBridge ? 'ap' : 'bridge');
- const btn = $('quickSwitchModeBtn');
- _switchingMode = true;
- if (btn) {
- btn.disabled = true;
- btn.textContent = '⏳ ' + t('mode_switching', 'Bascule…');
- }
- return runAction(async () => {
- try {
- const response = await apiFetch('/api/ap/mode', {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ mode: nextMode })
- });
- const data = await response.json();
- if (!response.ok) throw Error(data.error || 'Échec du changement de mode');
- await load();
- } catch (e) {
- alert(tErr(e.message));
- } finally {
- _switchingMode = false;
- if (btn) btn.disabled = false;
- render();
- }
- });
- }
-
function render() {
updateApButtons();
$('clientCount').textContent = status.max_clients > 0 ? `${clients.length} / ${status.max_clients}` : clients.length;
@@ -7777,16 +7741,6 @@ ${vpnBadgeTopo}
$('networkModeBadge').style.background = '';
$('networkModeBadge').style.color = '';
}
- if ($('quickSwitchModeBtn')) {
- const qbtn = $('quickSwitchModeBtn');
- qbtn.style.display = status.configured ? 'inline-flex' : 'none';
- if (!_switchingMode) {
- qbtn.textContent = isBridge ? '⇄ ' + t('btn_switch_to_ap', 'Mode AP') : '⇄ ' + t('btn_switch_to_bridge', 'Mode Pont');
- qbtn.title = isBridge
- ? t('tip_switch_to_ap', 'Basculer instantanément en Mode AP (Routeur/NAT)')
- : t('tip_switch_to_bridge', 'Basculer instantanément en Mode Pont (DHCP Box)');
- }
- }
if ($('settingsModeAp') && $('settingsModeBridge')) {
if (isBridge) $('settingsModeBridge').checked = true; else $('settingsModeAp').checked = true;
if ($('settingsBridgeBlock')) $('settingsBridgeBlock').style.display = isBridge ? 'block' : 'none';