summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2019-11-21 21:06:23 +0100
committertechknowlogick <techknowlogick@gitea.io>2019-11-21 15:06:23 -0500
commitf0aaffeedccaa7b338af6cf72cef77895513c9f1 (patch)
tree9101b9c92c60a9b9776e1e23fdb9c58ef63f4d38 /modules/setting
parentcbaa1de9ec8ab1baa49357b660fab16a68097c84 (diff)
downloadgitea-f0aaffeedccaa7b338af6cf72cef77895513c9f1.tar.gz
gitea-f0aaffeedccaa7b338af6cf72cef77895513c9f1.zip
Add USE_SERVICE_WORKER setting (#9110)
* Add USE_SERVICE_WORKER setting This will be very useful setting for anyone doing frontend work. Fixes: https://github.com/go-gitea/gitea/issues/9044 * prevent potential syntax error on old browsers
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index dbe64fa3fd..f2112f59f1 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -170,6 +170,7 @@ var (
DefaultTheme string
Themes []string
SearchRepoDescription bool
+ UseServiceWorker bool
Admin struct {
UserPagingNum int
@@ -969,6 +970,7 @@ func NewContext() {
UI.ShowUserEmail = Cfg.Section("ui").Key("SHOW_USER_EMAIL").MustBool(true)
UI.DefaultShowFullName = Cfg.Section("ui").Key("DEFAULT_SHOW_FULL_NAME").MustBool(false)
UI.SearchRepoDescription = Cfg.Section("ui").Key("SEARCH_REPO_DESCRIPTION").MustBool(true)
+ UI.UseServiceWorker = Cfg.Section("ui").Key("USE_SERVICE_WORKER").MustBool(true)
HasRobotsTxt = com.IsFile(path.Join(CustomPath, "robots.txt"))