engine:activatePlugin

rdesktop^2
filip mertens 1 year ago
parent 05f5bad529
commit b8e344da37
  1. 4
      apps/1test/src/electron/engine.ts
  2. 2
      apps/1test/src/preload.ts
  3. 2
      apps/remixdesktop/src/engine.ts
  4. 2
      apps/remixdesktop/src/preload.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
}

@ -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 => {

@ -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)
})

@ -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)
}
})
Loading…
Cancel
Save