mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
Refactor styling of sidebar resources (#2050)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
This commit is contained in:
parent
70388dbd73
commit
1af86d87bb
10 changed files with 767 additions and 1039 deletions
|
|
@ -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']
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue