Move the context menu above the readonly shortcut to make it possible to view the image without needing edit mode

This commit is contained in:
Oliver-Akins 2024-03-31 00:22:14 -06:00
parent 5a0484190e
commit fc065a5234

View file

@ -26,9 +26,6 @@ export class UntypedItemSheet extends GenericItemSheet {
activateListeners(html) { activateListeners(html) {
super.activateListeners(html); super.activateListeners(html);
if (!this.isEditable) return;
console.debug(`.dungeon | Adding event listeners for Untyped Item: ${this.item.id}`);
new GenericContextMenu(html, `.photo.panel`, [ new GenericContextMenu(html, `.photo.panel`, [
{ {
name: `View Larger`, name: `View Larger`,
@ -38,11 +35,15 @@ export class UntypedItemSheet extends GenericItemSheet {
}, },
{ {
name: `Change Photo`, name: `Change Photo`,
condition: () => this.isEditable,
callback: (html) => { callback: (html) => {
console.log(`.dungeon | Change Photo`); console.log(`.dungeon | Change Photo`);
}, },
}, },
]); ]);
if (!this.isEditable) return;
console.debug(`.dungeon | Adding event listeners for Untyped Item: ${this.item.id}`);
}; };
async getData() { async getData() {