1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

cleanup notification code

This commit is contained in:
Rokt33r
2015-11-21 22:07:59 +09:00
parent 3b34698e8b
commit 7d9894bef7

View File

@@ -14,10 +14,8 @@ import remote from 'remote'
var hideFinder = remote.getGlobal('hideFinder')
import clipboard from 'clipboard'
var notifier = require('node-notifier')
var path = require('path')
function getIconPath () {
return path.resolve(global.__dirname, '../../resources/favicon-230x230.png')
function notify (...args) {
return new window.Notification(...args)
}
require('../styles/finder/index.styl')
@@ -66,10 +64,8 @@ class FinderMain extends React.Component {
clipboard.writeText(activeArticle.content)
activityRecord.emit('FINDER_COPY')
notifier.notify({
icon: getIconPath(),
'title': 'Saved to Clipboard!',
'message': 'Paste it wherever you want!'
notify('Saved to Clipboard!', {
body: 'Paste it wherever you want!'
})
hideFinder()
}