From 563932a7339bc4dd5b52d584f9d3e80e93398cf1 Mon Sep 17 00:00:00 2001 From: Augustin Date: Thu, 25 Sep 2025 22:01:59 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Nettoyage=20interface=20et=20cor?= =?UTF-8?q?rection=20erreurs=20JavaScript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Suppression emojis superflus dans interface utilisateur - Correction erreurs d'encodage UTF-8 (caractères corrompus) - Fix erreur JavaScript : togglePreview() déplacé dans la classe ConceptionAssistant - Fix erreur JavaScript : togglePanel accessible globalement avec window.togglePanel - Interface plus sobre et professionnelle 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | Bin 6325 -> 6532 bytes assets/css/style.css | 8 +-- assets/js/app.js | 128 ++++++++++++++++++++++--------------------- views/header.js | 28 +++++----- 4 files changed, 83 insertions(+), 81 deletions(-) diff --git a/README.md b/README.md index efbb9a9a749d0c22376b8c975f49c4cdcae316e0..b95ddbd7a99d62814ae2b9a1a78bde3877b65a0a 100644 GIT binary patch delta 2028 zcmZuyO>7fK6jq!#KMo-d4hbTZJZ$oV$$uJtQrgPU0Iq;WB&7nRiitgOMp^Hg-L;z@ z%1?!;Qc8hLOGQfL9FUT&2&W?TSg}%%sP`TUk$T1)s;a%T@6Fl?5k2jAX5RPS`{sL} zANOAytc*Y*KY!&;#kmgGu^=7;mScLtb+`o?BWr@z!E~m5YVj^wrd{XG=Le1#^6~~8 zHS~ln3>}Y!jlqFHBtmF%0giEtP9TXW?<0!NvNM5hh(?c?uEW$3w*j&K>GZjdjFg@A zyACFmm&>|+?y_7d8>Ic`W%~yT`3H9)W?90rnQl{oaUHXz5C}R?;;zXwh{gA)>=9VK zzbr?5!%eQEaj!bO$8tOY8H|u~zVrJE`EPDwDKW1th-GafjWt==b2O@|e9v`kFB*~^ zLQfb|7`n5(m1=sY{NR2B7lx_&h(;m9P0M2eAv_j{hNVSJa?(h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F(V&u2%N`yyc_95!xxcPo|Fvl2)eOCu{e!bGr!^aC(LzP4vcxfyNzNkn#&e}5@Dc< zSo4U=tt@ScvEOUvA>${JZXq+WBrzyeM%Sr&P?8nX^UN{<&vY?6r5lW`IHrXSwk-du zfD@(itClHL8E*Xy*SoDZv`sPJmPR^wTM2i5XnTO`C;DKsED;a3L`~0~oPIM7vyQz& z%hjOhikZ6hdSKHtD>aUi;hf891rcC@I?Dug>&5ngUgK~ms!&h4cn~>fQXJ~YHP?JsalXTNL9SJ)MVCEE4*Q(#gv4+D*ysdg>X57e z#RgjzEn`=Ft`%83T_CqTSEQo&2(r`lv!v1CI)Xkd;y^Uhf(=p_igVG0|6%oE^dJ`T z+vp?Ome67oVd+Y7Ja!BbbYp3>ycQc&MUEYf)ggun3Pev5fR{o@!+7Ci}y`#j}p`gC;FvJmjV>-!P6Y8#dd%&i!FI8erS&@QBIH{ z*Td6CW6j~p|_eK?hfOB2JMs11K&XbxU<~noT|2+oe8kDN2GRW_{w^+RyO&Zm3&mrluwZ319KlN}mb#utecyNWBl3TCy&T@R zYnQl@7)jtScup1TdPENafZG2wF|JGEedeTWb}< zbmjkQa?Fo^Cz)x+M@`v(O&$r&>=*srBdB7o`!=q%?hE^+pI6l;FkiJSSRhyd#)J0V z7sb@TvB<-~?jRa6550%@cwALO5%K5lZfajkjT7}PeoyV~@>}ZEM>N=mp5%f*kdT?2 zx(wX8Ol%fJ*nSxKs>%wOQ(5-Nk)mZ%&%fi0N{t8mrKqSyHV(yJ;Nd6bMbLc uAtt#=EjAjo=XH_n9nvuxoWKai&*Jgkk&w|RuJk?=GVY0QdOrvm*Z&1jW_^$V diff --git a/assets/css/style.css b/assets/css/style.css index f31f88a..ae242db 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -502,7 +502,7 @@ button.success:hover { background: #229954; } -/* Input file personnalis� */ +/* Input file personnalisé */ .file-input-label { padding: 0.6rem 1.2rem; border-radius: var(--border-radius); @@ -571,7 +571,7 @@ section h2 { font-weight: 600; } -/* Table des mati�res */ +/* Table des matières */ #table-of-contents { /* Comportement normal de scroll */ } @@ -613,7 +613,7 @@ section h2 { color: var(--text-light); } -/* Zone d'�criture */ +/* Zone d'écriture */ #design-journal { min-height: 600px; } @@ -890,7 +890,7 @@ footer a:hover { } } -/* Scrollbars personnalis�es */ +/* Scrollbars personnalisées */ ::-webkit-scrollbar { width: 8px; height: 8px; diff --git a/assets/js/app.js b/assets/js/app.js index 1996e68..9d4afef 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -221,7 +221,7 @@ class ConceptionAssistant { this.currentJournalId = result.data.id; } - statusEl.textContent = '✅ Sauvegardé'; + statusEl.textContent = 'Sauvegardé'; this.showNotification('Journal sauvegardé avec succès', 'success'); setTimeout(() => statusEl.textContent = '', 3000); } else { @@ -229,7 +229,7 @@ class ConceptionAssistant { } } catch (error) { console.error('Erreur:', error); - statusEl.textContent = '❌ Erreur'; + statusEl.textContent = 'Erreur'; this.showNotification('Erreur lors de la sauvegarde: ' + error.message, 'error'); setTimeout(() => statusEl.textContent = '', 3000); } finally { @@ -550,7 +550,7 @@ class ConceptionAssistant { // Vérifier les conditions selon l'action if (action === 'rephrase' && !selection) { - this.showAIFeedback('⚠️ Veuillez sélectionner du texte à reformuler'); + this.showAIFeedback('Veuillez sélectionner du texte à reformuler'); return; } @@ -591,7 +591,7 @@ class ConceptionAssistant { }; this.showAIFeedback(` - ✨ Reformulation

