mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-07 08:41:10 +08:00
Updated: electron version->4 & webpack version -> 4
This commit is contained in:
@@ -7,9 +7,6 @@
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
// Set environment for development
|
||||
process.env.NODE_ENV = 'development'
|
||||
|
||||
// Install `electron-debug` with `devtron`
|
||||
require('electron-debug')({ showDevTools: false })
|
||||
|
||||
@@ -24,15 +21,4 @@ require('electron').app.on('ready', () => {
|
||||
})
|
||||
|
||||
// Require `main` process to boot app
|
||||
if (process.env.DEBUG_ENV === 'debug') {
|
||||
require('babel-core/register')({
|
||||
'presets': [
|
||||
['env', {
|
||||
'targets': {
|
||||
'node': true
|
||||
}
|
||||
}]
|
||||
]
|
||||
})
|
||||
}
|
||||
require('./index')
|
||||
require('./index')
|
||||
@@ -477,17 +477,17 @@ const shortKeyHash = {
|
||||
upload: uploadClipboardFiles
|
||||
}
|
||||
|
||||
const isSecondInstance = app.makeSingleInstance(() => {
|
||||
const gotTheLock = app.requestSingleInstanceLock()
|
||||
|
||||
if (!gotTheLock) {
|
||||
app.quit()
|
||||
} else {
|
||||
if (settingWindow) {
|
||||
if (settingWindow.isMinimized()) {
|
||||
settingWindow.restore()
|
||||
}
|
||||
settingWindow.focus()
|
||||
}
|
||||
})
|
||||
|
||||
if (isSecondInstance) {
|
||||
app.quit()
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
|
||||
Reference in New Issue
Block a user