1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00
This commit is contained in:
Dick Choi
2016-08-14 01:34:32 +09:00
parent 6bb78d3216
commit 2cbe07b373
34 changed files with 1482 additions and 765 deletions

View File

@@ -10,18 +10,9 @@ import { syncHistoryWithStore } from 'react-router-redux'
const electron = require('electron')
const ipc = electron.ipcRenderer
const path = require('path')
const remote = electron.remote
if (process.env.NODE_ENV !== 'production') {
window.addEventListener('keydown', function (e) {
if (e.keyCode === 73 && e.metaKey && e.altKey) {
remote.getCurrentWindow().toggleDevTools()
}
})
}
activityRecord.init()
ipc.send('check-update', 'check-update')
window.addEventListener('online', function () {
ipc.send('check-update', 'check-update')
})
@@ -35,28 +26,6 @@ document.addEventListener('dragover', function (e) {
e.stopPropagation()
})
function notify (title, options) {
if (process.platform === 'win32') {
options.icon = path.join('file://', global.__dirname, '../../resources/app.png')
options.silent = false
}
console.log(options)
return new window.Notification(title, options)
}
ipc.on('notify', function (e, payload) {
notify(payload.title, {
body: payload.body
})
})
ipc.on('copy-finder', function () {
activityRecord.emit('FINDER_COPY')
})
ipc.on('open-finder', function () {
activityRecord.emit('FINDER_OPEN')
})
let el = document.getElementById('content')
const history = syncHistoryWithStore(hashHistory, store)