AP manageur V1.1 (Bêta)
This commit is contained in:
1 parent
13d57a7b65
commit
795d08eedf
4 files changed
+116
-80
No files matched your search
+9
-9
@@ -2376,7 +2376,7 @@
|
||||
Administration de l’AP Wi‑Fi</h2>
|
||||
<div class="sub" style="margin-top:4px"><span class="app-short-title">AP Manageur</span> <span
|
||||
class="app-version"
|
||||
style="font-weight:700;background:var(--panel2);padding:2px 8px;border-radius:6px;border:1px solid var(--line);color:var(--blue);font-size:11px;margin-left:4px">V1.2 (Bêta)</span>
|
||||
style="font-weight:700;background:var(--panel2);padding:2px 8px;border-radius:6px;border:1px solid var(--line);color:var(--blue);font-size:11px;margin-left:4px">V1.1 (Bêta)</span>
|
||||
</div>
|
||||
<div id="loaderBadge"
|
||||
style="display:inline-flex;align-items:center;gap:6px;background:rgba(56,189,248,0.12);border:1px solid rgba(56,189,248,0.3);color:var(--blue);padding:3px 12px;border-radius:20px;font-size:12px;font-weight:600;margin-top:8px">
|
||||
@@ -2571,7 +2571,7 @@
|
||||
<div>
|
||||
<h1><span class="app-title" data-i18n="app_main_heading">Administration de l’AP Wi‑Fi</span></h1>
|
||||
<div class="sub"><span class="app-short-title">AP Manageur</span> <span class="app-version"
|
||||
style="font-weight:700;background:var(--panel2);padding:2px 8px;border-radius:6px;border:1px solid var(--line);color:var(--blue);font-size:12px;margin-left:4px">V1.2 (Bêta)</span>
|
||||
style="font-weight:700;background:var(--panel2);padding:2px 8px;border-radius:6px;border:1px solid var(--line);color:var(--blue);font-size:12px;margin-left:4px">V1.1 (Bêta)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
@@ -5616,7 +5616,7 @@
|
||||
<div id="advUpdateCurrentCommit"
|
||||
style="font-family:monospace;font-size:16px;font-weight:700;color:var(--text);margin-top:2px">—</div>
|
||||
<div class="muted" style="font-size:11px;margin-top:2px" id="advUpdateVersionTag"><span
|
||||
class="app-short-title">AP Manageur</span> <span class="app-version">V1.2 (Bêta)</span></div>
|
||||
class="app-short-title">AP Manageur</span> <span class="app-version">V1.1 (Bêta)</span></div>
|
||||
</div>
|
||||
<div style="background:var(--panel2);padding:10px 12px;border-radius:8px;border:1px solid var(--line)">
|
||||
<div class="label" data-i18n="adv_update_latest_ver" style="font-size:11px">Dernière version (Gitea)</div>
|
||||
@@ -7417,7 +7417,7 @@
|
||||
function $(id) { return document.getElementById(id); }
|
||||
const API_URL = location.protocol === 'file:' ? 'http://127.0.0.1:8080' : '';
|
||||
/* Version de l'application */
|
||||
let APP_VERSION = "V1.2 (Bêta)";
|
||||
let APP_VERSION = "V1.1 (Bêta)";
|
||||
const ICON_REFRESH_ARROW = '<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" style="display:inline-block;vertical-align:middle"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.9 1 6.7 2.4L21 8"/><polyline points="21 3 21 8 16 8"/></svg>';
|
||||
const ICON_GEAR = '⚙️';
|
||||
const ICON_TABLET = '<svg width="1.15em" height="1.15em" viewBox="0 0 24 24" fill="none" style="display:inline-block;vertical-align:-0.18em;flex-shrink:0" aria-label="Tablette"><rect x="2.5" y="1.5" width="19" height="21" rx="2.5" fill="#1e293b" stroke="#64748b" stroke-width="1"/><rect x="4" y="3.2" width="16" height="15.6" rx="1.2" fill="#38bdf8"/><circle cx="12" cy="2.3" r="0.5" fill="#94a3b8"/><rect x="10" y="20" width="4" height="1.2" rx="0.6" fill="#94a3b8"/></svg>';
|
||||
@@ -8025,7 +8025,7 @@
|
||||
}
|
||||
if (devName) options.headers['X-Device-Name'] = encodeURIComponent(devName);
|
||||
let timer;
|
||||
const timeoutMs = options.timeout || 15000;
|
||||
const timeoutMs = options.timeout || 45000;
|
||||
const isEn = typeof currentLanguage !== 'undefined' && currentLanguage.startsWith('en');
|
||||
const timeStr = `${Math.round(timeoutMs / 1000)}s`;
|
||||
const timeoutMsg = isEn ? `Request timed out (${timeStr})` : `Délai d'attente dépassé (${timeStr})`;
|
||||
@@ -9621,7 +9621,7 @@ ${vpnBadgeTopo}
|
||||
async function controlAp(action) {
|
||||
return runAction(async () => {
|
||||
try {
|
||||
const response = await apiFetch('/api/ap/control', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action }) });
|
||||
const response = await apiFetch('/api/ap/control', { method: 'POST', timeout: 45000, headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action }) });
|
||||
const data = await response.json(); if (!response.ok) throw Error(data.error || 'Action refusée');
|
||||
await new Promise(resolve => setTimeout(resolve, 1000)); await load();
|
||||
} catch (e) { alert(tErr(e.message)) }
|
||||
@@ -10326,7 +10326,7 @@ ${vpnBadgeTopo}
|
||||
|
||||
// Rafraîchir en arrière-plan depuis l'API
|
||||
try {
|
||||
const res = await apiFetch(`/api/devices/limits?mac=${encodeURIComponent(cleanMac)}`, { timeout: 15000 });
|
||||
const res = await apiFetch(`/api/devices/limits?mac=${encodeURIComponent(cleanMac)}`, { timeout: 30000 });
|
||||
if (res.ok) {
|
||||
const data = await res.json();
|
||||
if (data && data.limits) {
|
||||
@@ -13875,7 +13875,7 @@ ${vpnBadgeTopo}
|
||||
try {
|
||||
const sMode = document.querySelector('input[name="setupMode"]:checked')?.value || 'ap';
|
||||
const sEth = $('setupBridgeEth')?.value || '';
|
||||
const response = await apiFetch('/api/setup', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ ssid: $('setupSsid').value, password: password, security: $('setupSecurity').value, mode: sMode, bridge_eth: sEth, max_clients: parseInt($('setupMaxClients') ? $('setupMaxClients').value : 0, 10) || 0 }) });
|
||||
const response = await apiFetch('/api/setup', { method: 'POST', timeout: 60000, headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ ssid: $('setupSsid').value, password: password, security: $('setupSecurity').value, mode: sMode, bridge_eth: sEth, max_clients: parseInt($('setupMaxClients') ? $('setupMaxClients').value : 0, 10) || 0 }) });
|
||||
const data = await response.json(); if (!response.ok) throw Error(data.error || 'Configuration refusée');
|
||||
message.textContent = data.message; currentTab = 'dashboard'; sessionStorage.setItem('apDashboardTab', 'dashboard');
|
||||
await new Promise(resolve => setTimeout(resolve, 500)); await load();
|
||||
@@ -13906,7 +13906,7 @@ ${vpnBadgeTopo}
|
||||
try {
|
||||
const setMode = document.querySelector('input[name="settingsMode"]:checked')?.value || 'ap';
|
||||
const setEth = $('settingsBridgeEth')?.value || '';
|
||||
let r = await apiFetch('/api/settings', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ ssid: $('settingsSsid').value, password: $('settingsPassword').value, security: $('settingsSecurity').value, mode: setMode, bridge_eth: setEth, max_clients: parseInt($('settingsMaxClients') ? $('settingsMaxClients').value : 0, 10) || 0, autoconnect: $('settingsAutoconnect').checked }) });
|
||||
let r = await apiFetch('/api/settings', { method: 'POST', timeout: 60000, headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ ssid: $('settingsSsid').value, password: $('settingsPassword').value, security: $('settingsSecurity').value, mode: setMode, bridge_eth: setEth, max_clients: parseInt($('settingsMaxClients') ? $('settingsMaxClients').value : 0, 10) || 0, autoconnect: $('settingsAutoconnect').checked }) });
|
||||
let d = await r.json(); if (!r.ok) throw Error(d.error);
|
||||
m.textContent = tMsg(d.message); await new Promise(resolve => setTimeout(resolve, 1000)); await load();
|
||||
} catch (e) { m.textContent = tErr(e.message); }
|
||||
|
||||
Reference in new issue
Block a user