v2 : les 14 écrans — le tour complet de la démocratie d'exercice
- 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>
This commit is contained in:
@@ -0,0 +1,255 @@
|
||||
<script setup lang="ts">
|
||||
// <!-- ld-v2 --> /mandats/[id] — le pouvoir confié, visible et reprenable.
|
||||
// Origine cliquable (le mandat EST né d'une décision), faits comptés (Δ7),
|
||||
// feux de la rampe, révocation en un geste au protocole d'origine.
|
||||
import { useCollectiveStore } from '~/stores/collective'
|
||||
import { MANDATE_REVOKE, NOMINATION_LABELS } from '~/lexicon'
|
||||
import {
|
||||
MANDATE_STATUS_LABELS,
|
||||
MANDATE_STATUS_PILL,
|
||||
} from '~/components/mandates/mandateUi'
|
||||
|
||||
const route = useRoute()
|
||||
const col = useCollectiveStore()
|
||||
|
||||
const mandate = computed(() =>
|
||||
col.mandates.find(m => m.id === String(route.params.id)),
|
||||
)
|
||||
|
||||
const holder = computed(() =>
|
||||
col.people.find(p => p.id === mandate.value?.holderId),
|
||||
)
|
||||
const originDecision = computed(() =>
|
||||
col.decisions.find(d => d.id === mandate.value?.originDecisionId),
|
||||
)
|
||||
const domainCircles = computed(() =>
|
||||
(mandate.value?.domain.circleIds ?? [])
|
||||
.map(id => col.circles.find(c => c.id === id))
|
||||
.filter(c => c !== undefined),
|
||||
)
|
||||
const electorCircle = computed(() =>
|
||||
col.circles.find(c => c.id === mandate.value?.electorCircleId),
|
||||
)
|
||||
const revokeTo = computed(() =>
|
||||
mandate.value ? `/decider?mandat=${mandate.value.id}&chain=revocation` : '/decider',
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- ld-v2 -->
|
||||
<div v-if="mandate" class="mfiche">
|
||||
<NuxtLink to="/mandats" class="mfiche__back">
|
||||
<UIcon name="i-lucide-arrow-left" />
|
||||
Mandats
|
||||
</NuxtLink>
|
||||
|
||||
<!-- ── En-tête : le pouvoir, explicite ── -->
|
||||
<header class="mfiche__head ld-card">
|
||||
<div class="mfiche__title-row">
|
||||
<h1 class="mfiche__title">{{ mandate.title }}</h1>
|
||||
<span class="status-pill" :class="MANDATE_STATUS_PILL[mandate.status]">
|
||||
{{ MANDATE_STATUS_LABELS[mandate.status] }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="holder" class="mfiche__holder">
|
||||
<LdAvatarStack :people="[{ person: holder }]" :size="38" />
|
||||
<div>
|
||||
<p class="mfiche__holder-name">{{ holder.displayName }}</p>
|
||||
<p class="mfiche__holder-role">titulaire</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<dl class="mfiche__meta">
|
||||
<div class="mfiche__meta-row">
|
||||
<dt>Origine</dt>
|
||||
<dd>
|
||||
<NuxtLink
|
||||
v-if="originDecision"
|
||||
:to="`/decisions/${originDecision.id}`"
|
||||
class="mfiche__origin"
|
||||
>
|
||||
<UIcon name="i-lucide-scale" />
|
||||
{{ originDecision.title }}
|
||||
</NuxtLink>
|
||||
<span v-else class="mfiche__muted">décision fondatrice hors de ce fichier</span>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="mfiche__meta-row">
|
||||
<dt>Domaine</dt>
|
||||
<dd class="mfiche__chips">
|
||||
<span v-for="c in domainCircles" :key="c.id" class="mfiche__chip">
|
||||
<UIcon name="i-lucide-circle-dashed" />
|
||||
{{ c.name }}
|
||||
</span>
|
||||
<span v-for="tag in mandate.domain.tags" :key="tag" class="mfiche__tag">
|
||||
#{{ tag }}
|
||||
</span>
|
||||
<span v-if="!domainCircles.length && !mandate.domain.tags.length" class="mfiche__muted">
|
||||
domaine non précisé
|
||||
</span>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="mfiche__meta-row">
|
||||
<dt>Cercle électeur</dt>
|
||||
<dd>
|
||||
<span class="mfiche__chip">
|
||||
<UIcon name="i-lucide-users-round" />
|
||||
{{ electorCircle?.name ?? '—' }}
|
||||
</span>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="mfiche__meta-row">
|
||||
<dt>Nomination</dt>
|
||||
<dd>{{ NOMINATION_LABELS[mandate.nominationMethod] }}</dd>
|
||||
</div>
|
||||
<div class="mfiche__meta-row mfiche__meta-row--period">
|
||||
<dt>Période</dt>
|
||||
<dd>
|
||||
<MandatePeriodBar :starts-at="mandate.startsAt" :ends-at="mandate.endsAt" />
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</header>
|
||||
|
||||
<!-- ── Exercice du mandat — faits comptés ── -->
|
||||
<MandateExercise :mandate="mandate" />
|
||||
|
||||
<!-- ── Feux de la rampe ── -->
|
||||
<MandateSpotlights :mandate="mandate" />
|
||||
|
||||
<!-- ── Révocation en un geste — jamais improvisée ── -->
|
||||
<section v-if="mandate.status === 'active'" class="mfiche__revoke ld-card">
|
||||
<NuxtLink :to="revokeTo" class="ld-btn ld-btn--ghost mfiche__revoke-btn">
|
||||
<UIcon name="i-lucide-key-square" />
|
||||
{{ MANDATE_REVOKE }}
|
||||
</NuxtLink>
|
||||
<p class="mfiche__revoke-note">
|
||||
La révocation suit le protocole de nomination d'origine
|
||||
({{ NOMINATION_LABELS[mandate.nominationMethod] }}), avec le cercle électeur
|
||||
« {{ electorCircle?.name ?? '—' }} » comme périmètre — jamais plus coûteuse
|
||||
que la nomination.
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div v-else class="mfiche mfiche--missing">
|
||||
<p class="ld-card mfiche__missing-card">
|
||||
Ce mandat est introuvable dans ce collectif.
|
||||
<NuxtLink to="/mandats" class="mfiche__origin">Revenir aux mandats</NuxtLink>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.mfiche {
|
||||
max-width: 46rem;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
.mfiche__back {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
align-self: flex-start;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
color: var(--mood-text-muted);
|
||||
text-decoration: none;
|
||||
}
|
||||
.mfiche__back:hover { color: var(--mood-text); }
|
||||
|
||||
.mfiche__head {
|
||||
padding: 1.375rem 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
.mfiche__title-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.mfiche__title {
|
||||
margin: 0;
|
||||
font-size: clamp(1.25rem, 3.5vw, 1.625rem);
|
||||
font-weight: 800;
|
||||
line-height: 1.25;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
.mfiche__holder { display: flex; align-items: center; gap: 0.75rem; }
|
||||
.mfiche__holder-name { margin: 0; font-size: 1rem; font-weight: 700; }
|
||||
.mfiche__holder-role { margin: 0; font-size: 0.8125rem; color: var(--mood-text-muted); }
|
||||
|
||||
.mfiche__meta { margin: 0; display: flex; flex-direction: column; gap: 0.625rem; }
|
||||
.mfiche__meta-row {
|
||||
display: grid;
|
||||
grid-template-columns: 7.5rem 1fr;
|
||||
gap: 0.75rem;
|
||||
align-items: baseline;
|
||||
}
|
||||
.mfiche__meta-row dt {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--mood-text-muted);
|
||||
}
|
||||
.mfiche__meta-row dd { margin: 0; font-size: 0.9375rem; min-width: 0; }
|
||||
.mfiche__meta-row--period dd { padding-top: 0.25rem; }
|
||||
@media (max-width: 479px) {
|
||||
.mfiche__meta-row { grid-template-columns: 1fr; gap: 0.125rem; }
|
||||
}
|
||||
|
||||
.mfiche__origin {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
font-weight: 600;
|
||||
color: var(--mood-accent);
|
||||
text-decoration: none;
|
||||
}
|
||||
.mfiche__origin:hover { text-decoration: underline; }
|
||||
.mfiche__chips { display: flex; flex-wrap: wrap; gap: 0.375rem; align-items: center; }
|
||||
.mfiche__chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 600;
|
||||
color: var(--mood-accent);
|
||||
background: var(--mood-accent-soft);
|
||||
padding: 2px 10px;
|
||||
border-radius: var(--r-pill);
|
||||
}
|
||||
.mfiche__tag { font-size: 0.8125rem; color: var(--mood-text-muted); }
|
||||
.mfiche__muted { color: var(--mood-text-muted); font-style: italic; font-size: 0.875rem; }
|
||||
|
||||
.mfiche__revoke {
|
||||
padding: 1.125rem 1.375rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.625rem;
|
||||
}
|
||||
.mfiche__revoke-btn { align-self: flex-start; color: var(--mood-status-revoque); }
|
||||
.mfiche__revoke-note {
|
||||
margin: 0;
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.55;
|
||||
color: var(--mood-text-muted);
|
||||
}
|
||||
.mfiche--missing { padding-top: 2rem; }
|
||||
.mfiche__missing-card {
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user