diff --git a/browser/components/MarkdownPreview.js b/browser/components/MarkdownPreview.js index fa945c3d..6ec2aceb 100644 --- a/browser/components/MarkdownPreview.js +++ b/browser/components/MarkdownPreview.js @@ -286,6 +286,10 @@ export default class MarkdownPreview extends React.Component { copyIcon.innerHTML = '' copyIcon.onclick = (e) => { copy(content) + this.notify('Saved to Clipboard!', { + body: 'Paste it wherever you want!', + silent: true + }) } el.parentNode.appendChild(copyIcon) el.innerHTML = '' @@ -362,6 +366,13 @@ export default class MarkdownPreview extends React.Component { e.stopPropagation() } + notify (title, options) { + if (global.process.platform === 'win32') { + options.icon = path.join('file://', global.__dirname, '../../resources/app.png') + } + return new window.Notification(title, options) + } + render () { let { className, style, tabIndex } = this.props return (