APmanageur Wi-Fi V1.0
This commit is contained in:
1 parent
5eed2d607e
commit
ecc8e872f7
8 files changed
+87
-12
No files matched your search
+40
-5
@@ -6155,11 +6155,17 @@
|
||||
commande dans le dossier de votre projet sur votre serveur hôte.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer" style="justify-content:space-between">
|
||||
<button type="button" class="secondary" id="btnCheckUpdateManual" onclick="triggerManualUpdateCheck()"
|
||||
style="font-size:12px">
|
||||
🔄 <span data-i18n="btn_recheck">Vérifier à nouveau</span>
|
||||
</button>
|
||||
<div class="modal-footer" style="justify-content:space-between;flex-wrap:wrap;gap:8px">
|
||||
<div style="display:flex;gap:8px;align-items:center;flex-wrap:wrap">
|
||||
<button type="button" class="secondary" id="btnCheckUpdateManual" onclick="triggerManualUpdateCheck()"
|
||||
style="font-size:12px">
|
||||
🔄 <span data-i18n="btn_recheck">Vérifier à nouveau</span>
|
||||
</button>
|
||||
<button type="button" class="secondary" id="btnSyncUpdateManual" onclick="syncUpdateVersion()"
|
||||
style="font-size:12px;color:var(--green);display:none" title="Marquer cette version comme installée si vous avez déjà la dernière version">
|
||||
✓ <span data-i18n="btn_mark_up_to_date">Je suis déjà à jour</span>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="secondary" onclick="closeUpdateModal()" data-i18n="btn_close">Fermer</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -9147,6 +9153,9 @@ ${vpnBadgeTopo}
|
||||
if ($('updateDockerCmdSection')) {
|
||||
$('updateDockerCmdSection').style.display = isAvail ? 'block' : 'none';
|
||||
}
|
||||
if ($('btnSyncUpdateManual')) {
|
||||
$('btnSyncUpdateManual').style.display = isAvail ? 'inline-flex' : 'none';
|
||||
}
|
||||
modal.classList.add('active');
|
||||
}
|
||||
window.openUpdateModal = openUpdateModal;
|
||||
@@ -9201,6 +9210,32 @@ ${vpnBadgeTopo}
|
||||
}
|
||||
window.triggerManualUpdateCheck = triggerManualUpdateCheck;
|
||||
|
||||
async function syncUpdateVersion() {
|
||||
const btn = $('btnSyncUpdateManual');
|
||||
if (btn) btn.disabled = true;
|
||||
try {
|
||||
const res = await apiFetch('/api/system/update/sync', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ commit: (lastUpdateData && lastUpdateData.latest_commit_full) || '' })
|
||||
});
|
||||
const d = await res.json();
|
||||
if (res.ok && d.update) {
|
||||
lastUpdateData = d.update;
|
||||
if (status) status.update = d.update;
|
||||
updateApButtons();
|
||||
openUpdateModal();
|
||||
} else {
|
||||
alert(d.error || t('update_sync_error', 'Erreur lors de la synchronisation'));
|
||||
}
|
||||
} catch (e) {
|
||||
alert(e.message || 'Erreur');
|
||||
} finally {
|
||||
if (btn) btn.disabled = false;
|
||||
}
|
||||
}
|
||||
window.syncUpdateVersion = syncUpdateVersion;
|
||||
|
||||
async function toggleBlock(mac, blocked) {
|
||||
return runAction(async () => {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user