Some work

This commit is contained in:
WBHarry 2025-08-01 04:24:25 +02:00
parent 9d025bf105
commit dc9c08911b
60 changed files with 3569 additions and 428 deletions

View file

@ -311,8 +311,12 @@ export default function DHApplicationMixin(Base) {
name: 'CONTROLS.CommonEdit',
icon: 'fa-solid fa-pen-to-square',
condition: target => {
const { dataset } = target.closest('[data-item-uuid]');
const doc = getDocFromElementSync(target);
return !doc || !doc.hasOwnProperty('systemPath') || doc.inCollection;
return (
(!dataset.noCompendiumEdit && !doc) ||
(doc && (!doc?.hasOwnProperty('systemPath') || doc?.inCollection))
);
},
callback: async target => (await getDocFromElement(target)).sheet.render({ force: true })
}