├── index.js ├── assets └── screenshot.png ├── lib ├── assets │ ├── electron.png │ ├── notification.html │ └── notification.css ├── app.js ├── behaviors │ ├── swipeRightBehavior.js │ └── clickBehavior.js ├── notification.js ├── notificationView.js └── notifier.js ├── .gitignore ├── playbook ├── main.js ├── assets │ ├── run.css │ ├── run.js │ └── vendor │ │ ├── codemirror.css │ │ └── codemirror-js.js └── playbook.html ├── package.json ├── LICENSE └── readme.md /index.js: -------------------------------------------------------------------------------- 1 | const Notifier = require('./lib/notifier') 2 | 3 | module.exports = new Notifier() 4 | -------------------------------------------------------------------------------- /assets/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayleedev/electron-notifications/HEAD/assets/screenshot.png -------------------------------------------------------------------------------- /lib/assets/electron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayleedev/electron-notifications/HEAD/lib/assets/electron.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log 3 | .DS_Store 4 | Thumbs.db 5 | *.autogenerated 6 | /build/ 7 | /releases/ 8 | /tmp/ 9 | .settings 10 | .project 11 | -------------------------------------------------------------------------------- /lib/app.js: -------------------------------------------------------------------------------- 1 | const Notification = require('../notification') 2 | 3 | const { ipcRenderer } = require('electron') 4 | 5 | ipcRenderer.on('setup', (event, title, options) => { 6 | new Notification(title, options) 7 | }) 8 | -------------------------------------------------------------------------------- /playbook/main.js: -------------------------------------------------------------------------------- 1 | const { app, BrowserWindow } = require('electron') 2 | 3 | let mainWindow = null 4 | 5 | app.on('ready', () => { 6 | mainWindow = new BrowserWindow({width: 800, height: 600}) 7 | mainWindow.loadURL('file://' + __dirname + '/playbook.html') 8 | mainWindow.on('closed', () => { 9 | mainWindow = null 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /playbook/assets/run.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #eeeeee; 3 | font-size: 15px; 4 | font-family: 'Lora', serif; 5 | } 6 | 7 | h2 { 8 | font-family: 'Istok Web', sans-serif; 9 | } 10 | 11 | .sample { 12 | display: flex; 13 | padding: 20px 0; 14 | } 15 | 16 | .sample div.talk { 17 | flex: 1; 18 | } 19 | 20 | .sample div.code { 21 | flex: 2; 22 | height: 200px; 23 | padding: 15px; 24 | } 25 | 26 | .CodeMirror { 27 | height: 200px; 28 | font-size: 14px; 29 | } 30 | 31 | #stack-num { 32 | width : 50px; 33 | } 34 | 35 | #stack-delay { 36 | width : 50px; 37 | } -------------------------------------------------------------------------------- /lib/assets/notification.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |The minimum requirements.
14 | 15 |Shows you the full array of options you can use.
27 | 28 |Shows you the full array of options you can use with stacking
45 |{i} will be replaced with the count
46 | # of notifications 47 |If you prefer to use the vertical buttons style.
68 | 69 |Click on the notifiation to see the alert.
86 | 87 |Swipe the notification right to trigger the alert.
105 | 106 |Click a button to see the action
124 | 125 |