Commit Graph
3 Commits
Author SHA1 Message Date
silverwind 6af13dbac2 Close EventSource before unloading the page (#11539)
Should eliminate a error in the Firefox console regarding the connection
being interrupted while the page was loading.
2020-05-22 11:57:54 +01:00
zeripath 791353c03b Add EventSource support (#11235)
If the browser supports EventSource switch to use this instead of
polling notifications.

Signed-off-by: Andrew Thornton [email protected]
2020-05-07 22:49:00 +01:00
zeripath b10c416f9e Use AJAX for notifications table (#10961)
* Use AJAX for notifications table

Signed-off-by: Andrew Thornton <[email protected]>

* move to separate js

Signed-off-by: Andrew Thornton <[email protected]>

* placate golangci-lint

Signed-off-by: Andrew Thornton <[email protected]>

* Add autoupdating notification count

Signed-off-by: Andrew Thornton <[email protected]>

* Fix wipeall

Signed-off-by: Andrew Thornton <[email protected]>

* placate tests

Signed-off-by: Andrew Thornton <[email protected]>

* Try hidden

Signed-off-by: Andrew Thornton <[email protected]>

* Try hide and hidden

Signed-off-by: Andrew Thornton <[email protected]>

* More auto-update improvements

Only run checker on pages that have a count
Change starting checker to 10s with a back-off to 60s if there is no change

Signed-off-by: Andrew Thornton <[email protected]>

* string comparison!

Signed-off-by: Andrew Thornton <[email protected]>

* as per @silverwind

Signed-off-by: Andrew Thornton <[email protected]>

* add configurability as per @6543

Signed-off-by: Andrew Thornton <[email protected]>

* Add documentation as per @6543

Signed-off-by: Andrew Thornton <[email protected]>

* Use CSRF header not query

Signed-off-by: Andrew Thornton <[email protected]>

* Further JS improvements

Fix @etzelia update notification table request
Fix @silverwind comments

Co-Authored-By: silverwind <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>

* Simplify the notification count fns

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: silverwind <[email protected]>
2020-04-24 00:57:38 -03:00