+ Reformulation

Texte original :
@@ -604,10 +604,10 @@ class ConceptionAssistant {
`); @@ -619,17 +619,17 @@ class ConceptionAssistant { case 'inconsistencies': result = await this.callAI('/api/ai/check-inconsistencies', { content: contentToUse }); - this.showAIFeedback(`🔍 Analyse des incohérences

${this.formatAIResponse(result.analysis)}`); + this.showAIFeedback(`Analyse des incohérences

${this.formatAIResponse(result.analysis)}`); break; case 'duplications': result = await this.callAI('/api/ai/check-duplications', { content: contentToUse }); - this.showAIFeedback(`📋 Vérification des doublons

${this.formatAIResponse(result.analysis)}`); + this.showAIFeedback(`Vérification des doublons

${this.formatAIResponse(result.analysis)}`); break; case 'advice': result = await this.callAI('/api/ai/give-advice', { content: contentToUse, domain: 'conception' }); - this.showAIFeedback(`💡 Conseils d'amélioration

${this.formatAIResponse(result.advice)}`); + this.showAIFeedback(`Conseils d'amélioration

${this.formatAIResponse(result.advice)}`); break; case 'liberty': @@ -644,19 +644,19 @@ class ConceptionAssistant { this.saveState(); } - let libertyHTML = `🚀 Mode Liberté Intelligent (${result.iterations} itérations)

`; + let libertyHTML = `Mode Liberté Intelligent (${result.iterations} itérations)

`; // Vérifier si l'IA s'est arrêtée prématurément const lastIteration = result.results[result.results.length - 1]; if (lastIteration && lastIteration.stopped) { - libertyHTML += `

🛑 Analyse terminée après ${result.iterations} itérations - Aucune amélioration évidente supplémentaire détectée.

`; + libertyHTML += `

Analyse terminée après ${result.iterations} itérations - Aucune amélioration évidente supplémentaire détectée.

`; } else { - libertyHTML += `

✅ Les ${result.iterations} itérations d'amélioration ont été automatiquement appliquées au document.

`; + libertyHTML += `

Les ${result.iterations} itérations d'amélioration ont été automatiquement appliquées au document.

`; } result.results.forEach(iteration => { const borderColor = iteration.stopped ? 'var(--warning-color)' : 'var(--success-color)'; - const icon = iteration.stopped ? '🛑' : '🎯'; + const icon = iteration.stopped ? 'STOP' : 'OK'; libertyHTML += `
@@ -670,7 +670,7 @@ class ConceptionAssistant { } } catch (error) { console.error('Erreur IA:', error); - this.showAIFeedback(`❌ Erreur

Une erreur s'est produite : ${error.message}

Vérifiez votre connexion et la configuration de l'API.`); + this.showAIFeedback(`Erreur

Une erreur s'est produite : ${error.message}

Vérifiez votre connexion et la configuration de l'API.`); } } @@ -800,7 +800,7 @@ class ConceptionAssistant { const feedback = document.getElementById('ai-assistant-feedback'); feedback.innerHTML = ` `; @@ -819,6 +819,50 @@ class ConceptionAssistant { setTimeout(() => document.body.removeChild(notification), 300); }, 3000); } + + togglePreview() { + const previewBtn = document.getElementById('preview-toggle'); + + if (!this.isPreviewMode) { + // Passer en mode prévisualisation + this.originalContent = this.editor.innerHTML; + const markdownContent = this.editor.innerText; + + // Convertir le Markdown en HTML joliment formaté + const previewHTML = this.parseMarkdown(markdownContent); + + // Désactiver l'édition et appliquer le style preview + this.editor.contentEditable = false; + this.editor.innerHTML = `
${previewHTML}
`; + this.editor.style.background = 'var(--background-color)'; + this.editor.style.border = '1px solid var(--border-color)'; + this.editor.style.borderRadius = '8px'; + + // Changer le bouton + previewBtn.innerHTML = 'Éditer'; + previewBtn.classList.remove('primary'); + previewBtn.classList.add('secondary'); + + this.isPreviewMode = true; + this.showNotification('Mode prévisualisation activé', 'success'); + + } else { + // Revenir en mode édition + this.editor.contentEditable = true; + this.editor.innerHTML = this.originalContent; + this.editor.style.background = ''; + this.editor.style.border = ''; + this.editor.style.borderRadius = ''; + + // Changer le bouton + previewBtn.innerHTML = 'Visualiser'; + previewBtn.classList.remove('secondary'); + previewBtn.classList.add('primary'); + + this.isPreviewMode = false; + this.showNotification('Mode édition activé', 'success'); + } + } } // Gestion des panneaux latéraux @@ -900,9 +944,9 @@ function initializeTemplateForm() { levelSelect.disabled = false; levelSelect.innerHTML = ` - - - + + + `; loadTemplateBtn.disabled = true; @@ -961,49 +1005,7 @@ function initializeTemplateForm() { } }); } +} - togglePreview() { - const previewBtn = document.getElementById('preview-toggle'); - - if (!this.isPreviewMode) { - // Passer en mode prévisualisation - this.originalContent = this.editor.innerHTML; - const markdownContent = this.editor.innerText; - - // Convertir le Markdown en HTML joliment formaté - const previewHTML = this.parseMarkdown(markdownContent); - - // Désactiver l'édition et appliquer le style preview - this.editor.contentEditable = false; - this.editor.innerHTML = `
${previewHTML}
`; - this.editor.style.background = 'var(--background-color)'; - this.editor.style.border = '1px solid var(--border-color)'; - this.editor.style.borderRadius = '8px'; - - // Changer le bouton - previewBtn.innerHTML = '✏️ Éditer'; - previewBtn.classList.remove('primary'); - previewBtn.classList.add('secondary'); - - this.isPreviewMode = true; - this.showNotification('Mode prévisualisation activé', 'success'); - - } else { - // Revenir en mode édition - this.editor.contentEditable = true; - this.editor.innerHTML = this.originalContent; - this.editor.style.background = ''; - this.editor.style.border = ''; - this.editor.style.borderRadius = ''; - - // Changer le bouton - previewBtn.innerHTML = '👁️ Visualiser'; - previewBtn.classList.remove('secondary'); - previewBtn.classList.add('primary'); - - this.isPreviewMode = false; - this.showNotification('Mode édition activé', 'success'); - } - } - -} \ No newline at end of file +// S'assurer que togglePanel est accessible globalement +window.togglePanel = togglePanel; \ No newline at end of file diff --git a/views/header.js b/views/header.js index cf8ee84..046a3a8 100644 --- a/views/header.js +++ b/views/header.js @@ -15,19 +15,19 @@ function getLeftPanel() {
-

⚙️ Templates de Projet

+

Templates de Projet

@@ -35,15 +35,15 @@ function getLeftPanel() {
@@ -59,13 +59,13 @@ function getRightPanel() {
-

🛠️ Outils

+

Outils