[Bugfix] Fix light theme to roll messages (#1066)

* fix light theme to roll messages

* fix light theme issues

* finally fix issues

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
Murilo Brito 2025-08-23 21:52:18 -03:00 committed by GitHub
parent 661808b5f1
commit 2a0d748b5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 523 additions and 423 deletions

View file

@ -2385,7 +2385,7 @@
"subtype": "Subtype", "subtype": "Subtype",
"folders": { "folders": {
"adversaries": "Adversaries", "adversaries": "Adversaries",
"ancestries": "Ancestries", "ancestries": "Ancestries",
"equipment": "Equipment", "equipment": "Equipment",
"classes": "Classes", "classes": "Classes",
"subclasses": "Subclasses", "subclasses": "Subclasses",

View file

@ -11,19 +11,19 @@ export default class DhMeasuredTemplate extends foundry.canvas.placeables.Measur
if (splitRulerText.length > 0) { if (splitRulerText.length > 0) {
const rulerValue = Number(splitRulerText[0]); const rulerValue = Number(splitRulerText[0]);
const result = DhMeasuredTemplate.getRangeLabels(rulerValue, rangeMeasurementSettings); const result = DhMeasuredTemplate.getRangeLabels(rulerValue, rangeMeasurementSettings);
this.ruler.text = result.distance + (result.units ? (' ' + result.units) : ''); this.ruler.text = result.distance + (result.units ? ' ' + result.units : '');
} }
} }
} }
static getRangeLabels(distanceValue, settings) { static getRangeLabels(distanceValue, settings) {
let result = { distance: distanceValue, units: '' } let result = { distance: distanceValue, units: '' };
const rangeMeasurementOverride = canvas.scene.flags.daggerheart?.rangeMeasurementOverride; const rangeMeasurementOverride = canvas.scene.flags.daggerheart?.rangeMeasurementOverride;
if (rangeMeasurementOverride === true) { if (rangeMeasurementOverride === true) {
result.distance = distanceValue; result.distance = distanceValue;
result.units = canvas.scene?.grid?.units; result.units = canvas.scene?.grid?.units;
return result return result;
} }
if (distanceValue <= settings.melee) { if (distanceValue <= settings.melee) {
result.distance = game.i18n.localize('DAGGERHEART.CONFIG.Range.melee.name'); result.distance = game.i18n.localize('DAGGERHEART.CONFIG.Range.melee.name');

View file

@ -23,14 +23,22 @@ export class DHActionDiceData extends foundry.abstract.DataModel {
multiplier: new fields.StringField({ multiplier: new fields.StringField({
choices: CONFIG.DH.GENERAL.multiplierTypes, choices: CONFIG.DH.GENERAL.multiplierTypes,
initial: 'prof', initial: 'prof',
label: "DAGGERHEART.ACTIONS.Config.damage.multiplier" label: 'DAGGERHEART.ACTIONS.Config.damage.multiplier'
}), }),
flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: "DAGGERHEART.ACTIONS.Config.damage.flatMultiplier" }), flatMultiplier: new fields.NumberField({
dice: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceTypes, initial: 'd6', label: "DAGGERHEART.GENERAL.Dice.single" }), nullable: true,
bonus: new fields.NumberField({ nullable: true, initial: null, label: "DAGGERHEART.GENERAL.bonus" }), initial: 1,
label: 'DAGGERHEART.ACTIONS.Config.damage.flatMultiplier'
}),
dice: new fields.StringField({
choices: CONFIG.DH.GENERAL.diceTypes,
initial: 'd6',
label: 'DAGGERHEART.GENERAL.Dice.single'
}),
bonus: new fields.NumberField({ nullable: true, initial: null, label: 'DAGGERHEART.GENERAL.bonus' }),
custom: new fields.SchemaField({ custom: new fields.SchemaField({
enabled: new fields.BooleanField({ label: "DAGGERHEART.ACTIONS.Config.general.customFormula" }), enabled: new fields.BooleanField({ label: 'DAGGERHEART.ACTIONS.Config.general.customFormula' }),
formula: new FormulaField({ label: "DAGGERHEART.ACTIONS.Config.general.formula", initial: '' }) formula: new FormulaField({ label: 'DAGGERHEART.ACTIONS.Config.general.formula', initial: '' })
}) })
}; };
} }

