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),