mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 00:45:22 +02:00
Set heatmap color range configurable (#5165)
This commit is contained in:
parent
7e5eec430d
commit
ffd5fb8139
4 changed files with 8 additions and 1 deletions
|
@ -300,6 +300,7 @@ var (
|
|||
MaxDisplayFileSize int64
|
||||
ShowUserEmail bool
|
||||
DefaultTheme string
|
||||
HeatmapColorRange string
|
||||
|
||||
Admin struct {
|
||||
UserPagingNum int
|
||||
|
@ -326,6 +327,7 @@ var (
|
|||
ThemeColorMetaTag: `#6cc644`,
|
||||
MaxDisplayFileSize: 8388608,
|
||||
DefaultTheme: `gitea`,
|
||||
HeatmapColorRange: `['#f4f4f4', '#459928']`,
|
||||
Admin: struct {
|
||||
UserPagingNum int
|
||||
RepoPagingNum int
|
||||
|
|
|
@ -193,6 +193,9 @@ func NewFuncMap() []template.FuncMap {
|
|||
"DefaultTheme": func() string {
|
||||
return setting.UI.DefaultTheme
|
||||
},
|
||||
"HeatmapColorRange": func() string {
|
||||
return setting.UI.HeatmapColorRange
|
||||
},
|
||||
"dict": func(values ...interface{}) (map[string]interface{}, error) {
|
||||
if len(values) == 0 {
|
||||
return nil, errors.New("invalid dict call")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue