Implement the image context menu functionality (closes #148)
This commit is contained in:
parent
af4f0f60a4
commit
002438398b
1 changed files with 9 additions and 4 deletions
|
|
@ -29,15 +29,20 @@ export class UntypedItemSheet extends GenericItemSheet {
|
|||
new GenericContextMenu(html, `.photo.panel`, [
|
||||
{
|
||||
name: `View Larger`,
|
||||
callback: (html) => {
|
||||
console.log(`.dungeon | View Larger`);
|
||||
callback: () => {
|
||||
(new ImagePopout(this.item.img)).render(true);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: `Change Photo`,
|
||||
condition: () => this.isEditable,
|
||||
callback: (html) => {
|
||||
console.log(`.dungeon | Change Photo`);
|
||||
callback: () => {
|
||||
const fp = new FilePicker({
|
||||
callback: (path) => {
|
||||
this.item.update({"img": path});
|
||||
},
|
||||
});
|
||||
fp.render(true);
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue