Verified -> Recommended
Some checks failed
requirements / merge-conditions (pull_request) Has been cancelled
testing / backend-checks (pull_request) Has been cancelled
testing / frontend-checks (pull_request) Has been cancelled
issue-labels / release-notes (pull_request_target) Has been cancelled
issue-labels / backporting (pull_request_target) Has been cancelled
milestone / set (pull_request_target) Has been cancelled
testing / test-unit (pull_request) Has been cancelled
testing / test-e2e (pull_request) Has been cancelled
testing / test-remote-cacher (redis) (pull_request) Has been cancelled
testing / test-remote-cacher (valkey) (pull_request) Has been cancelled
testing / test-remote-cacher (garnet) (pull_request) Has been cancelled
testing / test-remote-cacher (redict) (pull_request) Has been cancelled
testing / test-mysql (pull_request) Has been cancelled
testing / test-pgsql (pull_request) Has been cancelled
testing / test-sqlite (pull_request) Has been cancelled
testing / security-check (pull_request) Has been cancelled

This commit is contained in:
Minecon724 2025-06-03 18:08:29 +02:00
commit 9d2d4040c7
Signed by: Minecon724
GPG key ID: A02E6E67AB961189
9 changed files with 17 additions and 15 deletions

View file

@ -26,8 +26,8 @@ type Theme struct {
Description string
// Scheme is the theme's color scheme. It must be either: dark, light, or auto.
Scheme string
// Verified is whether the theme is verified. It means the theme is guaranteed to be bug-free, which happens more with third-party themes.
Verified bool
// Recommended means the theme is guaranteed to be bug-free, usually a first-party theme.
Recommended bool
}
// loadThemeMeta loads theme metadata from a file in a layered FS.
@ -54,7 +54,7 @@ func loadThemeMeta(assetFs *assetfs.LayeredFS, filename string, theme *Theme) er
theme.Url = kv["url"]
theme.Description = kv["description"]
theme.Scheme = strings.ToLower(kv["scheme"])
theme.Verified = kv["verified"] == "yes"
theme.Recommended = kv["recommended"] == "yes"
return nil
}

View file

@ -92,7 +92,7 @@
"discussion.locked": "This discussion has been locked. Commenting is limited to contributors.",
"editor.textarea.tab_hint": "Line already indented. Press <kbd>Tab</kbd> again or <kbd>Escape</kbd> to leave the editor.",
"editor.textarea.shift_tab_hint": "No indentation on this line. Press <kbd>Shift</kbd> + <kbd>Tab</kbd> again or <kbd>Escape</kbd> to leave the editor.",
"settings.theme_verified": "Verified",
"settings.theme_recommended": "Recommended",
"settings.theme_light": "Light",
"settings.theme_dark": "Dark",
"settings.theme_auto": "Auto (per your browser)",

View file

@ -12,7 +12,7 @@
<div class="item">
<p>
<strong>{{$theme.Name}}</strong>
by <em><a href="{{$theme.Url}}">{{$theme.Author}}</a></em> {{if $theme.Verified}}<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_verified"}}">{{svg "octicon-verified" 16 "dropdown icon"}}</span>{{end}}
by <em><a href="{{$theme.Url}}">{{$theme.Author}}</a></em> {{if $theme.Recommended}}<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_recommended"}}">{{svg "octicon-star" 16 "dropdown icon"}}</span>{{end}}
</p>
{{if $theme.Description}}
<p><em>"{{$theme.Description}}"</em></p>
@ -37,16 +37,18 @@
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="text">
{{- range $i,$a := .AllThemes -}}
{{if eq $.SignedUser.Theme $i}}{{$a.Name}}{{end}}
{{if eq $.SignedUser.Theme $i}}
{{$a.Name}}
{{end}}
{{- end -}}
</div>
<div class="menu">
{{range $i,$a := .AllThemes}}
<div class="item{{if eq $.SignedUser.Theme $i}} active selected{{end}} tw-flex" data-value="{{$i}}">
<div class="item{{if eq $.SignedUser.Theme $i}} active selected{{end}} tw-flex " data-value="{{$i}}">
{{$a.Name}}
{{if $a.Verified}}
<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_verified"}}">{{svg "octicon-verified" 16 "dropdown icon"}}</span>
{{if $a.Recommended}}
<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_recommended"}}">{{svg "octicon-star" 16 "dropdown icon"}}</span>
{{end}}
{{if eq $a.Scheme "auto"}}
<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_auto"}}">{{svg "octicon-sync" 16 "dropdown icon"}}</span>

View file

@ -5,7 +5,7 @@
Url https://forgejo.org/
Description The fresh of freedom.
Scheme Auto
Verified
Recommended
*/
@import "theme-forgejo-light.css";

View file

@ -5,7 +5,7 @@
Url https://forgejo.org/
Description The fresh of freedom.
Scheme Dark
Verified
Recommended
*/
@import "../chroma/dark.css";

View file

@ -5,7 +5,7 @@
Url https://forgejo.org/
Description The fresh of freedom.
Scheme Light
Verified
Recommended
*/
@import "../chroma/light.css";

View file

@ -5,7 +5,7 @@
Url https://github.com/go-gitea/gitea
Description The OG look.
Scheme Auto
Verified
Recommended
*/
@import "./theme-gitea-light.css" (prefers-color-scheme: light);

View file

@ -5,7 +5,7 @@
Url https://github.com/go-gitea/gitea
Description The OG look.
Scheme Dark
Verified
Recommended
*/
@import "../chroma/dark.css";

View file

@ -5,7 +5,7 @@
Url https://github.com/go-gitea/gitea
Description The OG look.
Scheme Light
Verified
Recommended
*/
@import "../chroma/light.css";