Refactor styling of sidebar resources (#2050)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run

This commit is contained in:
Carlos Fernandez 2026-07-01 07:39:16 -04:00 committed by GitHub
parent 70388dbd73
commit 1af86d87bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 767 additions and 1039 deletions

View file

@ -58,12 +58,13 @@ export default class AdversarySheet extends DHBaseActorSheet {
template: 'systems/daggerheart/templates/sheets/actors/adversary/features.hbs',
scrollable: ['.feature-section']
},
notes: {
template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs'
},
effects: {
template: 'systems/daggerheart/templates/sheets/actors/adversary/effects.hbs',
scrollable: ['.effects-sections']
},
notes: {
template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs',
scrollable: ['.editor-content']
}
};

View file

@ -1057,7 +1057,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
direction: 'DOWN'
});
html.querySelectorAll('.armor-slot').forEach(element => {
html.querySelectorAll('.armor .slot').forEach(element => {
element.addEventListener('click', CharacterSheet.armorSourcePipUpdate);
});
}
@ -1072,7 +1072,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
/** Update specific armor source */
static async armorSourcePipUpdate(event) {
const target = event.target.closest('.armor-slot');
const target = event.target.closest('.slot');
const { uuid, value } = target.dataset;
const document = await foundry.utils.fromUuid(uuid);
@ -1100,7 +1100,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
}
const container = target.closest('.slot-bar');
for (const armorSlot of container.querySelectorAll('.armor-slot i')) {
for (const armorSlot of container.querySelectorAll('.armor .slot i')) {
const index = Number.parseInt(armorSlot.dataset.index);
if (decreasing && index >= newCurrent) {
armorSlot.classList.remove('fa-shield');