File tree 4 files changed +7
-0
lines changed 4 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ type GeneralRepoSettings struct {
12
12
13
13
// GeneralUISettings contains global ui settings exposed by API
14
14
type GeneralUISettings struct {
15
+ DefaultTheme string `json:"default_theme"`
15
16
AllowedReactions []string `json:"allowed_reactions"`
16
17
}
17
18
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ func GetGeneralUISettings(ctx *context.APIContext) {
23
23
// "200":
24
24
// "$ref": "#/responses/GeneralUISettings"
25
25
ctx .JSON (http .StatusOK , api.GeneralUISettings {
26
+ DefaultTheme : setting .UI .DefaultTheme ,
26
27
AllowedReactions : setting .UI .Reactions ,
27
28
})
28
29
}
Original file line number Diff line number Diff line change 7
7
<title>{{if .Title}}{{.Title | RenderEmojiPlain}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} </title>
8
8
<link rel="manifest" href="{{AppSubUrl}}/manifest.json" crossorigin="use-credentials">
9
9
<meta name="theme-color" content="{{ThemeColorMetaTag}}">
10
+ <meta name="default-theme" content="{{DefaultTheme}}" />
10
11
<meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}" />
11
12
<meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}" />
12
13
<meta name="keywords" content="{{MetaKeywords}}">
Original file line number Diff line number Diff line change 13523
13523
"type": "string"
13524
13524
},
13525
13525
"x-go-name": "AllowedReactions"
13526
+ },
13527
+ "default_theme": {
13528
+ "type": "string",
13529
+ "x-go-name": "DefaultTheme"
13526
13530
}
13527
13531
},
13528
13532
"x-go-package": "code.gitea.io/gitea/modules/structs"
You can’t perform that action at this time.
0 commit comments