-
- ⚠️
Attention : Copiez cette clé maintenant. Pour des raisons de sécurité, vous ne pourrez plus jamais la revoir. Si vous la perdez, vous devrez en créer une nouvelle.
+
+ ⚠️ Attention : Copiez cette clé maintenant. Pour des raisons de sécurité, vous ne pourrez
+ plus jamais la revoir. Si vous la perdez, vous devrez en créer une nouvelle.
-
+
Exemple d’utilisation :
-
curl -H "X-API-Key: ap_key_..." http://192.168.1.1/api/status
+
curl -H "X-API-Key: ap_key_..." http://192.168.1.1/api/status
@@ -9704,8 +9758,8 @@ ${vpnBadgeTopo}
if ((!devName || devName === 'Nom non communiqué' || devIp === 'Non attribuée') && log.mac && log.mac.includes(':')) {
const mUpper = log.mac.toUpperCase();
const known = ((typeof devicesDataCache !== 'undefined' && Array.isArray(devicesDataCache)) ? devicesDataCache.find(d => d.mac && d.mac.toUpperCase() === mUpper) : null) ||
- ((typeof clients !== 'undefined' && Array.isArray(clients)) ? clients.find(c => c.mac && c.mac.toUpperCase() === mUpper) : null) ||
- ((typeof logsDataCache !== 'undefined' && Array.isArray(logsDataCache)) ? logsDataCache.find(l => l.mac && l.mac.toUpperCase() === mUpper && l.name && l.name !== 'Nom non communiqué') : null);
+ ((typeof clients !== 'undefined' && Array.isArray(clients)) ? clients.find(c => c.mac && c.mac.toUpperCase() === mUpper) : null) ||
+ ((typeof logsDataCache !== 'undefined' && Array.isArray(logsDataCache)) ? logsDataCache.find(l => l.mac && l.mac.toUpperCase() === mUpper && l.name && l.name !== 'Nom non communiqué') : null);
if (known) {
if (!devName || devName === 'Nom non communiqué') devName = known.name;
if (devIp === 'Non attribuée' && known.ip && known.ip !== 'Non attribuée' && known.ip !== 'SYSTEM') devIp = known.ip;
@@ -9944,7 +9998,7 @@ ${vpnBadgeTopo}
if (!mac) return;
const mUpper = mac.toUpperCase();
const dev = ((typeof devicesDataCache !== 'undefined' && Array.isArray(devicesDataCache)) ? devicesDataCache.find(d => d.mac && d.mac.toUpperCase() === mUpper) : null) ||
- ((typeof clients !== 'undefined' && Array.isArray(clients)) ? clients.find(c => c.mac && c.mac.toUpperCase() === mUpper) : null);
+ ((typeof clients !== 'undefined' && Array.isArray(clients)) ? clients.find(c => c.mac && c.mac.toUpperCase() === mUpper) : null);
const currentName = dev ? dev.name : '';
const newName = prompt(t('prompt_device_name', "Entrez un nom personnalisé pour cet appareil :"), currentName || "");
if (newName === null) return;
@@ -13932,12 +13986,12 @@ ${vpnBadgeTopo}
}
const permBadges = {
- 'read': `
👁️ ${t('perm_read_title', 'Lecture')}`,
- 'wifi': `
📶 ${t('perm_wifi_title', 'Wi-Fi')}`,
- 'clients': `
👥 ${t('perm_clients_title', 'Clients')}`,
- 'vpn': `
🛡️ ${t('perm_vpn_title', 'VPN')}`,
- 'backup': `
📦 ${t('perm_backup_title', 'Sauvegarde')}`,
- 'admin': `
👑 ${t('perm_admin_title', 'Admin')}`
+ 'read': `
${t('perm_read_title', '👁️ Lecture seule')}`,
+ 'wifi': `
${t('perm_wifi_title', '📶 Gestion Wi-Fi')}`,
+ 'clients': `
${t('perm_clients_title', '👥 Clients & Quotas')}`,
+ 'vpn': `
${t('perm_vpn_title', '🛡️ Gestion VPN')}`,
+ 'backup': `
${t('perm_backup_title', '📦 Sauvegardes')}`,
+ 'admin': `
${t('perm_admin_title', '👑 Accès Total Admin')}`
};
tbody.innerHTML = apiKeysDataCache.map(k => {
@@ -13971,7 +14025,7 @@ ${vpnBadgeTopo}
}).join('');
}
- window.openCreateApiKeyModal = function() {
+ window.openCreateApiKeyModal = function () {
const m = $('modalCreateApiKey');
if (!m) return;
$('apiKeyInputName').value = '';
@@ -13987,18 +14041,18 @@ ${vpnBadgeTopo}
setTimeout(() => $('apiKeyInputName').focus(), 100);
};
- window.closeCreateApiKeyModal = function() {
+ window.closeCreateApiKeyModal = function () {
const m = $('modalCreateApiKey');
if (m) m.classList.remove('active');
};
- window.toggleAllApiKeyPerms = function() {
+ window.toggleAllApiKeyPerms = function () {
const ids = ['permRead', 'permWifi', 'permClients', 'permVpn', 'permBackup', 'permAdmin'];
const allChecked = ids.every(id => $(id)?.checked);
ids.forEach(id => { if ($(id)) $(id).checked = !allChecked; });
};
- window.submitCreateApiKey = async function() {
+ window.submitCreateApiKey = async function () {
const name = $('apiKeyInputName').value.trim();
const errEl = $('apiKeyModalError');
if (!name) {
@@ -14049,12 +14103,12 @@ ${vpnBadgeTopo}
}
};
- window.closeApiKeyCreatedModal = function() {
+ window.closeApiKeyCreatedModal = function () {
const m = $('modalApiKeyCreated');
if (m) m.classList.remove('active');
};
- window.copyCreatedApiKey = function() {
+ window.copyCreatedApiKey = function () {
const input = $('createdApiKeyInput');
if (!input) return;
input.select();
@@ -14066,7 +14120,7 @@ ${vpnBadgeTopo}
});
};
- window.toggleApiKey = async function(id) {
+ window.toggleApiKey = async function (id) {
const sm = $('apiKeysMessage');
try {
const res = await apiFetch('/api/auth/api-keys/toggle', {
@@ -14084,7 +14138,7 @@ ${vpnBadgeTopo}
}
};
- window.deleteApiKey = async function(id, name) {
+ window.deleteApiKey = async function (id, name) {
if (!confirm(t('apikey_delete_confirm', `Êtes-vous sûr de vouloir supprimer définitivement la clé d’API « ${name} » ?\nTous les services l'utilisant perdront leur accès.`))) {
return;
}
diff --git a/version.json b/version.json
index 399f415..e9162da 100644
--- a/version.json
+++ b/version.json
@@ -1,5 +1,5 @@
{
"version": "V1.2 (Bêta)",
- "commit": "1d11901f697656e007a99018ac1023b79024ff48",
- "build_date": "2026-11-22T22:51:39Z"
+ "commit": "8d9e15eb2f7db532cc3882c24e2d2af091faffd2",
+ "build_date": "2026-11-22T22:57:23Z"
}
\ No newline at end of file