fix: plugin load

This commit is contained in:
JellyBrick
2023-11-11 19:23:17 +09:00
parent de0b228ae8
commit 1f96b6b44d
10 changed files with 69 additions and 99 deletions

View File

@ -49,7 +49,7 @@ export default builder.createMain(({ handle, send }) => {
if (target) target.click(undefined, BrowserWindow.fromWebContents(event.sender), event.sender);
});
handle('get-menu-by-id', (_, commandId: number) => {
handle('get-menu-by-id', (commandId: number) => {
const result = getMenuItemById(commandId);
return JSON.parse(JSON.stringify(
@ -67,7 +67,7 @@ export default builder.createMain(({ handle, send }) => {
handle('window-unmaximize', () => win.unmaximize());
win.on('unmaximize', () => send('window-unmaximize'));
handle('image-path-to-data-url', (_, imagePath: string) => {
handle('image-path-to-data-url', (imagePath: string) => {
const nativeImageIcon = nativeImage.createFromPath(imagePath);
return nativeImageIcon?.toDataURL();
});