engine:activatePlugin

rdesktop
filip mertens 1 year ago
parent 3b26898fb1
commit 6bb9beb950
  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(fsPlugin)
engine.register(gitPlugin) engine.register(gitPlugin)
ipcMain.handle('engine:activatePlugin', async (event, arg) => { ipcMain.handle('manager:activatePlugin', async (event, arg) => {
console.log('engine:activatePlugin', arg) console.log('manager:activatePlugin', arg)
if(await appManager.isActive(arg)){ if(await appManager.isActive(arg)){
return true return true
} }

@ -10,7 +10,7 @@ const exposedPLugins = ['fs', 'git']
contextBridge.exposeInMainWorld('electronAPI', { contextBridge.exposeInMainWorld('electronAPI', {
activatePlugin: (name: string) => { activatePlugin: (name: string) => {
return ipcRenderer.invoke('engine:activatePlugin', name) return ipcRenderer.invoke('manager:activatePlugin', name)
}, },
plugins: exposedPLugins.map(name => { plugins: exposedPLugins.map(name => {

@ -9,6 +9,6 @@ engine.register(appManager)
engine.register(plugin) engine.register(plugin)
//appManager.activatePlugin('fs') //appManager.activatePlugin('fs')
ipcMain.on('engine:activatePlugin', (event, arg) => { ipcMain.on('manager:activatePlugin', (event, arg) => {
appManager.activatePlugin(arg) appManager.activatePlugin(arg)
}) })

@ -7,6 +7,6 @@ console.log('preload.ts')
contextBridge.exposeInMainWorld('api', { contextBridge.exposeInMainWorld('api', {
activatePlugin: (name: string) => { activatePlugin: (name: string) => {
console.log('activatePlugin', name) console.log('activatePlugin', name)
ipcRenderer.send('engine:activatePlugin', name) ipcRenderer.send('manager:activatePlugin', name)
} }
}) })
Loading…
Cancel
Save