From 754bc47abd3d5a60bd03758b2c0e67b3a4e86181 Mon Sep 17 00:00:00 2001 From: Etienne Delvarre Date: Wed, 3 Jun 2026 14:34:17 +0200 Subject: [PATCH] =?UTF-8?q?Historique=20des=20versions=20=E2=80=94=20frise?= =?UTF-8?q?=20+=20r=C3=A9daction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Table NocoDB Versions (Type, RecordId, Snapshot, Label). Snapshots auto avant chaque modification de fiche frise et de texte rédigé. Archive avant suppression de fiche. Panneau latéral avec aperçu et restauration. Co-Authored-By: Claude Opus 4.6 --- public/index.html | 173 +++++++++++++++++++++++++++++++++++++++++++++- server.js | 125 +++++++++++++++++++++++++++++++-- 2 files changed, 291 insertions(+), 7 deletions(-) diff --git a/public/index.html b/public/index.html index cff25e9..8f7de63 100644 --- a/public/index.html +++ b/public/index.html @@ -417,7 +417,7 @@ window.dispatchEvent(new Event('tiptap-loaded')); .binder-scene.active .scene-words { color: rgba(255,255,255,0.6); } .editor-pane { flex: 1; display: flex; flex-direction: column; overflow: hidden; } - .editor-header { padding: 20px 32px 12px; border-bottom: 1px solid var(--border-light); } + .editor-header { padding: 20px 32px 12px; border-bottom: 1px solid var(--border-light); display: flex; align-items: flex-start; gap: 12px; } .editor-scene-title { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 600; color: var(--text); } .editor-scene-meta { font-size: 13px; color: var(--text-hint); margin-top: 4px; display: flex; gap: 16px; } .editor-body { flex: 1; overflow-y: auto; padding: 24px 32px 80px; max-width: 720px; } @@ -468,6 +468,26 @@ window.dispatchEvent(new Event('tiptap-loaded')); .dark .comment-mark.comment-e { background: rgba(138,170,90,0.2); border-bottom-color: rgba(138,170,90,0.4); } .dark .comment-mark.comment-m { background: rgba(212,132,90,0.2); border-bottom-color: rgba(212,132,90,0.4); } + /* ── Version history panel ── */ + .version-panel { position: fixed; top: 0; right: -420px; width: 400px; height: 100vh; background: var(--bg-card); border-left: 1px solid var(--border); z-index: 250; transition: right 0.3s ease; display: flex; flex-direction: column; box-shadow: -4px 0 20px var(--shadow); } + .version-panel.open { right: 0; } + .version-panel-header { padding: 20px 24px 16px; border-bottom: 1px solid var(--border-light); display: flex; justify-content: space-between; align-items: center; } + .version-panel-header h3 { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 600; } + .version-panel-list { flex: 1; overflow-y: auto; padding: 12px; } + .version-item { padding: 14px 16px; border: 1px solid var(--border-light); border-radius: 10px; margin-bottom: 10px; cursor: pointer; transition: border-color 0.2s; } + .version-item:hover { border-color: var(--accent); } + .version-item.selected { border-color: var(--accent); background: var(--bg-alt); } + .version-item-date { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; } + .version-item-label { font-size: 14px; font-weight: 500; margin-bottom: 6px; } + .version-item-preview { font-size: 12px; color: var(--text-hint); line-height: 1.5; max-height: 60px; overflow: hidden; } + .version-preview-pane { padding: 16px 24px; border-top: 1px solid var(--border-light); max-height: 40vh; overflow-y: auto; } + .version-preview-pane h4 { font-family: 'Playfair Display', serif; font-size: 14px; margin-bottom: 10px; color: var(--text-muted); } + .version-preview-content { font-size: 13px; line-height: 1.6; } + .version-actions { padding: 12px 24px 20px; border-top: 1px solid var(--border-light); display: flex; gap: 10px; } + .version-actions button { flex: 1; } + .btn-history { background: none; border: 1px solid var(--border); padding: 6px 14px; border-radius: 8px; font-family: 'Lora', serif; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: all 0.2s; } + .btn-history:hover { border-color: var(--accent); color: var(--text); } + .comment-popup { position: fixed; z-index: 300; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; box-shadow: 0 4px 20px var(--shadow-hover); max-width: 320px; min-width: 200px; } .comment-popup-author { font-size: 12px; font-weight: 600; margin-bottom: 4px; } .comment-popup-author.e { color: var(--olive); } @@ -668,8 +688,11 @@ window.dispatchEvent(new Event('tiptap-loaded'));
Choisir une scène dans le Binder