mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Merge master branch into this branch
This commit is contained in:
@@ -3,8 +3,9 @@ const app = electron.app
|
||||
const Menu = electron.Menu
|
||||
const ipc = electron.ipcMain
|
||||
const GhReleases = require('electron-gh-releases')
|
||||
const isDev = process.env.NODE_ENV !== 'production'
|
||||
const { isPackaged } = app
|
||||
// electron.crashReporter.start()
|
||||
|
||||
var ipcServer = null
|
||||
|
||||
var mainWindow = null
|
||||
@@ -36,7 +37,7 @@ const updater = new GhReleases(ghReleasesOpts)
|
||||
// Check for updates
|
||||
// `status` returns true if there is a new update available
|
||||
function checkUpdate () {
|
||||
if (isDev) { // Prevents app from attempting to update when in dev mode.
|
||||
if (!isPackaged) { // Prevents app from attempting to update when in dev mode.
|
||||
console.log('Updates are disabled in Development mode, see main-app.js')
|
||||
return true
|
||||
}
|
||||
@@ -99,12 +100,12 @@ app.on('ready', function () {
|
||||
|
||||
// Check update every day
|
||||
setInterval(function () {
|
||||
if (!isDev) checkUpdate()
|
||||
if (isPackaged) checkUpdate()
|
||||
}, 1000 * 60 * 60 * 24)
|
||||
|
||||
// Check update after 10 secs to prevent file locking of Windows
|
||||
setTimeout(() => {
|
||||
if (!isDev) checkUpdate()
|
||||
if (isPackaged) checkUpdate()
|
||||
|
||||
ipc.on('update-check', function (event, msg) {
|
||||
if (isUpdateReady) {
|
||||
|
||||
@@ -141,6 +141,13 @@ const file = {
|
||||
mainWindow.webContents.send('list:isMarkdownNote', 'export-html')
|
||||
mainWindow.webContents.send('export:save-html')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'PDF (.pdf)',
|
||||
click () {
|
||||
mainWindow.webContents.send('list:isMarkdownNote', 'export-pdf')
|
||||
mainWindow.webContents.send('export:save-pdf')
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
window._ = require('lodash')
|
||||
</script>
|
||||
|
||||
<script src="../node_modules/js-sequence-diagrams/fucknpm/sequence-diagram-min.js"></script>
|
||||
<script src="../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.js"></script>
|
||||
<script src="../node_modules/react/dist/react.min.js"></script>
|
||||
<script src="../node_modules/react-dom/dist/react-dom.min.js"></script>
|
||||
<script src="../node_modules/redux/dist/redux.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user