summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorGwyneth Morgan <gwymor@tilde.club>2021-09-27 07:47:44 -0700
committerGitHub <noreply@github.com>2021-09-27 15:47:44 +0100
commit4e0cca3f7d9dd227df161e3548cc374c169d3dc6 (patch)
treea21ca6ae0f8ecab4de9f805771f3b7e453e73b2c /modules
parent868e937a5354d4d8d9fd754fc80be26a5f345ba6 (diff)
downloadgitea-4e0cca3f7d9dd227df161e3548cc374c169d3dc6.tar.gz
gitea-4e0cca3f7d9dd227df161e3548cc374c169d3dc6.zip
Use light/dark theme based on system preference (#17051)
Add a new default theme `auto`, which will automatically switch between `gitea` (light) and `arc-green` (dark) themes depending on the user's operating system settings. Closes: #8183
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index b054f27c59..f00ab242c3 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -255,8 +255,8 @@ var (
ReactionMaxUserNum: 10,
ThemeColorMetaTag: `#6cc644`,
MaxDisplayFileSize: 8388608,
- DefaultTheme: `gitea`,
- Themes: []string{`gitea`, `arc-green`},
+ DefaultTheme: `auto`,
+ Themes: []string{`auto`, `gitea`, `arc-green`},
Reactions: []string{`+1`, `-1`, `laugh`, `hooray`, `confused`, `heart`, `rocket`, `eyes`},
CustomEmojis: []string{`git`, `gitea`, `codeberg`, `gitlab`, `github`, `gogs`},
CustomEmojisMap: map[string]string{"git": ":git:", "gitea": ":gitea:", "codeberg": ":codeberg:", "gitlab": ":gitlab:", "github": ":github:", "gogs": ":gogs:"},