-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #293 from yoavain/master
Issue #193 - windows actions + Upgrades SnoreToast to v0.7.0
- Loading branch information
Showing
10 changed files
with
213 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const notifier = require('../index'); | ||
const path = require('path'); | ||
|
||
notifier.notify( | ||
{ | ||
message: 'Are you sure you want to continue?', | ||
icon: path.join(__dirname, 'coulson.jpg'), | ||
actions: ['OK', 'Cancel'] | ||
}, | ||
(err, data) => { | ||
// Will also wait until notification is closed. | ||
console.log('Waited'); | ||
console.log(JSON.stringify({ err, data }, null, '\t')); | ||
} | ||
); | ||
|
||
// Built-in actions: | ||
notifier.on('timeout', () => { | ||
console.log('Timed out!'); | ||
}); | ||
notifier.on('activate', () => { | ||
console.log('Clicked!'); | ||
}); | ||
notifier.on('dismissed', () => { | ||
console.log('Dismissed!'); | ||
}); | ||
|
||
// Buttons actions (lower-case): | ||
notifier.on('ok', () => { | ||
console.log('"Ok" was pressed'); | ||
}); | ||
notifier.on('cancel', () => { | ||
console.log('"Cancel" was pressed'); | ||
}); |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.