Fix chat log theme to inherit interface theme (#1544)

This commit is contained in:
Carlos Fernandez 2026-01-15 18:55:36 -05:00 committed by GitHub
parent d94eb9dcbd
commit 4cd6fe58da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 33 additions and 16 deletions

View file

@ -92,6 +92,19 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
super.close(options);
}
/** Ensure the chat theme inherits the interface theme */
_replaceHTML(result, content, options) {
const themedElement = result.log?.querySelector(".chat-log");
themedElement?.classList.remove("themed", "theme-light", "theme-dark");
super._replaceHTML(result, content, options);
}
/** Remove chat log theme from notifications area */
async _onFirstRender(result, content) {
await super._onFirstRender(result, content);
document.querySelector("#chat-notifications .chat-log")?.classList.remove("themed", "theme-light", "theme-dark")
}
async onRollSimple(event, message) {
const buttonType = event.target.dataset.type ?? 'damage',
total = message.rolls.reduce((a, c) => a + Roll.fromJSON(c).total, 0),

View file

@ -2,20 +2,18 @@
@import '../utils/fonts.less';
@import '../utils/mixin.less';
.theme-light {
.daggerheart.chat-sidebar .chat-log,
#chat-notifications .chat-log {
.chat-message {
background-image: url('../assets/parchments/dh-parchment-light.png');
.daggerheart.chat-sidebar.theme-light,
#interface.theme-light {
.chat-log .chat-message {
background-image: url('../assets/parchments/dh-parchment-light.png');
.message-header .message-header-metadata .message-metadata,
.message-header .message-header-main .message-sub-header-container {
color: @dark;
}
.message-header .message-header-metadata .message-metadata,
.message-header .message-header-main .message-sub-header-container {
color: @dark;
}
.message-header .message-header-main .message-sub-header-container h4 {
color: @dark-blue;
}
.message-header .message-header-main .message-sub-header-container h4 {
color: @dark-blue;
}
}
}

View file

@ -2,6 +2,7 @@
@import '../../utils/fonts.less';
@import '../../utils/spacing.less';
.daggerheart.chat-sidebar.theme-light,
#interface.theme-light {
.daggerheart.chat.domain-card {
.domain-card-move .domain-card-header {

View file

@ -2,6 +2,7 @@
@import '../../utils/fonts.less';
@import '../../utils/spacing.less';
.daggerheart.chat-sidebar.theme-light,
#interface.theme-light {
.daggerheart.chat.action {
.action-move .action-section {

View file

@ -2,9 +2,9 @@
@import '../../utils/fonts.less';
@import '../../utils/spacing.less';
.daggerheart.chat-sidebar.theme-light,
#interface.theme-light {
.daggerheart.chat-sidebar .chat-log,
#chat-notifications .chat-log {
.chat-log {
--text-color: @dark-blue;
--bg-color: @dark-blue-40;

View file

@ -1,5 +1,6 @@
@import '../../utils/colors.less';
.daggerheart.chat-sidebar.theme-light,
#interface.theme-light {
.daggerheart.chat.damage-summary .token-target-container {
&:hover {

View file

@ -2,6 +2,7 @@
@import '../../utils/fonts.less';
@import '../../utils/spacing.less';
.daggerheart.chat-sidebar.theme-light,
#interface.theme-light {
.daggerheart.chat.downtime {
.downtime-moves-list .downtime-move {

View file

@ -1,5 +1,6 @@
@import '../../utils/colors.less';
.daggerheart.chat-sidebar.theme-light,
#interface.theme-light {
.daggerheart.chat.effect-summary {
.effect-header,

View file

@ -125,9 +125,9 @@
.group-roll-trait {
padding: 2px 8px;
border: 1px solid light-dark(white, white);
border: 1px solid light-dark(@dark-blue, white);
border-radius: 6px;
color: light-dark(white, white);
color: light-dark(@dark-blue, white);
background: light-dark(@beige-80, @beige-80);
}
}

View file

@ -1,6 +1,7 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.daggerheart.chat-sidebar.theme-light,
#interface.theme-light {
.chat-message:not(.duality) .message-content {
color: @dark;