When server gets free status, push only to first subscribed client. Push to next one if status changed from and then back to freeor after it’s free for some time.
[x] On page load, check whether client is already subscribed and reflect that in UI (disable subscribe button)
[x] :bug: When status changes to error alert pops up on browsers with no push support
When queue is not empty and status changes to free:
[x] Only client from top of the queue is notified. It states that one has 1min to get to the toilet
[ ] If status changes to occupied within 1 min, top client is removed and she gets a notification
[ ] If status does not change to occupied within 1 min, top client gets removed, gets a notification and next client gets notified
[ ] Notification for removed clients contains action to insert themselves at the beginning of the queue (easy to abuse, but not really our priority here)
[ ] /queue without web push subscription. Queueing should be possible even for non-JS users.
Blocks #4.
When server gets
free
status, push only to first subscribed client. Push to next one if status changed from and then back tofree
or after it’s free for some time.error
alert pops up on browsers with no push supportWhen queue is not empty and status changes to
free
:occupied
within 1 min, top client is removed and she gets a notificationoccupied
within 1 min, top client gets removed, gets a notification and next client gets notified/queue
without web push subscription. Queueing should be possible even for non-JS users.