mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-16 13:41:07 +01:00
Fix chat log theme to inherit interface theme (#1544)
This commit is contained in:
parent
d94eb9dcbd
commit
4cd6fe58da
10 changed files with 33 additions and 16 deletions
|
|
@ -92,6 +92,19 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
||||||
super.close(options);
|
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) {
|
async onRollSimple(event, message) {
|
||||||
const buttonType = event.target.dataset.type ?? 'damage',
|
const buttonType = event.target.dataset.type ?? 'damage',
|
||||||
total = message.rolls.reduce((a, c) => a + Roll.fromJSON(c).total, 0),
|
total = message.rolls.reduce((a, c) => a + Roll.fromJSON(c).total, 0),
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,18 @@
|
||||||
@import '../utils/fonts.less';
|
@import '../utils/fonts.less';
|
||||||
@import '../utils/mixin.less';
|
@import '../utils/mixin.less';
|
||||||
|
|
||||||
.theme-light {
|
.daggerheart.chat-sidebar.theme-light,
|
||||||
.daggerheart.chat-sidebar .chat-log,
|
#interface.theme-light {
|
||||||
#chat-notifications .chat-log {
|
.chat-log .chat-message {
|
||||||
.chat-message {
|
background-image: url('../assets/parchments/dh-parchment-light.png');
|
||||||
background-image: url('../assets/parchments/dh-parchment-light.png');
|
|
||||||
|
|
||||||
.message-header .message-header-metadata .message-metadata,
|
.message-header .message-header-metadata .message-metadata,
|
||||||
.message-header .message-header-main .message-sub-header-container {
|
.message-header .message-header-main .message-sub-header-container {
|
||||||
color: @dark;
|
color: @dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-header .message-header-main .message-sub-header-container h4 {
|
.message-header .message-header-main .message-sub-header-container h4 {
|
||||||
color: @dark-blue;
|
color: @dark-blue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
@import '../../utils/fonts.less';
|
@import '../../utils/fonts.less';
|
||||||
@import '../../utils/spacing.less';
|
@import '../../utils/spacing.less';
|
||||||
|
|
||||||
|
.daggerheart.chat-sidebar.theme-light,
|
||||||
#interface.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 {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
@import '../../utils/fonts.less';
|
@import '../../utils/fonts.less';
|
||||||
@import '../../utils/spacing.less';
|
@import '../../utils/spacing.less';
|
||||||
|
|
||||||
|
.daggerheart.chat-sidebar.theme-light,
|
||||||
#interface.theme-light {
|
#interface.theme-light {
|
||||||
.daggerheart.chat.action {
|
.daggerheart.chat.action {
|
||||||
.action-move .action-section {
|
.action-move .action-section {
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
@import '../../utils/fonts.less';
|
@import '../../utils/fonts.less';
|
||||||
@import '../../utils/spacing.less';
|
@import '../../utils/spacing.less';
|
||||||
|
|
||||||
|
.daggerheart.chat-sidebar.theme-light,
|
||||||
#interface.theme-light {
|
#interface.theme-light {
|
||||||
.daggerheart.chat-sidebar .chat-log,
|
.chat-log {
|
||||||
#chat-notifications .chat-log {
|
|
||||||
--text-color: @dark-blue;
|
--text-color: @dark-blue;
|
||||||
--bg-color: @dark-blue-40;
|
--bg-color: @dark-blue-40;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
@import '../../utils/colors.less';
|
@import '../../utils/colors.less';
|
||||||
|
|
||||||
|
.daggerheart.chat-sidebar.theme-light,
|
||||||
#interface.theme-light {
|
#interface.theme-light {
|
||||||
.daggerheart.chat.damage-summary .token-target-container {
|
.daggerheart.chat.damage-summary .token-target-container {
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
@import '../../utils/fonts.less';
|
@import '../../utils/fonts.less';
|
||||||
@import '../../utils/spacing.less';
|
@import '../../utils/spacing.less';
|
||||||
|
|
||||||
|
.daggerheart.chat-sidebar.theme-light,
|
||||||
#interface.theme-light {
|
#interface.theme-light {
|
||||||
.daggerheart.chat.downtime {
|
.daggerheart.chat.downtime {
|
||||||
.downtime-moves-list .downtime-move {
|
.downtime-moves-list .downtime-move {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
@import '../../utils/colors.less';
|
@import '../../utils/colors.less';
|
||||||
|
|
||||||
|
.daggerheart.chat-sidebar.theme-light,
|
||||||
#interface.theme-light {
|
#interface.theme-light {
|
||||||
.daggerheart.chat.effect-summary {
|
.daggerheart.chat.effect-summary {
|
||||||
.effect-header,
|
.effect-header,
|
||||||
|
|
|
||||||
|
|
@ -125,9 +125,9 @@
|
||||||
|
|
||||||
.group-roll-trait {
|
.group-roll-trait {
|
||||||
padding: 2px 8px;
|
padding: 2px 8px;
|
||||||
border: 1px solid light-dark(white, white);
|
border: 1px solid light-dark(@dark-blue, white);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
color: light-dark(white, white);
|
color: light-dark(@dark-blue, white);
|
||||||
background: light-dark(@beige-80, @beige-80);
|
background: light-dark(@beige-80, @beige-80);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
@import '../../utils/colors.less';
|
@import '../../utils/colors.less';
|
||||||
@import '../../utils/fonts.less';
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.daggerheart.chat-sidebar.theme-light,
|
||||||
#interface.theme-light {
|
#interface.theme-light {
|
||||||
.chat-message:not(.duality) .message-content {
|
.chat-message:not(.duality) .message-content {
|
||||||
color: @dark;
|
color: @dark;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue