Skip to content

Commit

Permalink
update deps, kleine veränderungen an main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hmt committed Jun 11, 2020
1 parent 98dcb08 commit 487090e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 28 deletions.
38 changes: 19 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"rollup-plugin-svelte": "^5.2.2"
},
"dependencies": {
"better-sqlite3": "^7.0.1",
"better-sqlite3": "^7.1.0",
"bulma": "^0.9.0",
"electron-store": "^5.2.0",
"electron-util": "^0.14.1",
"ley": "^0.5.0",
"papaparse": "^5.2.0",
"svelte": "^3.23.1"
"svelte": "^3.23.2"
}
}
10 changes: 3 additions & 7 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { app, BrowserWindow, ipcMain } from 'electron'
import { is } from 'electron-util'
import Store from 'electron-store'

app.allowRendererProcessReuse = true
const configFile = new Store({
defaults: {
windowBounds: {
Expand All @@ -24,7 +23,7 @@ function createWindow() {
useContentSize: true,
defaultEncoding: 'utf-8',
webPreferences: {
nodeIntegration: true,
nodeIntegration: true
},
title: `${app.name}`
// icon: join(__dirname, '../icons/icon.icns')
Expand All @@ -38,7 +37,7 @@ function createWindow() {
}))
if (is.development || process.argv.some(a => a === '--devtools')) mainWindow.openDevTools()

mainWindow.on('close', async e => {
mainWindow.on('close', e => {
if (!configData.close) {
e.preventDefault()
configFile.set('windowBounds.main', mainWindow.getBounds())
Expand All @@ -48,17 +47,14 @@ function createWindow() {
mainWindow.close()
}
})
mainWindow.on('closed', () => {
mainWindow = null
})
mainWindow.once('ready-to-show', async () => {
mainWindow.show()
})
}

app.on('ready', createWindow)
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') app.quit()
app.quit()
})
app.on('activate', function () {
if (mainWindow === null) createWindow()
Expand Down

0 comments on commit 487090e

Please sign in to comment.