Feature/chat message styles (#514)

* style items and action chat messages

* enhance death move chat message and fix border bottom from title actions

* fix padding bottom

* Added basic chat-message.hbs

* .

* style remaing chat messages

* style action messages

* remove console log

* add colapsable descriptions in chat messages

* inital style for message rolls

* fix deal damage button style

* add new partchments

* Roll Chat message new design template

* j

* l

* p

* y

* fix _getTags type error and add a alias label for non base messages

* Fix damage & healing roll

* Fix conflict

* Deleting old templates

* Good for now

* fix labels in duality rolls messages and style experience and effects messages

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
Co-authored-by: Dapoolp <elcatnet@gmail.com>
This commit is contained in:
Murilo Brito 2025-08-02 04:24:51 -03:00 committed by GitHub
parent a4b1130142
commit 74df2c4e87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
72 changed files with 1661 additions and 996 deletions

View file

@ -0,0 +1,17 @@
<div class="roll-buttons">
{{#if hasDamage}}
{{#unless (empty damage)}}
<button class="duality-action damage-button">{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamage"}}</button>
{{else}}
<button class="duality-action duality-action-damage">{{localize "DAGGERHEART.UI.Chat.attackRoll.rollDamage"}}</button>
{{/unless}}
{{/if}}
{{#if hasHealing}}
{{#unless (empty damage)}}
<button class="duality-action damage-button">{{localize "DAGGERHEART.UI.Chat.healingRoll.applyHealing"}}</button>
{{else}}
<button class="duality-action duality-action-damage">{{localize "DAGGERHEART.UI.Chat.attackRoll.rollHealing"}}</button>
{{/unless}}
{{/if}}
{{#if hasEffect}}<button class="duality-action-effect">{{localize "DAGGERHEART.UI.Chat.attackRoll.applyEffect"}}</button>{{/if}}
</div>

View file

@ -1,33 +0,0 @@
<div class="dice-roll daggerheart chat roll" data-action="expandRoll">
{{#unless noTitle}}<div class="dice-flavor">{{damage.title}}</div>{{/unless}}
<div class="dice-result">
{{#each damage.roll as | roll index | }}
<div class="dice-flavor">{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')}}</div>
<div class="dice-formula">{{roll.formula}}</div>
<div class="dice-tooltip">
<div class="wrapper">
{{#each roll.parts}}
<section class="tooltip-part">
<div class="dice">
<header class="part-header flexrow">
<span class="part-formula">{{formula}}</span>
<span class="part-total">{{total}}</span>
</header>
<ol class="dice-rolls">
{{#each dice}}
{{#each results}}
<li class="roll die {{../dice}} min">{{result}}</li>
{{/each}}
{{/each}}
</ol>
</div>
{{#if modifierTotal}}<div class="duality-modifier">{{#if (gt modifierTotal 0)}}+{{/if}}{{modifierTotal}}</div>{{/if}}
<div class="duality-result">{{localize "DAGGERHEART.GENERAL.total"}}: {{total}}</div>
</section>
{{/each}}
</div>
</div>
<div class="dice-total">{{roll.total}}</div>
{{/each}}
</div>
</div>

View file

@ -0,0 +1,69 @@
<div class="roll-part damage-section dice-roll" data-action="expandRoll">
<div class="roll-part-header"><div><span>Damage</span></div></div>
<div class="roll-part-extra on-reduced">
<div class="wrapper">
{{#each damage as | roll index | }}
<div class="roll-formula">{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')}}: {{total}}</div>
{{/each}}
</div>
</div>
<div class="roll-part-content dice-result">
<div class="dice-tooltip">
<div class="wrapper">
{{#each damage as | roll index | }}
<fieldset>
<legend>
{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')}} <div class="roll-formula">{{localize "DAGGERHEART.GENERAL.total"}}: {{roll.total}}</div>
</legend>
{{#each roll.parts}}
{{#if damageTypes.length}}
<label class="roll-part-header"><span>
{{#each damageTypes}}
{{localize (concat 'DAGGERHEART.CONFIG.ArmorFeature.' this '.name')}}
{{#unless @last}}/{{/unless}}
{{/each}}
<div class="roll-formula">{{total}}</div></span></label>
{{/if}}
<div class="roll-dice">
{{#each dice}}
{{#each results}}
{{#unless discarded}}
<div class="roll-die">
<div class="dice {{../dice}}">{{result}}</div>
</div>
{{#unless @last}}
<div class="roll-die">
<div class="font-20">+</div>
</div>
{{/unless}}
{{/unless}}
{{/each}}
{{#unless @last}}
<div class="roll-die">
<div class="font-20">+</div>
</div>
{{/unless}}
{{/each}}
{{#if modifierTotal}}
{{#if (gt modifierTotal 0)}}
<div class="roll-die">
<div class="font-20">+</div>
</div>
{{/if}}
<div class="roll-die">
<div class="font-20">{{modifierTotal}}</div>
</div>
{{/if}}
{{#unless dice.length}}
<div class="roll-die">
<div class="font-20">{{total}}</div>
</div>
{{/unless}}
</div>
{{/each}}
</fieldset>
{{/each}}
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,102 @@
<div class="roll-part roll-section">
<div class="roll-part-content">
<div class="roll-result-container">
<span class="roll-result-value">{{roll.total}}</span>
<span class="roll-result-desc">
{{#if roll.isCritical}}
{{localize "DAGGERHEART.GENERAL.criticalShort"}}
{{else}}
{{#if roll.result}}
{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}
{{/if}}
{{/if}}
</span>
</div>
{{#if roll.difficulty}}<span class="roll-difficulty{{#unless roll.success}} is-miss{{/unless}}">difficulty {{roll.difficulty}}</span>{{/if}}
</div>
<div class="dice-roll" data-action="expandRoll">
<div class="roll-part-header"><div><span>Formula</span></div></div>
<div class="roll-part-content dice-result">
<div class="dice-tooltip">
<div class="wrapper">
<div class="roll-dice">
{{#if roll.hope}}
<div class="roll-die">
<label>{{localize "DAGGERHEART.GENERAL.hope"}}</label>
<div class="dice {{roll.hope.dice}} color-hope">{{roll.hope.value}}</div>
</div>
<div class="roll-die">
<label></label>
<div class="font-20">+</div>
</div>
<div class="roll-die">
<label>{{localize "DAGGERHEART.GENERAL.fear"}}</label>
<div class="dice {{roll.fear.dice}} color-fear" style="--svg-folder: 'fear';">{{roll.fear.value}}</div>
</div>
{{#if roll.advantage.type}}
<div class="roll-die">
<label></label>
<div class="font-20">+</div>
</div>
<div class="roll-die">
{{#if (eq roll.advantage.type 1)}}
<label>{{localize "DAGGERHEART.GENERAL.Advantage.short"}}</label>
<div class="dice {{roll.advantage.dice}} color-adv">{{roll.advantage.value}}</div>
{{else}}
<label>{{localize "DAGGERHEART.GENERAL.Disadvantage.short"}}</label>
<div class="dice {{roll.advantage.dice}} color-dis">{{roll.advantage.value}}</div>
{{/if}}
</div>
{{/if}}
{{#if roll.rally.dice}}
<div class="roll-die">
<label></label>
<div class="font-20">+</div>
</div>
<div class="roll-die">
<label>{{localize "DAGGERHEART.GENERAL.fear"}}</label>
<div class="dice {{roll.rally.dice}}">{{roll.rally.value}}</div>
</div>
{{/if}}
{{#each roll.extra}}
<div class="roll-die">
<label></label>
<div class="font-20">+</div>
</div>
<div class="roll-die">
<label></label>
<div class="dice {{dice}}">{{value}}</div>
</div>
{{#unless @last}}
<div class="roll-die">
<label></label>
<div class="font-20">+</div>
</div>
{{/unless}}
{{/each}}
{{else}}
{{#each roll.dice}}
{{#each results}}
<div class="roll-die">
<div class="dice {{../dice}}{{#if discarded}} discarded{{else}}{{#if (and (eq @index 0) ../../roll.advantage.type)}}{{#if (eq ../../roll.advantage.type 1)}} color-adv{{else}} color-dis{{/if}}{{/if}}{{#if success}} color-adv{{/if}}{{/if}}">{{result}}</div>
</div>
{{#unless (or @last (not discarded))}}
<div class="roll-die">
<div class="font-20">+</div>
</div>
{{/unless}}
{{/each}}
{{#unless @last}}
<div class="roll-die">
<div class="font-20">+</div>
</div>
{{/unless}}
{{/each}}
{{/if}}
</div>
</div>
<div class="roll-formula">{{roll.formula}}</div>
</div>
</div>
</div>
</div>

View file

@ -1,38 +0,0 @@
{{#if (gt currentTargets.length 0)}}
<fieldset class="dice-roll daggerheart chat roll expanded" data-action="expandRoll">
<legend class="dice-flavor">{{localize "DAGGERHEART.GENERAL.Target.plural"}}</legend>
<div class="dice-result">
<div class="dice-tooltip">
<div class="wrapper">
<div class="target-selection">
<label class="button-target-selection{{#if @root.targetSelection}} target-selected{{/if}}" data-target-hit="true">{{localize "DAGGERHEART.UI.Chat.damageRoll.hitTarget"}}</label>
<label class="button-target-selection{{#unless @root.targetSelection}} target-selected{{/unless}}">{{localize "DAGGERHEART.UI.Chat.damageRoll.selectedTarget"}}</label>
</div>
{{#if (and hasSave @root.targetSelection @root.hasHitTarget)}}
<button class="inner-button inner-button-right roll-all-save-button">{{localize "DAGGERHEART.GENERAL.rollAll"}} <i class="fa-solid fa-shield"></i></button>
{{/if}}
<div class="target-section">
{{#each currentTargets as |target|}}
<div class="dice-total target-container {{#if target.hit}}hit{{else}}{{#if (not ../total.alternate)}}miss{{/if}}{{/if}}" data-token="{{target.id}}">
<img src="{{target.img}}" />
<div class="target-inner-container">
{{#if (or ../directDamage (not @root.targetSelection))}}
<div data-perm-id="{{target.actorId}}"><span>{{target.name}}</span></div>
{{else}}
{{#if target.hit}}{{localize "Hit"}}{{else}}{{#if (not ../total.alternate)}}{{localize "Miss"}}{{else}}?{{/if}}{{/if}}
{{/if}}
</div>
{{#if (and ../hasSave target.hit @root.targetSelection)}}
<button class="target-save-container{{#if target.saved.result includeZero=true}} is-rolled{{/if}}" data-perm-id="{{target.actorId}}">
<i class="fa-solid {{#if target.saved.result includeZero=true}}{{#if target.saved.success}}fa-check{{else}}fa-xmark{{/if}}{{else}}fa-shield{{/if}}">
</i>
</button>
{{/if}}
</div>
{{/each}}
</div>
</div>
</div>
</div>
</fieldset>
{{/if}}

View file

@ -0,0 +1,55 @@
<div class="roll-part target-section dice-roll" data-action="expandRoll">
<div class="roll-part-header"><div><span>Target</span></div></div>
{{#if (and targets.length (or (or (gt targetShort.hit 0) (gt targetShort.miss 0)) (and hasSave pendingSaves)))}}
<div class="roll-part-extra on-reduced">
<div class="wrapper">
{{#if (or (gt targetShort.hit 0) (gt targetShort.miss 0))}}
<div class="target-hit-status">{{targetShort.hit}} {{#if (gt targetShort.hit 1)}}{{localize "DAGGERHEART.GENERAL.hit.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.hit.plural"}}{{/if}}</div>
<div class="target-hit-status is-miss">{{targetShort.miss}} {{#if (gt targetShort.miss 1)}}{{localize "DAGGERHEART.GENERAL.miss.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.miss.plural"}}{{/if}}</div>
{{/if}}
{{#if (and hasSave pendingSaves)}}<div class="target-pending-saves{{#if hasRoll}} is-absolute{{/if}}" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.pendingSaves"}}" data-tooltip-direction="UP"><i class="fa-solid fa-shield fa-lg fa-beat"></i></div>{{/if}}
</div>
</div>
{{/if}}
<div class="roll-part-content dice-result">
<div class="dice-tooltip">
<div class="wrapper">
{{#if targets.length}}
<div class="target-selector">
<div class="roll-part-header"><div></div></div>
<div class="target-choice">
<div class="button-target-selection{{#if targetSelection}} target-selected{{/if}}" data-target-hit="true">{{localize "DAGGERHEART.UI.Chat.damageRoll.hitTarget"}}</div>
<div class="button-target-selection{{#unless targetSelection}} target-selected{{/unless}}">{{localize "DAGGERHEART.UI.Chat.damageRoll.currentTarget"}}</div>
</div>
<div class="roll-part-header"><div></div></div>
</div>
{{/if}}
{{#if (and hasSave @root.targetSelection pendingSaves)}}<div class="roll-part-extra roll-all-save-button">Reaction Roll All Targets<i class="fa-solid fa-shield fa-lg"></i></div>{{/if}}
{{#each currentTargets}}
<div class="roll-target" data-token="{{id}}">
<img class="target-img" src="{{img}}">
<div class="target-data">
<div class="target-name" data-perm-id="{{actorId}}">{{name}}</div>
{{#if (and ../targetSelection ../hasRoll)}}
<div class="target-hit-status {{#if hit}}is-hit{{else}}is-miss{{/if}}">
{{#if hit}}
{{localize "DAGGERHEART.GENERAL.hit.single"}}
{{else}}
{{localize "DAGGERHEART.GENERAL.miss.single"}}
{{/if}}
</div>
{{/if}}
</div>
{{#if (and ../hasSave hit @root.targetSelection)}}
<div class="target-save{{#if saved.result includeZero=true}} is-rolled{{/if}}" data-perm-id="{{actorId}}">
<i class="fa-solid {{#if saved.result includeZero=true}}{{#if saved.success}}fa-check{{else}}fa-xmark{{/if}}{{else}}fa-shield{{/if}} fa-lg"></i>
</div>
{{/if}}
</div>
{{else}}
<i>{{localize "DAGGERHEART.GENERAL.noTarget"}}</i>
{{/each}}
</div>
</div>
</div>
</div>