- crates/ld-engine : formule inertielle (parité avec la maquette, garde C), coquille / changement de fond, assistant d'édition à règles, composition d'un document sous vote permanent (adoptions, aperçus, rivales). - crates/trustin-access : qui voit, qui ouvre, qui gère les accès. - crates/ld-server : API axum + SQLite, connexion Ğ1 (client OAuth2 de connect.monnaie-libre.fr), invitations, entrée en vigueur automatique, signalements de contradiction, traductions éditoriales, publication git, taille de la toile lue sur la chaîne. - seeds/acte-engagement-certification.json : 33 articles, fr + en + es ; en vigueur : préambule, E1, E2 (seed a minima). - maquette/ : frontend, backend et docker v2 déplacés tels quels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
85 lines
2.6 KiB
Vue
85 lines
2.6 KiB
Vue
<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>
|