webmin / usermin

Usermin source code
http://www.usermin.com/
Other
126 stars 47 forks source link

Use native web browser notifications APIs to notify users when a new email comes in while the tab/window is not focused #119

Open nekohayo opened 6 days ago

nekohayo commented 6 days ago

As far as I could tell from using usermin 2.102's webmail interface, it does not prompt / request privileges to emit notifications, and presumably does not try emitting any notifications (unlike VirtualMin, which is able to do that when it has software updates available for example).

If my observation is correct (as I have not seen it working), then it would be quite useful to implement https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API for usermin's webmail interface. Particularly for the inbox folder, and any other folder that the user might currently be viewing but unfocused (i.e. the user has switched to another tab / window / workspace).

jcameron commented 6 days ago

@iliajie you have some experience with adding notifications in Webmin / Usermin ... what do you think about this one?

iliajie commented 5 days ago

Yes, we could add desktop notifications for Usermin, but they won’t be very useful until we have the mail list loading in the background.

nekohayo commented 5 days ago

Ah I see, so it seems like this would depend on some async "no-page-refresh" list update functionality (if that isn't already implemented) and ideally based around the notion of IDLE-based refreshes in #118 to power the async UI refreshes...

iliajie commented 4 days ago

Yeah, it could be a nice improvement down the road!