APmanageur Wi-Fi V1.0

This commit is contained in:
yoannmultigaming committed 2026-11-21 04:12:57 +01:00
1 parent ceeab6fa4a
commit 6ab15cecec
6 files changed
+119 -43

No files matched your search

+71 -29
View File
@@ -83,9 +83,9 @@
}
.wrap {
max-width: 1100px;
max-width: 1200px;
margin: 0 auto;
padding: 24px;
padding: 20px 24px;
width: 100%
}
@@ -94,49 +94,52 @@
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
gap: 12px;
flex-wrap: wrap
gap: 16px;
}
h1 {
margin: 0;
font-size: 26px
font-size: 24px;
white-space: nowrap;
}
.sub {
color: var(--muted);
font-size: 14px;
margin-top: 4px
font-size: 13px;
margin-top: 3px
}
.header-actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
align-items: center
gap: 6px;
align-items: center;
flex-wrap: nowrap;
}
.header-actions button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
height: 38px;
padding: 9px 16px;
font-size: 14px;
gap: 6px;
height: 36px;
padding: 7px 12px;
font-size: 13px;
font-weight: 600;
border-radius: 8px;
box-sizing: border-box;
line-height: 1;
white-space: nowrap;
}
.btn-update-available {
background: rgba(16, 185, 129, 0.16) !important;
background: rgba(16, 185, 129, 0.15) !important;
border: 1px solid #10b981 !important;
color: #10b981 !important;
border: 1px solid rgba(16, 185, 129, 0.5) !important;
box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
transition: all 0.2s ease-in-out;
cursor: pointer;
padding: 7px 12px !important;
font-size: 13px !important;
}
.btn-update-available:hover {
@@ -2007,6 +2010,21 @@
}
}
/* Écrans moyens / Tablettes (<= 960px) */
@media (max-width: 960px) {
header {
flex-direction: column;
align-items: flex-start;
gap: 14px;
}
.header-actions {
width: 100%;
flex-wrap: wrap;
gap: 6px;
}
}
/* Téléphone et écrans compacts (<= 600px) */
@media (max-width:600px) {
.wrap {
@@ -5682,11 +5700,11 @@
<button id="closeUpdateModal" class="secondary" type="button" style="padding:4px 10px;font-size:16px;border-radius:6px" onclick="closeUpdateModal()">✕</button>
</div>
<div class="modal-body" style="gap:16px">
<div style="background:rgba(16,185,129,0.1);border:1px solid rgba(16,185,129,0.3);border-radius:8px;padding:12px;display:flex;align-items:center;gap:12px">
<span style="font-size:24px;line-height:1">🚀</span>
<div id="updateStatusAlert" style="background:rgba(16,185,129,0.1);border:1px solid rgba(16,185,129,0.3);border-radius:8px;padding:12px;display:flex;align-items:center;gap:12px">
<span id="updateStatusIcon" style="font-size:24px;line-height:1">🚀</span>
<div style="font-size:13px;line-height:1.4">
<div style="font-weight:600;color:#10b981" data-i18n="update_new_version_found">Une nouvelle version de AP Manageur est prête !</div>
<div style="color:var(--text2);font-size:12px" data-i18n="update_new_version_desc">Une mise à jour plus récente de l'application est disponible sur le dépôt.</div>
<div id="updateStatusTitle" style="font-weight:600;color:#10b981" data-i18n="update_new_version_found">Une nouvelle version de AP Manageur est prête !</div>
<div id="updateStatusDesc" style="color:var(--text2);font-size:12px" data-i18n="update_new_version_desc">Une mise à jour plus récente de l'application est disponible sur le dépôt.</div>
</div>
</div>
@@ -5710,7 +5728,7 @@
</div>
</div>
<div>
<div id="updateDockerCmdSection">
<label style="display:block;font-size:12px;font-weight:600;margin-bottom:6px" data-i18n="update_how_to">Pour mettre à jour votre conteneur Docker :</label>
<div style="display:flex;gap:8px;align-items:center">
<input type="text" id="updateDockerCmd" readonly value="docker compose pull && docker compose up -d" style="flex:1;background:var(--bg);font-family:monospace;font-size:12px;padding:8px 10px;border-radius:6px;border:1px solid var(--line);color:var(--text);cursor:text" onclick="this.select()">
@@ -8625,8 +8643,19 @@ ${vpnBadgeTopo}
if ($('settingsTab')) $('settingsTab').style.display = configured ? '' : 'none';
if ($('logsTab')) $('logsTab').style.display = configured ? '' : 'none';
if ($('blockedTab')) $('blockedTab').style.display = configured ? '' : 'none';
if ($('apControl')) $('apControl').style.display = configured ? '' : 'none';
if ($('apRestart')) $('apRestart').style.display = configured && active ? '' : 'none';
if ($('apControl')) {
$('apControl').style.display = configured ? '' : 'none';
$('apControl').textContent = active ? t('btn_stop', 'Arrêter') : t('btn_start', 'Démarrer');
$('apControl').style.background = active ? 'var(--red)' : 'var(--blue)';
$('apControl').style.color = active ? 'white' : 'var(--blue-text, #071326)';
}
if ($('apRestart')) {
$('apRestart').style.display = configured ? '' : 'none';
$('apRestart').disabled = !active;
$('apRestart').style.opacity = active ? '1' : '0.4';
$('apRestart').style.cursor = active ? 'pointer' : 'not-allowed';
$('apRestart').title = active ? t('btn_restart', 'Redémarrer') : t('ap_stopped_no_restart', "L'AP est arrêtée (démarrage requis)");
}
if ($('refresh')) $('refresh').style.display = configured ? '' : 'none';
const updateInfo = (status && status.update) ? status.update : null;
if (updateInfo) lastUpdateData = updateInfo;
@@ -8634,11 +8663,6 @@ ${vpnBadgeTopo}
if ($('btnUpdateAvailable')) {
$('btnUpdateAvailable').style.display = (configured && updateAvailable) ? 'inline-flex' : 'none';
}
if (configured && $('apControl')) {
$('apControl').textContent = active ? t('btn_stop', 'Arrêter') : t('btn_start', 'Démarrer');
$('apControl').style.background = active ? 'var(--red)' : 'var(--blue)';
$('apControl').style.color = active ? 'white' : 'var(--blue-text, #071326)';
}
}
let lastUpdateData = null;
@@ -8647,6 +8671,7 @@ ${vpnBadgeTopo}
const modal = $('modalUpdateApp');
if (!modal) return;
const u = lastUpdateData || (status && status.update) || {};
const isAvail = !!u.available;
if ($('updateCurrentCommit')) $('updateCurrentCommit').textContent = u.current_commit || (u.current_commit_full ? u.current_commit_full.substring(0, 7) : '—');
if ($('updateLatestCommit')) $('updateLatestCommit').textContent = u.latest_commit || (u.latest_commit_full ? u.latest_commit_full.substring(0, 7) : '—');
if ($('updateCommitMsg')) $('updateCommitMsg').textContent = u.commit_msg || t('update_no_msg', 'Aucun message de commit');
@@ -8658,6 +8683,23 @@ ${vpnBadgeTopo}
}
$('updateCommitDate').textContent = dStr;
}
if ($('updateStatusAlert')) {
$('updateStatusAlert').style.background = isAvail ? 'rgba(16,185,129,0.1)' : 'rgba(56,189,248,0.1)';
$('updateStatusAlert').style.borderColor = isAvail ? 'rgba(16,185,129,0.3)' : 'rgba(56,189,248,0.3)';
}
if ($('updateStatusIcon')) {
$('updateStatusIcon').textContent = isAvail ? '🚀' : '✅';
}
if ($('updateStatusTitle')) {
$('updateStatusTitle').textContent = isAvail ? t('update_new_version_found', 'Une nouvelle version de AP Manageur est prête !') : t('update_up_to_date', 'AP Manageur est à jour !');
$('updateStatusTitle').style.color = isAvail ? '#10b981' : 'var(--blue)';
}
if ($('updateStatusDesc')) {
$('updateStatusDesc').textContent = isAvail ? t('update_new_version_desc', "Une mise à jour plus récente de l'application est disponible sur le dépôt.") : t('update_up_to_date_desc', "Vous disposez déjà de la version la plus récente de l'application.");
}
if ($('updateDockerCmdSection')) {
$('updateDockerCmdSection').style.display = isAvail ? 'block' : 'none';
}
modal.classList.add('active');
}
window.openUpdateModal = openUpdateModal;
@@ -12360,7 +12402,7 @@ ${vpnBadgeTopo}
}
$('apControl').onclick = () => controlAp(status.active ? 'stop' : 'start');
$('apRestart').onclick = () => controlAp('restart');
$('apRestart').onclick = () => { if (status && status.active) controlAp('restart'); };
$('clearAllData').onclick = () => runAction(async () => {
if (!confirm(t('confirm_delete_all_data', '⚠️ ATTENTION : Voulez-vous vraiment supprimer toutes les données de l’application ?'))) return;