mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
modify: fix some codes pointed by eslint
This commit is contained in:
@@ -1,13 +1,10 @@
|
|||||||
const electron = require('electron')
|
const electron = require('electron')
|
||||||
const app = electron.app
|
const app = electron.app
|
||||||
|
|
||||||
var finderWindow = null
|
|
||||||
|
|
||||||
app.on('ready', function () {
|
app.on('ready', function () {
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
app.dock.hide()
|
app.dock.hide()
|
||||||
}
|
}
|
||||||
finderWindow = require('./finder-window')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
module.exports = app
|
module.exports = app
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ const electron = require('electron')
|
|||||||
const app = electron.app
|
const app = electron.app
|
||||||
const Menu = electron.Menu
|
const Menu = electron.Menu
|
||||||
const ipc = electron.ipcMain
|
const ipc = electron.ipcMain
|
||||||
const autoUpdater = electron.autoUpdater
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const ChildProcess = require('child_process')
|
const ChildProcess = require('child_process')
|
||||||
const _ = require('lodash')
|
const _ = require('lodash')
|
||||||
@@ -11,9 +10,8 @@ const GhReleases = require('electron-gh-releases')
|
|||||||
var ipcServer = null
|
var ipcServer = null
|
||||||
|
|
||||||
var mainWindow = null
|
var mainWindow = null
|
||||||
var finderWindow = null
|
|
||||||
|
|
||||||
var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
|
var shouldQuit = app.makeSingleInstance(function (commandLine, workingDirectory) {
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
mainWindow.minimize()
|
mainWindow.minimize()
|
||||||
@@ -26,12 +24,8 @@ var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory)
|
|||||||
|
|
||||||
if (shouldQuit) {
|
if (shouldQuit) {
|
||||||
app.quit()
|
app.quit()
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var version = app.getVersion()
|
|
||||||
var versionText = (version == null || version.length === 0) ? 'DEV version' : 'v' + version
|
|
||||||
|
|
||||||
var isUpdateReady = false
|
var isUpdateReady = false
|
||||||
|
|
||||||
var ghReleasesOpts = {
|
var ghReleasesOpts = {
|
||||||
@@ -108,14 +102,9 @@ app.on('ready', function () {
|
|||||||
Menu.setApplicationMenu(menu)
|
Menu.setApplicationMenu(menu)
|
||||||
break
|
break
|
||||||
case 'win32':
|
case 'win32':
|
||||||
finderWindow = require('./finder-window')
|
|
||||||
mainWindow.setMenu(menu)
|
mainWindow.setMenu(menu)
|
||||||
break
|
break
|
||||||
case 'linux':
|
case 'linux':
|
||||||
// Finder is available on cinnamon only.
|
|
||||||
if (process.env.DESKTOP_SESSION === 'cinnamon') {
|
|
||||||
finderWindow = require('./finder-window')
|
|
||||||
}
|
|
||||||
Menu.setApplicationMenu(menu)
|
Menu.setApplicationMenu(menu)
|
||||||
mainWindow.setMenu(menu)
|
mainWindow.setMenu(menu)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user