Spaces:
Running
Running
Download index.html from doctorblo/systeme-correction: direct link, hf CLI and curl.
- Browser
- Download file 33.7 kB
-
https://huggingface.co/spaces/doctorblo/systeme-correction/resolve/main/index.html
- Command line
-
hf download hf://spaces/doctorblo/systeme-correction/index.html
-
curl -L -o index.html https://huggingface.co/spaces/doctorblo/systeme-correction/resolve/main/index.html
33.7 kB
| <html lang="fr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Armée d'IA Correctrice - 2M IA Puissantes</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .gradient-bg { | |
| background: linear-gradient(135deg, #1e3a8a 0%, #065f46 100%); | |
| } | |
| .file-drop-area { | |
| border: 3px dashed #9ca3af; | |
| transition: all 0.3s ease; | |
| } | |
| .file-drop-area.active { | |
| border-color: #3b82f6; | |
| background-color: rgba(59, 130, 246, 0.05); | |
| } | |
| .progress-bar { | |
| transition: width 0.3s ease; | |
| } | |
| .neon-text { | |
| text-shadow: 0 0 5px #3b82f6, 0 0 10px #3b82f6, 0 0 15px #3b82f6; | |
| } | |
| .ai-icon { | |
| animation: float 3s ease-in-out infinite; | |
| } | |
| @keyframes float { | |
| 0%, 100% { transform: translateY(0); } | |
| 50% { transform: translateY(-10px); } | |
| } | |
| .ai-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); | |
| gap: 10px; | |
| } | |
| .pulse { | |
| animation: pulse 2s infinite; | |
| } | |
| @keyframes pulse { | |
| 0% { transform: scale(1); } | |
| 50% { transform: scale(1.05); } | |
| 100% { transform: scale(1); } | |
| } | |
| /* Nouveau style pour les notifications */ | |
| .notification { | |
| position: fixed; | |
| top: 20px; | |
| right: 20px; | |
| padding: 15px 25px; | |
| border-radius: 8px; | |
| box-shadow: 0 4px 12px rgba(0,0,0,0.15); | |
| z-index: 1000; | |
| transform: translateX(150%); | |
| transition: transform 0.3s ease; | |
| } | |
| .notification.show { | |
| transform: translateX(0); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-900 text-white min-h-screen"> | |
| <!-- Zone de notification --> | |
| <div id="notification" class="notification bg-blue-600 hidden"> | |
| <div class="flex items-center"> | |
| <i class="fas fa-check-circle mr-2"></i> | |
| <span id="notificationText"></span> | |
| </div> | |
| </div> | |
| <header class="gradient-bg py-6 shadow-xl"> | |
| <div class="container mx-auto px-6"> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center space-x-4"> | |
| <i class="fas fa-robot text-4xl text-blue-400 ai-icon"></i> | |
| <h1 class="text-3xl font-bold neon-text">Armée <span class="text-yellow-400">d'IA</span></h1> | |
| </div> | |
| <div class="text-right"> | |
| <p class="text-blue-200"><span class="font-bold">2,000,000</span> IA en service</p> | |
| <p class="text-xs text-green-300">Système opérationnel 24/7</p> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <main class="container mx-auto px-6 py-10"> | |
| <div class="max-w-4xl mx-auto"> | |
| <div class="text-center mb-12"> | |
| <h2 class="text-4xl font-bold mb-4">Système de Correction Automatique</h2> | |
| <p class="text-xl text-gray-300">L'armée d'IA la plus puissante au monde est prête à analyser et corriger votre code</p> | |
| <div class="mt-8 flex justify-center"> | |
| <div class="inline-flex bg-gray-800 rounded-full p-1"> | |
| <span class="inline-flex items-center px-4 py-2 rounded-full bg-blue-600 text-white"> | |
| <i class="fas fa-bolt mr-2"></i> Mode Turbo | |
| </span> | |
| <span class="inline-flex items-center px-4 py-2">Analyse en temps réel</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- AI Grid Visualization --> | |
| <div class="mb-12 bg-gray-800 p-6 rounded-xl shadow-lg"> | |
| <h3 class="text-xl font-semibold mb-4 flex items-center"> | |
| <i class="fas fa-network-wired mr-2 text-blue-400"></i> Réseau d'IA Actives | |
| </h3> | |
| <div class="ai-grid h-48 overflow-y-auto p-2 border border-gray-700 rounded-lg"> | |
| <!-- Generating 200 AI icons as representation --> | |
| </div> | |
| <div class="mt-4 text-right text-sm text-gray-400"> | |
| <i class="fas fa-info-circle mr-1"></i> Visualisation de 200 IA sur 2,000,000 | |
| </div> | |
| </div> | |
| <!-- File Upload Section --> | |
| <div class="bg-gray-800 rounded-xl shadow-lg overflow-hidden mb-12 pulse"> | |
| <div class="gradient-bg px-6 py-4"> | |
| <h3 class="text-xl font-semibold"> | |
| <i class="fas fa-cloud-upload-alt mr-2"></i> Importer votre projet | |
| </h3> | |
| </div> | |
| <div class="p-6"> | |
| <div id="fileDropArea" class="file-drop-area rounded-lg p-8 text-center cursor-pointer"> | |
| <i class="fas fa-file-upload text-4xl text-blue-400 mb-4"></i> | |
| <p class="text-xl font-medium mb-2">Glissez-déposez vos fichiers ici</p> | |
| <p class="text-gray-400 mb-4">ou</p> | |
| <button class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-full font-medium transition duration-300"> | |
| <i class="fas fa-folder-open mr-2"></i> Sélectionner des fichiers | |
| </button> | |
| <input type="file" id="fileInput" class="hidden" multiple> | |
| <div class="mt-4 text-sm text-gray-400"> | |
| Formats supportés: .html, .zip, URL | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Processing Section (Initially Hidden) --> | |
| <div id="processingSection" class="hidden bg-gray-800 rounded-xl shadow-lg overflow-hidden mb-12"> | |
| <div class="gradient-bg px-6 py-4"> | |
| <h3 class="text-xl font-semibold"> | |
| <i class="fas fa-cogs mr-2"></i> Correction en cours | |
| </h3> | |
| </div> | |
| <div class="p-6"> | |
| <div class="mb-6"> | |
| <div class="flex justify-between mb-2"> | |
| <span class="font-medium">Analyse du code</span> | |
| <span id="progressPercent" class="font-bold text-blue-400">0%</span> | |
| </div> | |
| <div class="w-full bg-gray-700 rounded-full h-4"> | |
| <div id="progressBar" class="progress-bar h-4 rounded-full bg-blue-600" style="width: 0%"></div> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6"> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <div class="flex items-center"> | |
| <i class="fas fa-bug text-red-400 mr-3 text-xl"></i> | |
| <div> | |
| <div class="font-bold text-lg" id="errorCount">0</div> | |
| <div class="text-sm text-gray-400">Erreurs trouvées</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <div class="flex items-center"> | |
| <i class="fas fa-check-circle text-green-400 mr-3 text-xl"></i> | |
| <div> | |
| <div class="font-bold text-lg" id="fixedCount">0</div> | |
| <div class="text-sm text-gray-400">Corrigées</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <div class="flex items-center"> | |
| <i class="fas fa-shield-alt text-yellow-400 mr-3 text-xl"></i> | |
| <div> | |
| <div class="font-bold text-lg" id="optimizedCount">0</div> | |
| <div class="text-sm text-gray-400">Optimisations</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-700 rounded-lg p-4"> | |
| <h4 class="font-medium mb-3 flex items-center"> | |
| <i class="fas fa-stream mr-2"></i> Activité des IA | |
| </h4> | |
| <div id="aiActivityLog" class="h-48 overflow-y-auto text-sm"> | |
| <!-- AI activity messages will appear here --> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Results Section (Initially Hidden) --> | |
| <div id="resultsSection" class="hidden bg-gray-800 rounded-xl shadow-lg overflow-hidden mb-12"> | |
| <div class="bg-green-600 px-6 py-4"> | |
| <h3 class="text-xl font-semibold"> | |
| <i class="fas fa-check-circle mr-2"></i> Correction terminée | |
| </h3> | |
| </div> | |
| <div class="p-6"> | |
| <div class="flex flex-col items-center text-center mb-8"> | |
| <i class="fas fa-trophy text-5xl text-yellow-400 mb-4"></i> | |
| <h4 class="text-2xl font-bold mb-2">Analyse complète réussie!</h4> | |
| <p class="text-gray-300 max-w-md"> | |
| Votre code a été analysé et optimisé par notre armée d'IA. Téléchargez maintenant la version corrigée. | |
| </p> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | |
| <div class="bg-gray-700 p-5 rounded-lg"> | |
| <h5 class="font-bold text-lg mb-3 flex items-center"> | |
| <i class="fas fa-file-code mr-2 text-blue-400"></i> Rapport complet | |
| </h5> | |
| <ul class="space-y-2 text-sm"> | |
| <li class="flex justify-between"> | |
| <span class="text-gray-400">Fichiers analysés:</span> | |
| <span class="font-medium" id="analyzedFiles">0</span> | |
| </li> | |
| <li class="flex justify-between"> | |
| <span class="text-gray-400">Lignes de code:</span> | |
| <span class="font-medium" id="totalLines">0</span> | |
| </li> | |
| <li class="flex justify-between"> | |
| <span class="text-gray-400">Erreurs critiques:</span> | |
| <span class="font-medium text-red-400" id="criticalErrors">0</span> | |
| </li> | |
| <li class="flex justify-between"> | |
| <span class="text-gray-400">Optimisations:</span> | |
| <span class="font-medium text-green-400" id="totalOptimizations">0</span> | |
| </li> | |
| <li class="flex justify-between"> | |
| <span class="text-gray-400">Nouveau score:</span> | |
| <span class="font-medium text-yellow-400" id="qualityScore">0/100</span> | |
| </li> | |
| </ul> | |
| </div> | |
| <div class="flex flex-col justify-between"> | |
| <div class="mb-6"> | |
| <h5 class="font-bold text-lg mb-3">Télécharger les résultats</h5> | |
| <div class="space-y-3"> | |
| <button id="downloadZipBtn" class="w-full bg-blue-600 hover:bg-blue-700 text-white py-3 px-4 rounded-lg font-medium transition duration-300 flex items-center justify-center"> | |
| <i class="fas fa-file-archive mr-2"></i> Télécharger en ZIP | |
| </button> | |
| <button id="deployBtn" class="w-full bg-green-600 hover:bg-green-700 text-white py-3 px-4 rounded-lg font-medium transition duration-300 flex items-center justify-center"> | |
| <i class="fas fa-cloud mr-2"></i> Déployer directement | |
| </button> | |
| </div> | |
| </div> | |
| <div class="flex space-x-3"> | |
| <button id="newAnalysisBtn" class="flex-1 bg-gray-700 hover:bg-gray-600 text-white py-2 px-4 rounded-lg font-medium transition duration-300 flex items-center justify-center"> | |
| <i class="fas fa-redo mr-2"></i> Nouvelle analyse | |
| </button> | |
| <button id="advancedDetailsBtn" class="flex-1 bg-purple-600 hover:bg-purple-700 text-white py-2 px-4 rounded-lg font-medium transition duration-300 flex items-center justify-center"> | |
| <i class="fas fa-chart-line mr-2"></i> Détails avancés | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Features Section --> | |
| <div class="mb-12"> | |
| <h3 class="text-2xl font-bold text-center mb-8"> | |
| <i class="fas fa-star text-yellow-400 mr-2"></i> Capacités de notre armée d'IA | |
| </h3> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6"> | |
| <div class="bg-gray-800 p-6 rounded-xl border border-blue-500 border-opacity-30 transform transition hover:scale-105 hover:shadow-lg"> | |
| <div class="flex items-center mb-4"> | |
| <div class="bg-blue-500 bg-opacity-20 p-3 rounded-lg mr-4"> | |
| <i class="fas fa-code text-blue-400 text-xl"></i> | |
| </div> | |
| <h4 class="font-bold text-lg">Correction de code</h4> | |
| </div> | |
| <p class="text-gray-300"> | |
| Détection et correction automatique des erreurs de syntaxe, des mauvaises pratiques et des failles de sécurité. | |
| </p> | |
| </div> | |
| <div class="bg-gray-800 p-6 rounded-xl border border-green-500 border-opacity-30 transform transition hover:scale-105 hover:shadow-lg"> | |
| <div class="flex items-center mb-4"> | |
| <div class="bg-green-500 bg-opacity-20 p-3 rounded-lg mr-4"> | |
| <i class="fas fa-tachometer-alt text-green-400 text-xl"></i> | |
| </div> | |
| <h4 class="font-bold text-lg">Optimisation</h4> | |
| </div> | |
| <p class="text-gray-300"> | |
| Amélioration des performances, réduction de la complexité et optimisation des ressources. | |
| </p> | |
| </div> | |
| <div class="bg-gray-800 p-6 rounded-xl border border-purple-500 border-opacity-30 transform transition hover:scale-105 hover:shadow-lg"> | |
| <div class="flex items-center mb-4"> | |
| <div class="bg-purple-500 bg-opacity-20 p-3 rounded-lg mr-4"> | |
| <i class="fas fa-shield-alt text-purple-400 text-xl"></i> | |
| </div> | |
| <h4 class="font-bold text-lg">Sécurité</h4> | |
| </div> | |
| <p class="text-gray-300"> | |
| Analyse approfondie des vulnérabilités et renforcement de la protection contre les attaques. | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <footer class="gradient-bg py-8 border-t border-gray-700"> | |
| <div class="container mx-auto px-6"> | |
| <div class="flex flex-col md:flex-row justify-between items-center"> | |
| <div class="mb-6 md:mb-0"> | |
| <div class="flex items-center space-x-2"> | |
| <i class="fas fa-robot text-2xl text-blue-400"></i> | |
| <span class="text-xl font-bold">Armée d'IA</span> | |
| </div> | |
| <p class="text-sm text-blue-100 mt-1">2 millions d'assistants IA à votre service</p> | |
| </div> | |
| <div class="flex space-x-6"> | |
| <a href="#" class="text-blue-200 hover:text-white transition"> | |
| <i class="fab fa-github text-xl"></i> | |
| </a> | |
| <a href="#" class="text-blue-200 hover:text-white transition"> | |
| <i class="fab fa-twitter text-xl"></i> | |
| </a> | |
| <a href="#" class="text-blue-200 hover:text-white transition"> | |
| <i class="fab fa-discord text-xl"></i> | |
| </a> | |
| </div> | |
| </div> | |
| <div class="mt-8 text-center text-sm text-blue-200"> | |
| <p>© 2023 Armée d'IA Correctrice. Tous droits réservés.</p> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // File drop area functionality | |
| const fileDropArea = document.getElementById('fileDropArea'); | |
| const fileInput = document.getElementById('fileInput'); | |
| const processingSection = document.getElementById('processingSection'); | |
| const resultsSection = document.getElementById('resultsSection'); | |
| const progressBar = document.getElementById('progressBar'); | |
| const progressPercent = document.getElementById('progressPercent'); | |
| const errorCount = document.getElementById('errorCount'); | |
| const fixedCount = document.getElementById('fixedCount'); | |
| const optimizedCount = document.getElementById('optimizedCount'); | |
| const aiActivityLog = document.getElementById('aiActivityLog'); | |
| const downloadZipBtn = document.getElementById('downloadZipBtn'); | |
| const deployBtn = document.getElementById('deployBtn'); | |
| const newAnalysisBtn = document.getElementById('newAnalysisBtn'); | |
| const advancedDetailsBtn = document.getElementById('advancedDetailsBtn'); | |
| const notification = document.getElementById('notification'); | |
| const notificationText = document.getElementById('notificationText'); | |
| // Fonction pour afficher les notifications | |
| function showNotification(message, type = 'success') { | |
| notificationText.textContent = message; | |
| notification.className = `notification ${type === 'error' ? 'bg-red-600' : 'bg-blue-600'} hidden`; | |
| notification.classList.remove('hidden'); | |
| notification.classList.add('show'); | |
| setTimeout(() => { | |
| notification.classList.remove('show'); | |
| setTimeout(() => { | |
| notification.classList.add('hidden'); | |
| }, 300); | |
| }, 3000); | |
| } | |
| // Prevent default drag behaviors | |
| ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => { | |
| fileDropArea.addEventListener(eventName, preventDefaults, false); | |
| }); | |
| function preventDefaults(e) { | |
| e.preventDefault(); | |
| e.stopPropagation(); | |
| } | |
| // Highlight drop area when item is dragged over it | |
| ['dragenter', 'dragover'].forEach(eventName => { | |
| fileDropArea.addEventListener(eventName, highlight, false); | |
| }); | |
| ['dragleave', 'drop'].forEach(eventName => { | |
| fileDropArea.addEventListener(eventName, unhighlight, false); | |
| }); | |
| function highlight() { | |
| fileDropArea.classList.add('active'); | |
| } | |
| function unhighlight() { | |
| fileDropArea.classList.remove('active'); | |
| } | |
| // Handle dropped files | |
| fileDropArea.addEventListener('drop', handleDrop, false); | |
| function handleDrop(e) { | |
| const dt = e.dataTransfer; | |
| const files = dt.files; | |
| handleFiles(files); | |
| } | |
| fileDropArea.addEventListener('click', () => { | |
| fileInput.click(); | |
| }); | |
| fileInput.addEventListener('change', function() { | |
| handleFiles(this.files); | |
| }); | |
| function handleFiles(files) { | |
| if (files.length > 0) { | |
| // Show processing section | |
| processingSection.classList.remove('hidden'); | |
| // Start "analysis" - this is just for demo | |
| simulateAnalysis(); | |
| } | |
| } | |
| function simulateAnalysis() { | |
| let progress = 0; | |
| const totalErrors = Math.floor(Math.random() * 50) + 20; | |
| let errorsFixed = 0; | |
| let optimizations = 0; | |
| const interval = setInterval(() => { | |
| progress += Math.floor(Math.random() * 5) + 1; | |
| if (progress > 100) progress = 100; | |
| progressBar.style.width = `${progress}%`; | |
| progressPercent.textContent = `${progress}%`; | |
| // Update counts randomly | |
| if (progress < 40 && errorsFixed < totalErrors) { | |
| errorsFixed += Math.floor(Math.random() * 3); | |
| if (errorsFixed > totalErrors) errorsFixed = totalErrors; | |
| } | |
| if (progress > 40 && optimizations < 15) { | |
| optimizations += Math.floor(Math.random() * 2); | |
| if (optimizations > 15) optimizations = 15; | |
| } | |
| errorCount.textContent = totalErrors; | |
| fixedCount.textContent = errorsFixed; | |
| optimizedCount.textContent = optimizations; | |
| // Add random AI activity messages | |
| if (Math.random() > 0.7) { | |
| const messages = [ | |
| "IA #34215: Correction d'une boucle infinie", | |
| "IA #78562: Optimisation des requêtes SQL", | |
| "IA #11234: Détection d'une faille XSS", | |
| "IA #55678: Réorganisation des imports", | |
| "IA #99881: Correction des erreurs de typage", | |
| "IA #33445: Amélioration de l'accessibilité", | |
| "IA #66789: Refactoring des composants", | |
| "IA #22334: Mise en cache des ressources" | |
| ]; | |
| const randomMessage = messages[Math.floor(Math.random() * messages.length)]; | |
| const messageElement = document.createElement('div'); | |
| messageElement.className = 'py-1 border-b border-gray-600'; | |
| messageElement.innerHTML = `<i class="fas fa-circle text-xs text-green-400 mr-2"></i> ${randomMessage}`; | |
| aiActivityLog.appendChild(messageElement); | |
| // Scroll to bottom | |
| aiActivityLog.scrollTop = aiActivityLog.scrollHeight; | |
| } | |
| // When analysis is complete | |
| if (progress === 100) { | |
| clearInterval(interval); | |
| // Update counts to final values | |
| fixedCount.textContent = totalErrors; | |
| optimizedCount.textContent = 15; | |
| // Show results after a delay | |
| setTimeout(() => { | |
| processingSection.classList.add('hidden'); | |
| resultsSection.classList.remove('hidden'); | |
| // Set random result stats | |
| document.getElementById('analyzedFiles').textContent = Math.floor(Math.random() * 15) + 5; | |
| document.getElementById('totalLines').textContent = Math.floor(Math.random() * 5000) + 1000; | |
| document.getElementById('criticalErrors').textContent = Math.floor(Math.random() * 8) + 2; | |
| document.getElementById('totalOptimizations').textContent = 15; | |
| document.getElementById('qualityScore').textContent = `${Math.floor(Math.random() * 30) + 70}/100`; | |
| }, 1000); | |
| } | |
| }, 200); | |
| } | |
| // Initialize AI grid | |
| const aiGrid = document.querySelector('.ai-grid'); | |
| const aiStatuses = ['text-blue-400', 'text-green-400', 'text-purple-400', 'text-yellow-400']; | |
| const aiIcons = ['fa-robot', 'fa-brain', 'fa-microchip', 'fa-cog']; | |
| for (let i = 0; i < 200; i++) { | |
| const ai = document.createElement('div'); | |
| const icon = document.createElement('i'); | |
| const status = aiStatuses[Math.floor(Math.random() * aiStatuses.length)]; | |
| const randomIcon = aiIcons[Math.floor(Math.random() * aiIcons.length)]; | |
| icon.className = `fas ${randomIcon} text-2xl ${status} animate-spin`; | |
| icon.style.animationDuration = `${3 + Math.random() * 3}s`; | |
| icon.title = `IA #${i+1}`; | |
| ai.className = 'flex justify-center items-center'; | |
| ai.appendChild(icon); | |
| aiGrid.appendChild(ai); | |
| } | |
| // Gestion des boutons de résultat | |
| downloadZipBtn.addEventListener('click', function() { | |
| showNotification("Téléchargement du ZIP en cours..."); | |
| // Simuler un téléchargement | |
| setTimeout(() => { | |
| showNotification("Téléchargement terminé avec succès!"); | |
| // Créer un faux fichier ZIP à télécharger | |
| const zipContent = "Ceci est une simulation de fichier ZIP contenant votre code corrigé."; | |
| const blob = new Blob([zipContent], { type: 'application/zip' }); | |
| const url = URL.createObjectURL(blob); | |
| const a = document.createElement('a'); | |
| a.href = url; | |
| a.download = 'code-corrige-' + new Date().toISOString().slice(0, 10) + '.zip'; | |
| document.body.appendChild(a); | |
| a.click(); | |
| document.body.removeChild(a); | |
| URL.revokeObjectURL(url); | |
| }, 1000); | |
| }); | |
| deployBtn.addEventListener('click', function() { | |
| showNotification("Déploiement en cours..."); | |
| // Simuler un déploiement | |
| setTimeout(() => { | |
| showNotification("Déploiement réussi! Votre application est maintenant en ligne."); | |
| // Simuler l'ouverture d'une URL de déploiement | |
| setTimeout(() => { | |
| window.open('https://exemple-deploiement.com', '_blank'); | |
| }, 500); | |
| }, 2000); | |
| }); | |
| newAnalysisBtn.addEventListener('click', function() { | |
| // Réinitialiser l'interface pour une nouvelle analyse | |
| resultsSection.classList.add('hidden'); | |
| processingSection.classList.add('hidden'); | |
| progressBar.style.width = '0%'; | |
| progressPercent.textContent = '0%'; | |
| errorCount.textContent = '0'; | |
| fixedCount.textContent = '0'; | |
| optimizedCount.textContent = '0'; | |
| aiActivityLog.innerHTML = ''; | |
| showNotification("Prêt pour une nouvelle analyse. Importer vos fichiers!"); | |
| }); | |
| advancedDetailsBtn.addEventListener('click', function() { | |
| showNotification("Ouverture des détails avancés de l'analyse..."); | |
| // Simuler l'affichage de détails avancés | |
| setTimeout(() => { | |
| const advancedStats = ` | |
| <h5 class="text-lg font-bold mb-2">Statistiques avancées</h5> | |
| <ul class="space-y-1 text-sm"> | |
| <li>Taux de complexité réduit: ${Math.floor(Math.random() * 40) + 30}%</li> | |
| <li>Redondance éliminée: ${Math.floor(Math.random() * 30) + 10}%</li> | |
| <li>Taille du code optimisée: ${Math.floor(Math.random() * 25) + 5}%</li> | |
| <li>Temps d'exécution amélioré: ${Math.floor(Math.random() * 50) + 10}%</li> | |
| </ul> | |
| `; | |
| // Créer et afficher une modal | |
| const modal = document.createElement('div'); | |
| modal.className = 'fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 p-4'; | |
| modal.innerHTML = ` | |
| <div class="bg-gray-800 rounded-xl p-6 max-w-2xl w-full max-h-[80vh] overflow-y-auto"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="text-xl font-bold">Détails avancés</h3> | |
| <button id="closeModalBtn" class="text-gray-400 hover:text-white"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="prose prose-invert"> | |
| ${advancedStats} | |
| <div class="mt-6"> | |
| <h5 class="text-lg font-bold mb-2">Recommandations</h5> | |
| <ul class="space-y-2"> | |
| <li><i class="fas fa-check-circle text-green-400 mr-2"></i> Implémenter la pagination pour les grandes collections de données</li> | |
| <li><i class="fas fa-check-circle text-green-400 mr-2"></i> Ajouter la validation côté serveur pour les champs sensibles</li> | |
| <li><i class="fas fa-check-circle text-green-400 mr-2"></i> Mettre en cache les résultats des requêtes fréquentes</li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| `; | |
| document.body.appendChild(modal); | |
| // Ajouter le gestionnaire pour fermer la modal | |
| document.getElementById('closeModalBtn').addEventListener('click', function() { | |
| document.body.removeChild(modal); | |
| }); | |
| }, 500); | |
| }); | |
| }); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=doctorblo/systeme-correction" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |