mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
const crusade
This commit is contained in:
parent
876c360922
commit
ed43d7e0a8
@ -1,7 +1,7 @@
|
||||
// Copyright 2024, Command Line Inc.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
let { contextBridge, ipcRenderer } = require("electron");
|
||||
const { contextBridge, ipcRenderer } = require("electron");
|
||||
|
||||
contextBridge.exposeInMainWorld("api", {
|
||||
getPlatform: () => ipcRenderer.sendSync("getPlatform"),
|
||||
|
@ -12,16 +12,16 @@ class ContextMenuModelType {
|
||||
}
|
||||
|
||||
handleContextMenuClick(id: string): void {
|
||||
let handler = this.handlers.get(id);
|
||||
const handler = this.handlers.get(id);
|
||||
if (handler) {
|
||||
handler();
|
||||
}
|
||||
}
|
||||
|
||||
_convertAndRegisterMenu(menu: ContextMenuItem[]): ElectronContextMenuItem[] {
|
||||
let electronMenuItems: ElectronContextMenuItem[] = [];
|
||||
for (let item of menu) {
|
||||
let electronItem: ElectronContextMenuItem = {
|
||||
const electronMenuItems: ElectronContextMenuItem[] = [];
|
||||
for (const item of menu) {
|
||||
const electronItem: ElectronContextMenuItem = {
|
||||
role: item.role,
|
||||
type: item.type,
|
||||
label: item.label,
|
||||
|
Loading…
Reference in New Issue
Block a user