From 6bb9beb9508fbe35d2159f3a3872d6d8301a8061 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 1 Jun 2023 11:52:42 +0200 Subject: [PATCH] engine:activatePlugin --- apps/1test/src/electron/engine.ts | 4 ++-- apps/1test/src/preload.ts | 2 +- apps/remixdesktop/src/engine.ts | 2 +- apps/remixdesktop/src/preload.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/1test/src/electron/engine.ts b/apps/1test/src/electron/engine.ts index 9066462145..d71e22511f 100644 --- a/apps/1test/src/electron/engine.ts +++ b/apps/1test/src/electron/engine.ts @@ -12,8 +12,8 @@ engine.register(appManager) engine.register(fsPlugin) engine.register(gitPlugin) -ipcMain.handle('engine:activatePlugin', async (event, arg) => { - console.log('engine:activatePlugin', arg) +ipcMain.handle('manager:activatePlugin', async (event, arg) => { + console.log('manager:activatePlugin', arg) if(await appManager.isActive(arg)){ return true } diff --git a/apps/1test/src/preload.ts b/apps/1test/src/preload.ts index 1f578df3ea..6ca1555b34 100644 --- a/apps/1test/src/preload.ts +++ b/apps/1test/src/preload.ts @@ -10,7 +10,7 @@ const exposedPLugins = ['fs', 'git'] contextBridge.exposeInMainWorld('electronAPI', { activatePlugin: (name: string) => { - return ipcRenderer.invoke('engine:activatePlugin', name) + return ipcRenderer.invoke('manager:activatePlugin', name) }, plugins: exposedPLugins.map(name => { diff --git a/apps/remixdesktop/src/engine.ts b/apps/remixdesktop/src/engine.ts index 37d3d85780..964206ef94 100644 --- a/apps/remixdesktop/src/engine.ts +++ b/apps/remixdesktop/src/engine.ts @@ -9,6 +9,6 @@ engine.register(appManager) engine.register(plugin) //appManager.activatePlugin('fs') -ipcMain.on('engine:activatePlugin', (event, arg) => { +ipcMain.on('manager:activatePlugin', (event, arg) => { appManager.activatePlugin(arg) }) diff --git a/apps/remixdesktop/src/preload.ts b/apps/remixdesktop/src/preload.ts index 26b87ee785..7aa57351d0 100644 --- a/apps/remixdesktop/src/preload.ts +++ b/apps/remixdesktop/src/preload.ts @@ -7,6 +7,6 @@ console.log('preload.ts') contextBridge.exposeInMainWorld('api', { activatePlugin: (name: string) => { console.log('activatePlugin', name) - ipcRenderer.send('engine:activatePlugin', name) + ipcRenderer.send('manager:activatePlugin', name) } }) \ No newline at end of file