1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

set Notification icon for Windows

This commit is contained in:
Dick Choi
2015-12-15 14:00:56 +09:00
parent 2a774a7bb6
commit 958469f526
2 changed files with 13 additions and 4 deletions

View File

@@ -13,14 +13,19 @@ import Tutorial from 'boost/components/modal/Tutorial'
import activityRecord from 'boost/activityRecord'
const electron = require('electron')
const ipc = electron.ipcRenderer
const path = require('path')
activityRecord.init()
window.addEventListener('online', function () {
ipc.send('check-update', 'check-update')
})
function notify (...args) {
return new window.Notification(...args)
function notify (title, options) {
if (process.platform === 'win32') {
options.icon = path.join('file://', global.__dirname, '../../resources/favicon-230x230.png')
}
console.log(options)
return new window.Notification(title, options)
}
ipc.on('notify', function (e, payload) {