- Aujourd'hui (Fil 13 sections + capture sticky) + Le chemin (tunnel 2 gestes, Q0 inline, 3 chips, dérogation asymétrique, alternatives réglage/consignation) - Registre + fiche décision (timeline, périmètre premier/second lieu auditable, affluence non-ignorable, S'instruire condensé, éléments + cartographie de clôture, épreuve du réel, Remettre en question, PV A4, gravure) - Salle de vote 5 modalités (consentement, nuancé+histogramme, binaire hérité avec jauge inertielle, Réglage collectif complet — faisceau, médiane basse, Pour moi, Explorer, cristallisation-geste —, élection à départage humain) - Textes (Pacte en clair, document vivant, diff, vue projetée, Atelier des formules porté du v1 sur le moteur unique) + Mandats (faits comptés, feux de la rampe, wizard 3 étapes) + Observatoire (consigner→observer→protocoliser) - Onboarding 7 gabarits + Données locales (export/import, attributs, atelier) - voting→framing gardé (Reformuler d'un réglage figé non cristallisé) - Pages v1 supprimées (login, documents, mandates, protocols, sanctuary, tools, decisions/new) — 342 tests verts, build zéro erreur Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
67 lines
2.9 KiB
Vue
67 lines
2.9 KiB
Vue
<script setup lang="ts">
|
|
// <!-- ld-v2 --> MON historique de re-votes — la chaîne supersedes n'est jamais
|
|
// publique : elle n'est visible que de son auteur·e, ici, dépliée à la demande.
|
|
import { useCollectiveStore } from '~/stores/collective'
|
|
import { BLANK_VOTE, NUANCED_LABELS } from '~/lexicon'
|
|
import type { Id, NuancedValue, Vote, VoteSession } from '~/types/domain'
|
|
|
|
const props = defineProps<{ session: VoteSession; voterId: Id }>()
|
|
const col = useCollectiveStore()
|
|
|
|
const mine = computed<Vote[]>(() =>
|
|
col.votes
|
|
.filter(v => v.sessionId === props.session.id && v.voterId === props.voterId)
|
|
.sort((a, b) => (a.createdAt < b.createdAt ? 1 : -1)),
|
|
)
|
|
|
|
function label(vote: Vote): string {
|
|
if (vote.value === 'for') return 'pour'
|
|
if (vote.value === 'against') return 'refus argumenté'
|
|
if (typeof vote.value === 'number') return NUANCED_LABELS[vote.value as NuancedValue]
|
|
if (vote.values) return vote.values.map(v => v.toLocaleString('fr-FR', { maximumFractionDigits: 2 })).join(' · ')
|
|
if (vote.choicePersonId) return col.people.find(p => p.id === vote.choicePersonId)?.displayName ?? '—'
|
|
return BLANK_VOTE
|
|
}
|
|
function when(iso: string): string {
|
|
return new Date(iso).toLocaleString('fr-FR', { day: '2-digit', month: '2-digit', hour: '2-digit', minute: '2-digit' })
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<!-- ld-v2 -->
|
|
<details v-if="mine.length" class="vh">
|
|
<summary>
|
|
<UIcon name="i-lucide-history" />
|
|
<span>Mon historique de re-votes ({{ mine.length }}) — visible par moi seul</span>
|
|
</summary>
|
|
<ol class="vh__list">
|
|
<li v-for="(vote, i) in mine" :key="vote.id" :class="{ 'vh__old': i > 0 }">
|
|
<span class="vh__when">{{ when(vote.createdAt) }}</span>
|
|
<span class="vh__label">{{ label(vote) }}</span>
|
|
<span v-if="i === 0" class="vh__active">actif</span>
|
|
<span v-if="vote.comment" class="vh__comment">{{ vote.comment }}</span>
|
|
</li>
|
|
</ol>
|
|
</details>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.vh { background: var(--mood-bg); border-radius: var(--r-input); padding: 0.6rem 0.9rem; }
|
|
.vh summary {
|
|
display: flex; align-items: center; gap: 0.45rem; cursor: pointer; user-select: none;
|
|
font-size: 0.8125rem; font-weight: 700; color: var(--mood-text-muted);
|
|
}
|
|
.vh__list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
|
|
.vh__list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; font-size: 0.875rem; }
|
|
.vh__old { opacity: 0.6; }
|
|
.vh__old .vh__label { text-decoration: line-through; }
|
|
.vh__when { font-size: 0.75rem; color: var(--mood-text-muted); font-variant-numeric: tabular-nums; }
|
|
.vh__label { font-weight: 700; }
|
|
.vh__active {
|
|
font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
|
|
color: var(--mood-status-vigueur); background: var(--mood-status-vigueur-bg);
|
|
padding: 1px 8px; border-radius: var(--r-pill);
|
|
}
|
|
.vh__comment { width: 100%; color: var(--mood-text-muted); font-size: 0.8125rem; }
|
|
</style>
|