initial commit

This commit is contained in:
2021-04-06 15:03:44 +02:00
commit 606832a141
21 changed files with 9238 additions and 0 deletions

33
src/back/index.ts Normal file
View File

@@ -0,0 +1,33 @@
import { app } from 'electron'
import logger from 'electron-log'
import TrayUtility from './tray'
import Settings from './settings'
import Banner from './banner'
export const DEV = !app.isPackaged
// Disable gpu
app.disableHardwareAcceleration()
app.commandLine.appendSwitch('disable-software-rasterizer')
logger.catchErrors({ showDialog: true })
logger.log('Starting')
app
.whenReady()
.then(() => {
logger.log('Initializing')
if (!DEV) app.dock.hide()
TrayUtility.init()
Settings.init()
Banner.init()
logger.log('Done')
})
.catch((e) => {
logger.error(e)
process.exit(1)
})
app.on('window-all-closed', () => {
// Prevent closing of the app
})