feat: add global context menu with actions and integration

This commit is contained in:
Will Miao
2025-09-23 11:19:36 +08:00
parent b91f06405d
commit d477050239
5 changed files with 78 additions and 21 deletions

View File

@@ -0,0 +1,24 @@
import { BaseContextMenu } from './BaseContextMenu.js';
export class GlobalContextMenu extends BaseContextMenu {
constructor() {
super('globalContextMenu');
}
showMenu(x, y) {
super.showMenu(x, y, null);
}
handleMenuAction(action, menuItem) {
switch (action) {
case 'placeholder-one':
case 'placeholder-two':
case 'placeholder-three':
console.info(`Global context menu action triggered: ${action}`);
break;
default:
console.warn(`Unhandled global context menu action: ${action}`);
break;
}
}
}