Actualiser test.html
CI / PHP Syntax Check (push) Has been cancelled
CI / JavaScript Lint (push) Has been cancelled
CI / Docker Build Test (push) Has been cancelled
CI / Validate Translation Files (push) Has been cancelled
CI / Auto-merge develop → main (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / PHP Syntax Check (push) Has been cancelled
CI / JavaScript Lint (push) Has been cancelled
CI / Docker Build Test (push) Has been cancelled
CI / Validate Translation Files (push) Has been cancelled
CI / Auto-merge develop → main (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
This commit is contained in:
@@ -1,45 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>⚡ Debug EverShelf</title>
|
||||
<style>
|
||||
body { font-family: sans-serif; background: #f4f4f9; padding: 20px; }
|
||||
.table-container { background: white; margin-bottom: 20px; padding: 15px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
|
||||
pre { background: #333; color: #0f0; padding: 10px; border-radius: 5px; overflow-x: auto; }
|
||||
h2 { border-bottom: 2px solid #ccc; padding-bottom: 5px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Dashboard de Debug EverShelf</h1>
|
||||
|
||||
<div id="debug-zone"></div>
|
||||
<h1>Table de traduction (Catégories)</h1>
|
||||
<pre id="debug-out">Chargement...</pre>
|
||||
|
||||
<script>
|
||||
// Liste des fichiers sources à inspecter (ajoute ici tes fichiers trouvés dans le terminal)
|
||||
const targets = ['/data/category_ai_cache.json', '/assets/js/app.js'];
|
||||
// Remplace par le chemin trouvé avec le grep ci-dessus
|
||||
const LOCALE_PATH = '/locales/fr.json';
|
||||
|
||||
async function initDebug() {
|
||||
const zone = document.getElementById('debug-zone');
|
||||
|
||||
for (const path of targets) {
|
||||
const section = document.createElement('div');
|
||||
section.className = 'table-container';
|
||||
section.innerHTML = `<h2>Fichier : ${path}</h2><pre id="data-${btoa(path)}">Chargement...</pre>`;
|
||||
zone.appendChild(section);
|
||||
|
||||
try {
|
||||
const response = await fetch(path);
|
||||
const text = await response.text();
|
||||
document.getElementById(`data-${btoa(path)}`).innerText = text;
|
||||
} catch (e) {
|
||||
document.getElementById(`data-${btoa(path)}`).innerText = "Erreur de lecture : " + e.message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
initDebug();
|
||||
fetch(LOCALE_PATH)
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
// On extrait uniquement la partie 'categories'
|
||||
document.getElementById('debug-out').innerText = JSON.stringify(data.categories, null, 2);
|
||||
})
|
||||
.catch(e => document.getElementById('debug-out').innerText = "Erreur : " + e.message);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user