diff --git a/browser/finder/index.js b/browser/finder/index.js index 596ccd31..72220619 100644 --- a/browser/finder/index.js +++ b/browser/finder/index.js @@ -12,13 +12,17 @@ import dataStore from 'boost/dataStore' const electron = require('electron') const { remote, clipboard, ipcRenderer } = electron +const path = require('path') function hideFinder () { ipcRenderer.send('hide-finder') } -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') + } + return new window.Notification(title, options) } require('../styles/finder/index.styl') diff --git a/browser/main/index.js b/browser/main/index.js index 54d5e23e..8b335cfe 100644 --- a/browser/main/index.js +++ b/browser/main/index.js @@ -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) {