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