feat(media): compteur dynamique auteurs + livres ingeres dans header

This commit is contained in:
Jules Neny
2026-05-14 16:10:43 +02:00
parent 3a07d368f0
commit 86b95fa18e

View File

@@ -10,7 +10,7 @@
<div> <div>
<h1 class="font-bold text-base" style="color: var(--nav-text);">ATIS Media</h1> <h1 class="font-bold text-base" style="color: var(--nav-text);">ATIS Media</h1>
<p class="text-xs mt-0.5" style="color: var(--nav-text-muted);"> <p class="text-xs mt-0.5" style="color: var(--nav-text-muted);">
{{ corpusCount }} auteurs ingeres dans le RAG - {{ corpusCount }} auteurs / {{ livresCount }} livres ingeres dans le RAG -
<a href="https://bonpote.com/wp-content/uploads/2024/10/FRACAS_BONPOTE_CARTE_VERSO_V2-OCT2024.pdf" <a href="https://bonpote.com/wp-content/uploads/2024/10/FRACAS_BONPOTE_CARTE_VERSO_V2-OCT2024.pdf"
target="_blank" rel="noopener" target="_blank" rel="noopener"
style="color: var(--nav-primary, #3b6ea5); text-decoration: underline; text-underline-offset: 2px;"> style="color: var(--nav-primary, #3b6ea5); text-decoration: underline; text-underline-offset: 2px;">
@@ -216,8 +216,15 @@ const splitRatio = ref(DEFAULT_SPLIT_RATIO)
const carteFlexBasis = computed(() => `${splitRatio.value * 100}%`) const carteFlexBasis = computed(() => `${splitRatio.value * 100}%`)
const chatbotFlexBasis = computed(() => `${(1 - splitRatio.value) * 100}%`) const chatbotFlexBasis = computed(() => `${(1 - splitRatio.value) * 100}%`)
// Phase 8.D : compteur = auteurs ingere:true uniquement (32 reels, pas 171 total) const corpusCount = computed(() => penseesData.value?.auteurs.filter((a: any) => a.ingere).length ?? 0)
const corpusCount = computed(() => penseesData.value?.auteurs.filter(a => a.ingere).length ?? 0) const livresCount = computed(() => {
if (!penseesData.value) return 0
const slugs = new Set<string>()
penseesData.value.auteurs
.filter((a: any) => a.ingere)
.forEach((a: any) => (a.livres_rag ?? []).forEach((l: any) => slugs.add(l.slug)))
return slugs.size
})
// Logique poignee draggable // Logique poignee draggable
let dragStartY = 0 let dragStartY = 0