-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added notification * Updated readme, message * Removed node notifier * Added node-notifier dep * Added notifier module
- Loading branch information
Showing
47 changed files
with
2,810 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import {app, globalShortcut, ipcMain} from 'electron'; | ||
import fs from 'fs'; | ||
import menubar from 'menubar'; | ||
import notifier from '../../lib/text-logger-notifier'; | ||
import setting from '../setting.json'; | ||
import {store, read, remove} from './database'; | ||
|
||
|
@@ -10,13 +11,21 @@ const settingPath = `${dir}/app/setting.json`; | |
const mb = menubar({index: indexPath, height: 450}); | ||
|
||
function notifyDone(contents) { | ||
// TODO: impl | ||
console.log(contents); | ||
notifier.notify({ | ||
title: 'You just have scrapped text', | ||
message: contents.source, | ||
// icon: `${dir}/app/resources/app-icon-retina-white/[email protected]`, | ||
sound: true | ||
}); | ||
} | ||
|
||
function notifyErr(err) { | ||
// TODO: impl | ||
console.log(err); | ||
notifier.notify({ | ||
title: 'Fail to scrap text', | ||
message: err.message, | ||
icon: `${dir}/app/resources/app-icon-retina-white/[email protected]`, | ||
sound: true | ||
}); | ||
} | ||
|
||
function registerIPCListener() { | ||
|
Oops, something went wrong.