This commit is contained in:
Eugene Pankov
2021-01-01 18:25:54 +01:00
parent bacb475896
commit c8c00a2c9b
12 changed files with 1080 additions and 2071 deletions

View File

@@ -1,6 +1,8 @@
import { app, ipcMain, Menu, Tray, shell, screen, globalShortcut, MenuItemConstructorOptions } from 'electron'
import * as promiseIpc from 'electron-promise-ipc'
import { loadConfig } from './config'
import { Window, WindowOptions } from './window'
import { pluginManager } from './pluginManager'
export class Application {
private tray: Tray
@@ -20,6 +22,14 @@ export class Application {
}
})
;(promiseIpc as any).on('plugin-manager:install', (path, name, version) => {
return pluginManager.install(path, name, version)
})
;(promiseIpc as any).on('plugin-manager:uninstall', (path, name) => {
return pluginManager.uninstall(path, name)
})
const configData = loadConfig()
if (process.platform === 'linux') {
app.commandLine.appendSwitch('no-sandbox')