1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-18 12:11:43 +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') var hideFinder = remote.getGlobal('hideFinder')
import clipboard from 'clipboard' import clipboard from 'clipboard'
var notifier = require('node-notifier') function notify (...args) {
var path = require('path') return new window.Notification(...args)
function getIconPath () {
return path.resolve(global.__dirname, '../../resources/favicon-230x230.png')
} }
require('../styles/finder/index.styl') require('../styles/finder/index.styl')
@@ -66,10 +64,8 @@ class FinderMain extends React.Component {
clipboard.writeText(activeArticle.content) clipboard.writeText(activeArticle.content)
activityRecord.emit('FINDER_COPY') activityRecord.emit('FINDER_COPY')
notifier.notify({ notify('Saved to Clipboard!', {
icon: getIconPath(), body: 'Paste it wherever you want!'
'title': 'Saved to Clipboard!',
'message': 'Paste it wherever you want!'
}) })
hideFinder() hideFinder()
} }