(e: React.MouseEvent)
| 435 | }, [widgets, checkModeNeeded]); |
| 436 | |
| 437 | const handleWidgetsBarContextMenu = (e: React.MouseEvent) => { |
| 438 | e.preventDefault(); |
| 439 | const menu: ContextMenuItem[] = [ |
| 440 | { |
| 441 | label: "Edit widgets.json", |
| 442 | click: () => { |
| 443 | fireAndForget(async () => { |
| 444 | const blockDef: BlockDef = { |
| 445 | meta: { |
| 446 | view: "waveconfig", |
| 447 | file: "widgets.json", |
| 448 | }, |
| 449 | }; |
| 450 | await env.createBlock(blockDef, false, true); |
| 451 | }); |
| 452 | }, |
| 453 | }, |
| 454 | ]; |
| 455 | env.showContextMenu(menu, e); |
| 456 | }; |
| 457 | |
| 458 | return ( |
| 459 | <> |
nothing calls this directly
no test coverage detected