Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate system Notification with autoUpdater #165

Closed
hql287 opened this issue Jan 15, 2018 · 4 comments
Closed

Integrate system Notification with autoUpdater #165

hql287 opened this issue Jan 15, 2018 · 4 comments

Comments

@hql287
Copy link
Owner

hql287 commented Jan 15, 2018

Show the notification once the download is completed.

@hql287 hql287 closed this as completed Jan 20, 2018
@hql287 hql287 reopened this Jan 20, 2018
@AlphaStyle
Copy link
Contributor

I forgot to say I got a beginning of a PR for this, basically you can disable/enable notifications in settings/general and the code would looks like this:

import OSNotification from 'app/helpers/notification'
OSNotifciation(title, body)

Right now I am deciding whether to include the Manta Icon or the Company Icon you choose in settings/profile. Either way I have to figure out how to first read the image so I can use it for the notification. Scroll down a little to see the Icon option for HTML5 Notification.

@hql287
Copy link
Owner Author

hql287 commented Jan 25, 2018

you can disable/enable notifications in settings/general

Nice 👍. I think I already added the notification helper with this commit Maybe we can try to reuse/refactor it?

Right now I am deciding whether to include the Manta Icon or the Company Icon you choose in settings/profile. Either way I have to figure out how to first read the image so I can use it for the notification. Scroll down a little to see the Icon option for HTML5 Notification.

It should always be Manta's icon as at the OS level, the user only needs to know which application just sent the notification. And this is already taken cared of by Electron.

Also, I noticed that there're a few helpers that we use across windows such as this one and the center-on-primary-display.js. I think we should have a shared folder called helpers in the project root for these helpers. Do you want to try refactoring this?

@AlphaStyle
Copy link
Contributor

I didnt know about that commit 😮 I have never done anything preview related so have never looked inside the preview folder 😛

Maybe we can try to reuse/refactor it?

Yes of course 🙂

And this is already taken cared of by Electron.

Does the Manta icon appear by default when you get notified?
It does not for me when I run the development environment on linux (yarn dev, yarn start) 😞

When I try to run yarn build and then yarn dist:linux it doesn't do the icons, I must do the icns2png ... command manually in the build folder to get the icons. But I have not tried this and then get notified, so I dont know whether the Manta Icon show by default or not.

Do you want to try refactoring this?

Sure I can give it a try 🙂

@hql287
Copy link
Owner Author

hql287 commented Jan 27, 2018

Does the Manta icon appear by default when you get notified? It does not for me when I run the development environment on linux (yarn dev, yarn start) 😞

The icon will only show up in production. It's how Electron works, not sure why though.

If you really want to change the icon, you can try the Notification module, which only works in the main process. But in this case, I think using the HTML5 Notification API is enough.

Sure I can give it a try 🙂

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants