Skip to content

Commit

Permalink
Webclient: Fix inspect action context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Dec 24, 2022
1 parent 34a28d3 commit 7f26e18
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions srcjs/stendhal/ui/dialog/ActionContextMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,13 @@ export class ActionContextMenu extends Component {
if (marauroa.me["adminlevel"] && marauroa.me["adminlevel"] >= 600) {
actions.push({
title: "(*) Inspect",
action: function(entity: object) {
console.log(entity);
action: function(entity: any) {
const action = {"type": "inspect"} as {[key: string]: string};
if (entity.hasOwnProperty("id")) {
action["target"] = "#" + entity["id"];
}

marauroa.clientFramework.sendAction(action);
}
});
actions.push({
Expand Down

0 comments on commit 7f26e18

Please sign in to comment.