usermin icon indicating copy to clipboard operation
usermin copied to clipboard

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

Open nekohayo opened this issue 1 year ago • 4 comments

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).

nekohayo avatar Nov 17 '24 08:11 nekohayo

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

jcameron avatar Nov 17 '24 20:11 jcameron

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.

iliaross avatar Nov 18 '24 14:11 iliaross

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...

nekohayo avatar Nov 19 '24 07:11 nekohayo

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

iliaross avatar Nov 19 '24 18:11 iliaross