View file

@ -199,7 +199,7 @@ export default class DHWeapon extends AttachableItem {
]; ];
for (const { value, type } of attack.damage.parts) { for (const { value, type } of attack.damage.parts) {
const parts = value.custom.enabled ? [game.i18n.localize("DAGGERHEART.GENERAL.custom")] : [value.dice]; const parts = value.custom.enabled ? [game.i18n.localize('DAGGERHEART.GENERAL.custom')] : [value.dice];
if (!value.custom.enabled && value.bonus) parts.push(value.bonus.signedString()); if (!value.custom.enabled && value.bonus) parts.push(value.bonus.signedString());
if (type.size > 0) { if (type.size > 0) {

View file

@ -35,7 +35,7 @@
gap: 4px; gap: 4px;
.activity-marker { .activity-marker {
font-size: .5rem; font-size: 0.5rem;
flex: none; flex: none;
color: light-dark(@dark-blue, @golden); color: light-dark(@dark-blue, @golden);
margin-right: 4px; margin-right: 4px;

View file

@ -1,144 +1,144 @@
@import '../../utils/colors.less'; @import '../../utils/colors.less';
@import '../../utils/fonts.less'; @import '../../utils/fonts.less';
@import '../../utils/spacing.less'; @import '../../utils/spacing.less';
.theme-light { #interface.theme-light {
.daggerheart.chat.domain-card { .daggerheart.chat.domain-card {
.domain-card-move .domain-card-header { .domain-card-move .domain-card-header {
border-bottom: 1px solid @dark-blue; border-bottom: 1px solid @dark-blue;
&:hover { &:hover {
background: @dark-blue-10; background: @dark-blue-10;
} }
.domain-label { .domain-label {
.title { .title {
color: @dark-blue; color: @dark-blue;
} }
.tags .tag { .tags .tag {
background: @dark-15; background: @dark-15;
border: 1px solid @dark; border: 1px solid @dark;
color: @dark; color: @dark;
} }
} }
.fa-chevron-down { .fa-chevron-down {
color: @dark-blue; color: @dark-blue;
} }
} }
.description { .description {
color: @dark; color: @dark;
} }
} }
} }
.daggerheart.chat { .daggerheart.chat {
&.domain-card { &.domain-card {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.card-img { .card-img {
width: 100%; width: 100%;
height: 200px; height: 200px;
mask-image: linear-gradient(0deg, transparent 0%, black 10%, black 90%, transparent 100%); mask-image: linear-gradient(0deg, transparent 0%, black 10%, black 90%, transparent 100%);
object-fit: cover; object-fit: cover;
} }
details[open] { details[open] {
.fa-chevron-down { .fa-chevron-down {
transform: rotate(180deg); transform: rotate(180deg);
transition: all 0.3s ease; transition: all 0.3s ease;
} }
} }
.domain-card-move { .domain-card-move {
width: 100%; width: 100%;
.fa-chevron-down { .fa-chevron-down {
transition: all 0.3s ease; transition: all 0.3s ease;
margin-left: auto; margin-left: auto;
} }
.domain-card-header { .domain-card-header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin: 8px; margin: 8px;
padding-bottom: 5px; padding-bottom: 5px;
width: -webkit-fill-available; width: -webkit-fill-available;
gap: 5px; gap: 5px;
border-bottom: 1px solid @golden; border-bottom: 1px solid @golden;
&:hover { &:hover {
background: @golden-10; background: @golden-10;
cursor: pointer; cursor: pointer;
transition: all 0.3s ease; transition: all 0.3s ease;
} }
.domain-label { .domain-label {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
padding-bottom: 5px; padding-bottom: 5px;
width: -webkit-fill-available; width: -webkit-fill-available;
gap: 5px; gap: 5px;
.title { .title {
font-size: var(--font-size-20); font-size: var(--font-size-20);
color: @golden; color: @golden;
font-weight: 700; font-weight: 700;
} }
.tags { .tags {
display: flex; display: flex;
gap: 10px; gap: 10px;
flex-wrap: wrap; flex-wrap: wrap;
.tag { .tag {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 3px 5px; padding: 3px 5px;
font-size: var(--font-size-12); font-size: var(--font-size-12);
background: @beige-15; background: @beige-15;
border: 1px solid @beige; border: 1px solid @beige;
color: @beige; color: @beige;
border-radius: 3px; border-radius: 3px;
} }
} }
} }
} }
} }
.description { .description {
padding: 8px; padding: 8px;
} }
.ability-card-footer { .ability-card-footer {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 5px; gap: 5px;
width: 100%; width: 100%;
padding: 0 8px; padding: 0 8px;
button { button {
height: 40px; height: 40px;
flex: 1 1 calc(50% - 5px); flex: 1 1 calc(50% - 5px);
&:nth-last-child(1):nth-child(odd) { &:nth-last-child(1):nth-child(odd) {
flex-basis: 100%; flex-basis: 100%;
} }
} }
.ability-card-action-cost { .ability-card-action-cost {
margin: auto; margin: auto;
font-size: 1.5em; font-size: 1.5em;
} }
} }
} }
} }

View file

@ -1,124 +1,125 @@
@import '../../utils/colors.less'; @import '../../utils/colors.less';
@import '../../utils/fonts.less'; @import '../../utils/fonts.less';
@import '../../utils/spacing.less'; @import '../../utils/spacing.less';
.theme-light { #interface.theme-light {
.daggerheart.chat.action { .daggerheart.chat.action {
.action-move .action-section { .action-move .action-section {
border-bottom: 1px solid @dark-blue; border-bottom: 1px solid @dark-blue;
&:hover { &:hover {
background: @dark-blue-10; background: @dark-blue-10;
} }
.action-header { .action-header {
.title { .title {
color: @dark-blue; color: @dark-blue;
} }
.label { .label {
color: @dark; color: @dark;
} }
} }
.fa-chevron-down { .fa-chevron-down {
color: @dark-blue; color: @dark-blue;
} }
} }
.description { .description {
color: @dark; color: @dark;
} }
} }
} }
.daggerheart.chat { .daggerheart.chat {
&.action { &.action {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
details[open] { details[open] {
.fa-chevron-down { .fa-chevron-down {
transform: rotate(180deg); transform: rotate(180deg);
transition: all 0.3s ease; transition: all 0.3s ease;
} }
} }
.action-move { .action-move {
width: 100%; width: 100%;
.fa-chevron-down { .fa-chevron-down {
transition: all 0.3s ease; transition: all 0.3s ease;
margin-left: auto; margin-left: auto;
} }
.action-section { .action-section {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin: 8px 8px 0; margin: 8px 8px 0;
padding-bottom: 5px; padding-bottom: 5px;
width: -webkit-fill-available; width: -webkit-fill-available;
gap: 5px; gap: 5px;
border-bottom: 1px solid @golden; border-bottom: 1px solid @golden;
&:hover { &:hover {
background: @golden-10; background: @golden-10;
cursor: pointer; cursor: pointer;
transition: all 0.3s ease; transition: all 0.3s ease;
} }
.action-img { .action-img {
width: 40px; width: 40px;
height: 40px; height: 40px;
border-radius: 3px; border-radius: 3px;
object-fit: cover; object-fit: cover;
} }
.action-header { .action-header {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 5px; gap: 5px;
color: @beige;
.title {
font-size: var(--font-size-20); .title {
color: @golden; font-size: var(--font-size-20);
font-weight: 700; color: @golden;
} font-weight: 700;
}
.label {
font-size: var(--font-size-12); .label {
color: @beige; font-size: var(--font-size-12);
margin: 0; color: @beige;
} margin: 0;
} }
} }
} }
}
.description {
padding: 8px; .description {
} padding: 8px;
}
.ability-card-footer {
display: flex; .ability-card-footer {
flex-wrap: wrap; display: flex;
gap: 5px; flex-wrap: wrap;
width: 100%; gap: 5px;
padding: 0 8px; width: 100%;
padding: 0 8px;
button {
height: 40px; button {
flex: 1 1 calc(50% - 5px); height: 40px;
flex: 1 1 calc(50% - 5px);
&:nth-last-child(1):nth-child(odd) {
flex-basis: 100%; &:nth-last-child(1):nth-child(odd) {
} flex-basis: 100%;
} }
}
.ability-card-action-cost {
margin: auto; .ability-card-action-cost {
font-size: 1.5em; margin: auto;
} font-size: 1.5em;
} }
} }
} }
}

View file

@ -2,52 +2,137 @@
@import '../../utils/fonts.less'; @import '../../utils/fonts.less';
@import '../../utils/spacing.less'; @import '../../utils/spacing.less';
.theme-light { #interface.theme-light {
.daggerheart, .daggerheart.chat-sidebar .chat-log,
#chat-notifications { #chat-notifications .chat-log {
--text-color: @dark-blue; --text-color: @dark-blue;
--bg-color: @dark-blue-40; --bg-color: @dark-blue-40;
.message-content .chat-roll { .chat-message {
.roll-part-header { .roll-formula {
span, background: @dark-15;
span:before, color: @dark;
span:after { }
color: @dark-blue;
} &.duality {
&:before { background-image: url(../assets/parchments/dh-parchment-dark.png);
background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, @dark-blue 100%);
color: @dark-blue; .message-content {
color: @beige;
} }
&:after { .roll-formula {
background: linear-gradient(90deg, @dark-blue 0%, rgba(0, 0, 0, 0) 100%); background: @dark-15;
color: @dark-blue; color: @dark;
}
.message-header {
.message-sub-header-container {
color: @beige;
h4 {
color: @golden;
}
}
.message-header-metadata {
.message-metadata {
color: @beige;
}
}
}
&.hope {
--text-color: @golden;
--bg-color: @golden-40;
.message-header,
.message-content {
background-color: @golden-bg;
}
.roll-formula {
background: var(--bg-color);
color: var(--text-color);
}
}
&.fear {
--text-color: @chat-blue;
--bg-color: @chat-blue-40;
.message-header,
.message-content {
background-color: @chat-blue-bg;
}
.roll-formula {
background: var(--bg-color);
color: var(--text-color);
}
}
&.critical {
--text-color: @chat-purple;
--bg-color: @chat-purple-40;
.message-header,
.message-content {
background-color: @chat-purple-bg;
}
.roll-formula {
background: var(--bg-color);
color: var(--text-color);
}
} }
} }
.roll-section {
.roll-part-content { &:not(.duality) {
.roll-result-value { .font-20 {
color: @dark;
}
.roll-die {
color: @beige;
}
fieldset {
color: @dark-blue;
border-color: @dark-blue;
legend {
color: @dark-blue; color: @dark-blue;
} }
}
.chat-roll {
.roll-part-header {
color: @dark-blue;
.dice-tooltip .wrapper .roll-die { span::before,
color: @beige; span::after {
color: @dark-blue;
}
&:before {
background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, @dark-blue 100%);
}
&:after {
background: linear-gradient(90deg, @dark-blue 0%, rgba(0, 0, 0, 0) 100%);
}
}
.roll-part-content {
&.dice-result {
color: @dark;
}
.roll-result-container {
color: @dark-blue;
}
} }
} }
} }
} }
.chat-message .roll-formula {
background: @dark-15;
color: @dark;
}
} }
} }
.daggerheart.chat { .daggerheart.chat {
&.resource-roll { &.resource-roll {
.reroll-message { .reroll-message {
color: @beige;
text-align: center; text-align: center;
font-size: var(--font-size-18); font-size: var(--font-size-18);
margin-bottom: 0; margin-bottom: 0;

View file

@ -1,110 +1,110 @@
@import '../../utils/colors.less'; @import '../../utils/colors.less';
@import '../../utils/fonts.less'; @import '../../utils/fonts.less';
@import '../../utils/spacing.less'; @import '../../utils/spacing.less';
.theme-light { #interface.theme-light {
.daggerheart.chat.downtime { .daggerheart.chat.downtime {
.downtime-moves-list .downtime-move { .downtime-moves-list .downtime-move {
&:hover { &:hover {
background: @dark-blue-10; background: @dark-blue-10;
} }
.downtime-label { .downtime-label {
border-bottom: 1px solid @dark-blue; border-bottom: 1px solid @dark-blue;
.header-label .title { .header-label .title {
color: @dark-blue; color: @dark-blue;
} }
.header-label .label { .header-label .label {
color: @dark; color: @dark;
} }
} }
.fa-chevron-down { .fa-chevron-down {
color: @dark-blue; color: @dark-blue;
} }
} }
.description { .description {
color: @dark; color: @dark;
} }
} }
} }
.daggerheart.chat { .daggerheart.chat {
&.downtime { &.downtime {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
details[open] { details[open] {
.fa-chevron-down { .fa-chevron-down {
transform: rotate(180deg); transform: rotate(180deg);
transition: all 0.3s ease; transition: all 0.3s ease;
} }
} }
.downtime-moves-list { .downtime-moves-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 5px; gap: 5px;
width: 100%; width: 100%;
.fa-chevron-down { .fa-chevron-down {
transition: all 0.3s ease; transition: all 0.3s ease;
margin-left: auto; margin-left: auto;
} }
.downtime-move { .downtime-move {
width: 100%; width: 100%;
.downtime-label { .downtime-label {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 5px; gap: 5px;
border-bottom: 1px solid @golden; border-bottom: 1px solid @golden;
margin: 0 8px; margin: 0 8px;
padding-bottom: 5px; padding-bottom: 5px;
width: -webkit-fill-available; width: -webkit-fill-available;
&:hover { &:hover {
background: light-dark(@dark-blue-10, @golden-10); background: light-dark(@dark-blue-10, @golden-10);
cursor: pointer; cursor: pointer;
transition: all 0.3s ease; transition: all 0.3s ease;
} }
.downtime-image { .downtime-image {
width: 40px; width: 40px;
height: 40px; height: 40px;
border-radius: 3px; border-radius: 3px;
} }
.header-label { .header-label {
padding: 8px; padding: 8px;
.title { .title {
font-size: var(--font-size-16); font-size: var(--font-size-16);
color: @golden; color: @golden;
font-weight: 700; font-weight: 700;
} }
.label { .label {
font-size: var(--font-size-12); font-size: var(--font-size-12);
color: @beige; color: @beige;
margin: 0; margin: 0;
} }
} }
} }
.description { .description {
padding: 8px; padding: 8px;
} }
} }
.action-use-button { .action-use-button {
width: -webkit-fill-available; width: -webkit-fill-available;
margin: 0 8px; margin: 0 8px;
font-weight: 600; font-weight: 600;
height: 40px; height: 40px;
} }
} }
} }
} }

View file

@ -1,8 +1,8 @@
@import '../../utils/colors.less'; @import '../../utils/colors.less';
@import '../../utils/fonts.less'; @import '../../utils/fonts.less';
.theme-light { #interface.theme-light {
.chat-message .message-content { .chat-message:not(.duality) .message-content {
color: @dark; color: @dark;
blockquote { blockquote {
@ -58,6 +58,12 @@
font-family: @font-body; font-family: @font-body;
font-weight: bold; font-weight: bold;
} }
.dice-roll .dice-formula,
.dice-roll .dice-total {
background: @dark-blue-40;
color: @dark-blue;
}
} }
} }
@ -158,8 +164,8 @@
.dice-roll .dice-total { .dice-roll .dice-total {
box-shadow: none; box-shadow: none;
border: none; border: none;
background: light-dark(@dark-blue-40, @golden-40); background: @golden-10;
color: light-dark(@dark-blue, @golden); color: @golden;
font-weight: 600; font-weight: 600;
align-content: center; align-content: center;
} }

View file

@ -1,3 +1,3 @@
<div class="daggerheart chat resource-roll"> <ul class="daggerheart chat resource-roll">
<h5 class="reroll-message">{{localize "DAGGERHEART.UI.Chat.resourceRoll.playerMessage" user=user name=name }}</h5> <li class="reroll-message">{{localize "DAGGERHEART.UI.Chat.resourceRoll.playerMessage" user=user name=name }}</li>
</div> </ul>