mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
FinderからCopyした時、通知を出す
This commit is contained in:
@@ -14,6 +14,12 @@ 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')
|
||||||
|
var path = require('path')
|
||||||
|
function getIconPath () {
|
||||||
|
return path.resolve(global.__dirname, '../../resources/favicon-230x230.png')
|
||||||
|
}
|
||||||
|
|
||||||
require('../styles/finder/index.styl')
|
require('../styles/finder/index.styl')
|
||||||
|
|
||||||
const FOLDER_FILTER = 'FOLDER_FILTER'
|
const FOLDER_FILTER = 'FOLDER_FILTER'
|
||||||
@@ -58,6 +64,12 @@ class FinderMain extends React.Component {
|
|||||||
let { activeArticle } = this.props
|
let { activeArticle } = this.props
|
||||||
clipboard.writeText(activeArticle.content)
|
clipboard.writeText(activeArticle.content)
|
||||||
activityRecord.emit('FINDER_COPY')
|
activityRecord.emit('FINDER_COPY')
|
||||||
|
|
||||||
|
notifier.notify({
|
||||||
|
icon: getIconPath(),
|
||||||
|
'title': 'Saved to Clipboard!',
|
||||||
|
'message': 'Paste it wherever you want!'
|
||||||
|
})
|
||||||
hideFinder()
|
hideFinder()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ var config = {
|
|||||||
'superagent-promise',
|
'superagent-promise',
|
||||||
'lodash',
|
'lodash',
|
||||||
'markdown-it',
|
'markdown-it',
|
||||||
'moment'
|
'moment',
|
||||||
|
'node-notifier'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ module.exports = {
|
|||||||
'superagent-promise',
|
'superagent-promise',
|
||||||
'lodash',
|
'lodash',
|
||||||
'markdown-it',
|
'markdown-it',
|
||||||
'moment'
|
'moment',
|
||||||
|
'node-notifier'
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.js', '.jsx', 'styl']
|
extensions: ['', '.js', '.jsx', 'styl']
|
||||||
|
|||||||
Reference in New Issue
Block a user