Files
fvtt-celestopol/templates/chat-message.hbs
LeRatierBretonnier cff700bd3d Fix roll dialog CSS + JS: template <div> wrapper, moon-section, selectors
- Remplace <form class='roll-dialog celestopol'> par <div class='roll-dialog-content'>
  pour éviter les formulaires HTML imbriqués invalides (DialogV2 a son propre <form>)
- Corrige le sélecteur CSS de .roll-dialog.celestopol vers .application.roll-dialog .roll-dialog-content
- Remplace .form-group.form-moon par .moon-section (classe custom) pour éviter
  les conflits avec le CSS grid de FoundryVTT standard-form (label 130px de hauteur)
- Met à jour le script JS inline pour utiliser document.querySelector('.roll-dialog-content')
- Ajoute white-space: nowrap sur le label Destin pour éviter le wrapping sur 3 lignes
- Supprime .application.roll-dialog .window-content padding override (remplacé par dialog-content)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 17:21:18 +01:00

89 lines
3.2 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div class="celestopol chat-roll {{resultClass}}">
{{!-- En-tête : acteur + domaine --}}
<div class="roll-header">
{{#if actorImg}}
<img src="{{actorImg}}" class="actor-img" alt="{{actorName}}">
{{/if}}
<div class="roll-info">
<span class="actor-name">{{actorName}}</span>
<span class="skill-info">
{{#if statLabel}}<span class="stat-lbl">{{statLabel}}</span><span class="sep"> </span>{{/if}}
<span class="skill-lbl">{{skillLabel}}</span>
</span>
{{#if woundLabel}}
<span class="wound-info">⚠ {{woundLabel}}</span>
{{/if}}
</div>
<div class="moon-badge" title="{{moonPhaseLabel}}">
<span class="moon-sym">{{moonSymbol}}</span>
{{#if moonBonus}}<span class="moon-bon">+{{moonBonus}}</span>{{/if}}
</div>
</div>
{{!-- Dés --}}
<div class="dice-zone">
{{#each diceResults as |die|}}
<span class="die-face d6 {{#if (eq die 6)}}max{{/if}}{{#if (eq die 1)}}min{{/if}}">{{die}}</span>
{{/each}}
</div>
{{!-- Formule détaillée --}}
<div class="formula-line">
<span class="fl-ndice">{{nbDice}}d6</span>
<span class="fl-eq"> = </span>
<span class="fl-sum">{{diceSum}}</span>
{{#if moonBonus}}
<span class="fl-op"> + </span>
<span class="fl-moon" title="{{moonPhaseLabel}}">{{moonSymbol}} {{moonBonus}}</span>
{{/if}}
{{#if modifier}}
<span class="fl-op"> {{#if (gt modifier 0)}}+{{else}}{{/if}} </span>
<span class="fl-mod">{{abs modifier}}</span>
{{/if}}
{{#if aspectMod}}
<span class="fl-op"> {{#if (gt aspectMod 0)}}+{{else}}{{/if}} </span>
<span class="fl-asp" title="{{localize "CELESTOPOL.Roll.usedAspect"}}">✦ {{abs aspectMod}}</span>
{{/if}}
<span class="fl-sep"> = </span>
<span class="fl-total">{{total}}</span>
</div>
{{!-- Seuil et marge --}}
<div class="threshold-line">
<span class="vs-label">vs</span>
<span class="diff-label">{{difficultyLabel}}</span>
<span class="diff-val">({{difficultyValue}})</span>
{{#if margin}}
<span class="margin-badge {{#if marginAbove}}above{{else}}below{{/if}}">
{{#if marginAbove}}+{{/if}}{{margin}}
</span>
{{/if}}
</div>
{{!-- Infos bonus (Destin utilisé) --}}
{{#if useDestin}}
<div class="used-info">
<span class="used-destin">⭐ {{localize "CELESTOPOL.Roll.usedDestin"}}</span>
</div>
{{/if}}
{{!-- Bandeau résultat --}}
<div class="roll-result-banner {{resultClass}}">
{{#if isCriticalSuccess}}
<span class="result-icon">✦</span>
<span class="result-label">{{localize "CELESTOPOL.Roll.criticalSuccess"}}</span>
<span class="result-desc">{{localize "CELESTOPOL.Roll.criticalSuccessDesc"}}</span>
{{else if isSuccess}}
<span class="result-label">{{localize "CELESTOPOL.Roll.success"}}</span>
{{else if isCriticalFailure}}
<span class="result-icon">✖</span>
<span class="result-label">{{localize "CELESTOPOL.Roll.criticalFailure"}}</span>
<span class="result-desc">{{localize "CELESTOPOL.Roll.criticalFailureDesc"}}</span>
{{else if isFailure}}
<span class="result-label">{{localize "CELESTOPOL.Roll.failure"}}</span>
{{/if}}
</div>
</div>