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

FinderからCopyした時、通知を出す

This commit is contained in:
Rokt33r
2015-11-15 01:39:40 +09:00
parent 3e980fd2d4
commit 46c6555f94
3 changed files with 16 additions and 2 deletions

View File

@@ -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()
}

View File

@@ -68,7 +68,8 @@ var config = {
'superagent-promise',
'lodash',
'markdown-it',
'moment'
'moment',
'node-notifier'
]
}

View File

@@ -45,7 +45,8 @@ module.exports = {
'superagent-promise',
'lodash',
'markdown-it',
'moment'
'moment',
'node-notifier'
],
resolve: {
extensions: ['', '.js', '.jsx', 'styl']