Compare commits

...

2 commits

Author SHA1 Message Date
WBHarry
2012f0d482 . 2026-02-02 12:04:11 +01:00
WBHarry
0b4266ba08 Revert "Initial chat message description design change"
This reverts commit f4f5fd6c24.
2026-02-02 10:50:18 +01:00
6 changed files with 37 additions and 36 deletions

View file

@ -241,11 +241,12 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
*/ */
prepareBaseConfig(event) { prepareBaseConfig(event) {
const isActor = this.item instanceof CONFIG.Actor.documentClass; const isActor = this.item instanceof CONFIG.Actor.documentClass;
const isItem = this.item instanceof CONFIG.Item.documentClass; const actionTitle = game.i18n.localize(this.name);
const itemTitle = isActor || this.item.name === actionTitle ? '' : `${this.item.name} - `;
const config = { const config = {
event, event,
title: `${isActor || isItem ? '' : `${this.item.name}: `}${game.i18n.localize(this.name)}`, title: `${itemTitle}${actionTitle}`,
source: { source: {
item: this.item._id, item: this.item._id,
originItem: this.originItem, originItem: this.originItem,

View file

@ -37,7 +37,7 @@ export default class DhAppearance extends foundry.abstract.DataModel {
extendEnvironmentDescriptions: new BooleanField(), extendEnvironmentDescriptions: new BooleanField(),
extendItemDescriptions: new BooleanField(), extendItemDescriptions: new BooleanField(),
expandRollMessage: new SchemaField({ expandRollMessage: new SchemaField({
desc: new BooleanField(), desc: new BooleanField({ initial: true }),
roll: new BooleanField(), roll: new BooleanField(),
damage: new BooleanField(), damage: new BooleanField(),
target: new BooleanField() target: new BooleanField()

View file

@ -101,7 +101,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
CONFIG.DH.id, CONFIG.DH.id,
CONFIG.DH.SETTINGS.gameSettings.appearance CONFIG.DH.SETTINGS.gameSettings.appearance
).expandRollMessage, ).expandRollMessage,
rollSections = html.querySelectorAll('.roll-part, .description-section'), rollSections = html.querySelectorAll('.roll-part'),
itemDesc = html.querySelector('.domain-card-move'); itemDesc = html.querySelector('.domain-card-move');
rollSections.forEach(s => { rollSections.forEach(s => {
if (s.classList.contains('roll-section')) { if (s.classList.contains('roll-section')) {

View file

@ -228,6 +228,15 @@
font-size: var(--font-size-12); font-size: var(--font-size-12);
padding: 0 20px; padding: 0 20px;
.roll-part-title {
text-align: center;
font-family: @font-subtitle;
font-size: var(--font-size-18);
font-weight: bold;
color: var(--text-color);
margin-bottom: -2px;
}
> .roll-part-header { > .roll-part-header {
font-size: var(--font-size-14); font-size: var(--font-size-14);
} }
@ -575,34 +584,25 @@
} }
.chat-roll .description-section { .chat-roll .description-section {
background: @dark-80; .roll-part-content {
border-radius: 6px; .dice-tooltip {
.wrapper {
i {
margin: 0;
.description-header { :first-child {
width: 100%; margin-top: 0;
display: flex; }
flex-direction: column;
align-items: center;
gap: 2px;
.description-header-title { :last-child {
color: @golden; margin-bottom: 0;
font-size: var(--font-size-16); }
} }
.description-header-subtitle { > :first-child:not(.target-selector) {
font-size: var(--font-size-14); margin: 0;
padding-bottom: 2px; }
} }
}
.roll-part-content .dice-tooltip .wrapper {
i {
margin: 0;
}
> :first-child:not(.target-selector) {
margin: 0;
} }
} }
} }

View file

@ -1,8 +1,5 @@
<div class="dice-roll description-section" data-action="expandRoll"> <div class="roll-part dice-roll description-section" data-action="expandRoll">
<div class="description-header"> <div class="roll-part-header"><div><span>{{localize "DAGGERHEART.GENERAL.description"}}</span></div></div>
<div class="description-header-title">{{title}}</div>
<div class="description-header-subtitle">{{title}}</div>
</div>
<div class="roll-part-content description-content"> <div class="roll-part-content description-content">
<div class="dice-tooltip"> <div class="dice-tooltip">

View file

@ -1,7 +1,10 @@
<div class="chat-roll"> <div class="chat-roll">
<div class="roll-part-title"><span>{{title}}</span></div>
{{#if actionDescription}}{{> 'systems/daggerheart/templates/ui/chat/parts/description-part.hbs'}}{{/if}} {{#if actionDescription}}{{> 'systems/daggerheart/templates/ui/chat/parts/description-part.hbs'}}{{/if}}
<div class="roll-part-header"><span>{{title}}</span></div> {{#if hasRoll}}
{{#if hasRoll}}{{> 'systems/daggerheart/templates/ui/chat/parts/roll-part.hbs'}}{{/if}} <div class="roll-part-header"><span>{{localize "Result"}}</span></div>
{{> 'systems/daggerheart/templates/ui/chat/parts/roll-part.hbs'}}
{{/if}}
{{#if (or hasDamage hasHealing)}}{{> 'systems/daggerheart/templates/ui/chat/parts/damage-part.hbs'}}{{/if}} {{#if (or hasDamage hasHealing)}}{{> 'systems/daggerheart/templates/ui/chat/parts/damage-part.hbs'}}{{/if}}
{{#if hasTarget}}{{> 'systems/daggerheart/templates/ui/chat/parts/target-part.hbs'}}{{/if}} {{#if hasTarget}}{{> 'systems/daggerheart/templates/ui/chat/parts/target-part.hbs'}}{{/if}}
<div class="roll-part-header"><div></div></div> <div class="roll-part-header"><div></div></div>