aboutsummaryrefslogtreecommitdiffstats
path: root/modules/templates
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-07-03 10:55:36 +0100
committerGitHub <noreply@github.com>2020-07-03 10:55:36 +0100
commitae56411e9f78415745c235fb92fbb7abc139b966 (patch)
tree20ce8e22055394dbf80ee9355cb5c1a03cb19479 /modules/templates
parentcd994f635427388d4e2abb6612e0b830a8f485b9 (diff)
downloadgitea-ae56411e9f78415745c235fb92fbb7abc139b966.tar.gz
gitea-ae56411e9f78415745c235fb92fbb7abc139b966.zip
Move EventSource to SharedWorker (#12095)
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 #11978 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/templates')
-rw-r--r--modules/templates/helper.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 53354a0d3d..5001963e90 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -289,8 +289,8 @@ func NewFuncMap() []template.FuncMap {
return ""
}
},
- "NotificationSettings": func() map[string]int {
- return map[string]int{
+ "NotificationSettings": func() map[string]interface{} {
+ return map[string]interface{}{
"MinTimeout": int(setting.UI.Notification.MinTimeout / time.Millisecond),
"TimeoutStep": int(setting.UI.Notification.TimeoutStep / time.Millisecond),
"MaxTimeout": int(setting.UI.Notification.MaxTimeout / time.Millisecond),