Commit Graph

6 Commits (0848c716bf68b94b703072fdb07bc282e20e1290)

Author SHA1 Message Date
Gusted ff2fd08228
Simplify parameter types ()
Remove repeated type declarations in function definitions.
Lunny Xiao 9f31f3aa8a
Add an abstract json layout to make it's easier to change json library ()
* Add an abstract json layout to make it's easier to change json library

* Fix import

* Fix import sequence

* Fix blank lines

* Fix blank lines
zeripath 8e32eeb5de
Hold the event source when there are no listeners ()
* Hold the event source when there are no listeners

The event source does not need to run when there are no listeners. Therefore
pause it when there are none.

* add some more logging

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath f0e15250b9
Migrate to use jsoniter instead of encoding/json ()
* Migrate to use jsoniter

* fix tests

* update gitea.com/go-chi/binding

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
zeripath ae56411e9f
Move EventSource to SharedWorker ()
Move EventSource to use a SharedWorker. This prevents issues with HTTP/1.1
open browser connections from preventing gitea from opening multiple tabs.

Also allow setting EVENT_SOURCE_UPDATE_TIME to disable EventSource updating

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
zeripath 791353c03b
Add EventSource support ()
If the browser supports EventSource switch to use this instead of
polling notifications.

Signed-off-by: Andrew Thornton art27@cantab.net