Skip to content

Commit

Permalink
Icon in notifications (fix #9)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablopunk committed Jun 1, 2019
1 parent e71a240 commit 9608c60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"scripts": {
"start": "electron .",
"dist": "npm run png2icns && build",
"svg-to-png": "svgpng assets/icon.svg dist/icon.png -w 512 -h 512",
"png2icns": "npm run svg-to-png && png2icns dist/icon.png -s 16,32,63,128,256 -o assets/icon.icns"
"svg-to-png": "svgpng assets/icon.svg assets/icon.png -w 512 -h 512",
"png2icns": "npm run svg-to-png && png2icns assets/icon.png -s 16,32,63,128,256 -o assets/icon.icns"
},
"build": {
"appId": "com.pablopunk.serve-bar",
Expand Down
6 changes: 4 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,17 @@ const notifyServerSuccess = pathname => {
notifier.notify({
title: 'On browser and clipboard!',
message: `Now you are sharing "${path.basename(pathname)}"`,
wait: false
wait: false,
icon: path.join(__dirname, '..', 'assets', 'icon.png')
})
}

const notifyServerAlreadyExists = pathname => {
notifier.notify({
title: 'Duplicate server!',
message: `You are already sharing this folder "${path.basename(pathname)}"`,
wait: false
wait: false,
icon: path.join(__dirname, '..', 'assets', 'icon.png')
})
}

Expand Down

0 comments on commit 9608c60

Please sign in to comment.