diff --git a/browser/finder/index.js b/browser/finder/index.js index ace7bae1..921abf1d 100644 --- a/browser/finder/index.js +++ b/browser/finder/index.js @@ -14,6 +14,12 @@ 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') +} + require('../styles/finder/index.styl') const FOLDER_FILTER = 'FOLDER_FILTER' @@ -58,6 +64,12 @@ class FinderMain extends React.Component { let { activeArticle } = this.props clipboard.writeText(activeArticle.content) activityRecord.emit('FINDER_COPY') + + notifier.notify({ + icon: getIconPath(), + 'title': 'Saved to Clipboard!', + 'message': 'Paste it wherever you want!' + }) hideFinder() } diff --git a/webpack.config.js b/webpack.config.js index b9492ffb..ce7cdf5d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -68,7 +68,8 @@ var config = { 'superagent-promise', 'lodash', 'markdown-it', - 'moment' + 'moment', + 'node-notifier' ] } diff --git a/webpack.config.production.js b/webpack.config.production.js index 737e0d13..8eda4cc5 100644 --- a/webpack.config.production.js +++ b/webpack.config.production.js @@ -45,7 +45,8 @@ module.exports = { 'superagent-promise', 'lodash', 'markdown-it', - 'moment' + 'moment', + 'node-notifier' ], resolve: { extensions: ['', '.js', '.jsx', 'styl']