feat & fix : intégration IA éditeur + onglet admin IA + corrections CSP (v1.6.24-25)
- #96 : boutons IA sidebar éditeur (analyse critique / réécriture) via Anthropic API - #97 : onglet admin /admin/ia — provider anthropic/claude_code, modèle, procédure CLI - #95 : extraction scripts inline vers fichiers JS (comments.js, post_confirm.js, admin.js) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ $dateValue = isset($published_at)
|
||||
?>
|
||||
|
||||
<?php if ($action === 'edit'): ?>
|
||||
<?php $aiEditor = true; ?>
|
||||
<div id="vl-page"
|
||||
data-uuid="<?= htmlspecialchars($uuid) ?>"
|
||||
data-insert-url="<?= htmlspecialchars($insertUrl ?? '') ?>"
|
||||
@@ -221,6 +222,38 @@ $dateValue = isset($published_at)
|
||||
|
||||
<hr class="my-3">
|
||||
|
||||
<div class="mb-3">
|
||||
<p class="fw-semibold small mb-2">IA</p>
|
||||
<div class="d-flex flex-column gap-2">
|
||||
<button type="button" id="btn-ai-critique"
|
||||
class="btn btn-outline-secondary btn-sm">
|
||||
Analyse critique
|
||||
</button>
|
||||
<button type="button" id="btn-ai-rewrite"
|
||||
class="btn btn-outline-secondary btn-sm">
|
||||
Réécrire l'article
|
||||
</button>
|
||||
</div>
|
||||
<div id="ai-result-panel" class="mt-3" style="display:none">
|
||||
<div class="d-flex align-items-center justify-content-between mb-1">
|
||||
<span id="ai-result-label" class="fw-semibold small"></span>
|
||||
<button type="button" id="btn-ai-close" class="btn-close btn-sm"
|
||||
aria-label="Fermer"></button>
|
||||
</div>
|
||||
<div id="ai-result-content"
|
||||
class="border rounded p-2 small"
|
||||
style="max-height:400px;overflow-y:auto;white-space:pre-wrap;font-family:inherit;background:#f8f9fa">
|
||||
</div>
|
||||
<button type="button" id="btn-ai-apply"
|
||||
class="btn btn-warning btn-sm mt-2"
|
||||
style="display:none">
|
||||
Appliquer dans l'éditeur
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-3">
|
||||
|
||||
<?php if (!empty($existingFiles)): ?>
|
||||
<?php $coverFile = $article['cover'] ?? ''; ?>
|
||||
<?php $filesMeta = $article['files_meta'] ?? []; ?>
|
||||
|
||||
Reference in New Issue
Block a user