forked from yvv/decision
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,84 @@
|
||||
<script setup lang="ts">
|
||||
// <!-- ld-v2 --> Pastille d'inertie d'une clause — CÂBLÉE au protocole
|
||||
// d'amendement résolu par le Pacte (settings.protocolByRange.clauseByInertia) :
|
||||
// le tooltip dit par quel protocole cette clause s'amende, en français,
|
||||
// sans aucune lettre de formule (elles vivent à l'Atelier seulement).
|
||||
import type { InertiaPreset } from '~/types/domain'
|
||||
import { INERTIA_LABELS } from '~/lexicon'
|
||||
import { INERTIA_COLORS, INERTIA_ORDER } from './textsModel'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
preset: InertiaPreset
|
||||
/** Résolu par la page : « Vote WoT standard — 30 jours ». */
|
||||
amendProtocol?: string
|
||||
/** Clause qui protège le réglage de l'inertie lui-même (pastille max). */
|
||||
protectedClause?: boolean
|
||||
compact?: boolean
|
||||
}>(), { compact: false, protectedClause: false })
|
||||
|
||||
const color = computed(() => INERTIA_COLORS[props.preset])
|
||||
const label = computed(() => INERTIA_LABELS[props.preset])
|
||||
const steps = computed(() => INERTIA_ORDER.indexOf(props.preset) + 1)
|
||||
|
||||
const tooltip = computed(() => {
|
||||
const lines: string[] = [label.value]
|
||||
if (props.amendProtocol) lines.push(`S'amende par : ${props.amendProtocol}`)
|
||||
if (props.protectedClause) lines.push('Clause protégée — elle garde les règles qui gardent les règles.')
|
||||
return lines.join('\n')
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- ld-v2 -->
|
||||
<span
|
||||
class="inertia-badge"
|
||||
:class="{ 'inertia-badge--compact': compact }"
|
||||
:style="{ '--ib-color': color }"
|
||||
:title="tooltip"
|
||||
>
|
||||
<span class="inertia-badge__dots" aria-hidden="true">
|
||||
<span
|
||||
v-for="i in 4"
|
||||
:key="i"
|
||||
class="inertia-badge__dot"
|
||||
:class="{ 'inertia-badge__dot--on': i <= steps }"
|
||||
/>
|
||||
</span>
|
||||
<span v-if="!compact" class="inertia-badge__label">{{ label }}</span>
|
||||
<UIcon v-if="protectedClause" name="i-lucide-lock" class="inertia-badge__lock" />
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.inertia-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
padding: 3px 10px;
|
||||
border-radius: var(--r-pill);
|
||||
background: color-mix(in srgb, var(--ib-color) 11%, transparent);
|
||||
color: var(--ib-color);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
cursor: help;
|
||||
user-select: none;
|
||||
}
|
||||
.inertia-badge--compact { padding: 3px 7px; gap: 0.3rem; }
|
||||
|
||||
.inertia-badge__dots {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2.5px;
|
||||
}
|
||||
.inertia-badge__dot {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 50%;
|
||||
background: color-mix(in srgb, var(--ib-color) 25%, transparent);
|
||||
}
|
||||
.inertia-badge__dot--on { background: var(--ib-color); }
|
||||
|
||||
.inertia-badge__label { letter-spacing: 0.01em; }
|
||||
.inertia-badge__lock { font-size: 0.8rem; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user