summaryrefslogtreecommitdiffstats
path: root/modules/setting/setting.go
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2019-01-09 18:22:57 +0100
committertechknowlogick <hello@techknowlogick.com>2019-01-09 12:22:57 -0500
commit8d2c24f7f9b9bce3a806e4748623bd3b2742025b (patch)
tree2010e6ffaf542d0828c496c31afa56f816c069d5 /modules/setting/setting.go
parentea518681d95c9ef8ae5ed71d6d8cd7cfb6994a50 (diff)
downloadgitea-8d2c24f7f9b9bce3a806e4748623bd3b2742025b.tar.gz
gitea-8d2c24f7f9b9bce3a806e4748623bd3b2742025b.zip
Allow for user specific themes (#5668)
* add migration and basic UI for changing a user's theme * update user themem * use right text on button * load theme based on users' selection * load theme based on users' selection in pwa too * update sample config * delete older theme loading * implement AfterLoad to set users' theme properly * set up default theme when creating a user. This uses the installation wide theme * use flash messages for error * set default theme when creating a user from the cli * fix @lunny review
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r--modules/setting/setting.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 23304453d2..88101937e9 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -33,9 +33,9 @@ import (
"github.com/go-macaron/session"
_ "github.com/go-macaron/session/redis" // redis plugin for store session
"github.com/go-xorm/core"
- "github.com/kballard/go-shellquote"
- "github.com/mcuadros/go-version"
- "gopkg.in/ini.v1"
+ shellquote "github.com/kballard/go-shellquote"
+ version "github.com/mcuadros/go-version"
+ ini "gopkg.in/ini.v1"
"strk.kbt.io/projects/go/libravatar"
)
@@ -303,6 +303,7 @@ var (
MaxDisplayFileSize int64
ShowUserEmail bool
DefaultTheme string
+ Themes []string
Admin struct {
UserPagingNum int
@@ -329,6 +330,7 @@ var (
ThemeColorMetaTag: `#6cc644`,
MaxDisplayFileSize: 8388608,
DefaultTheme: `gitea`,
+ Themes: []string{`gitea`, `arc-green`},
Admin: struct {
UserPagingNum int
RepoPagingNum int