Fit UI for the new stuff
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
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
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
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:
parent
30c94deeaa
commit
307655a2fc
1 changed files with 56 additions and 29 deletions
|
@ -7,37 +7,64 @@
|
|||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui email list">
|
||||
<div class="item">
|
||||
{{ctx.Locale.Tr "settings.theme_desc"}}
|
||||
</div>
|
||||
|
||||
<form class="ui form" action="{{.Link}}/theme" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
<label for="ui">{{ctx.Locale.Tr "settings.ui"}}</label>
|
||||
<div class="ui selection dropdown" id="ui">
|
||||
<input name="theme" type="hidden" value="{{.SignedUser.Theme}}">
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="text">
|
||||
{{- range $i,$a := .AllThemes -}}
|
||||
{{if eq $.SignedUser.Theme $a}}{{call $.ThemeName $a}}{{end}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
<div class="menu">
|
||||
{{range $i,$a := .AllThemes}}
|
||||
<div class="item{{if eq $.SignedUser.Theme $a}} active selected{{end}}" data-value="{{$a}}">
|
||||
{{call $.ThemeName $a}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{$theme := index .AllThemes $.SignedUser.Theme}}
|
||||
{{if $theme.Author}}
|
||||
<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}}
|
||||
</p>
|
||||
{{if $theme.Description}}
|
||||
<p><em>"{{$theme.Description}}"</em></p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui primary button">{{ctx.Locale.Tr "settings.update_theme"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="item tw-mb-auto">
|
||||
{{ctx.Locale.Tr "settings.theme_desc"}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="item tw-mb-4">
|
||||
{{ctx.Locale.Tr "settings.theme_desc"}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<form class="ui form" action="{{.Link}}/theme" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
<label for="ui">{{ctx.Locale.Tr "settings.ui"}}</label>
|
||||
<div class="ui selection dropdown" id="ui">
|
||||
<input name="theme" type="hidden" value="{{.SignedUser.Theme}}">
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="text">
|
||||
{{- range $i,$a := .AllThemes -}}
|
||||
{{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}}">
|
||||
{{$a.Name}}
|
||||
{{if $a.Verified}}
|
||||
<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_verified"}}">{{svg "octicon-verified" 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>
|
||||
{{else if eq $a.Scheme "dark"}}
|
||||
<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_dark"}}">{{svg "octicon-moon" 16 "dropdown icon"}}</span>
|
||||
{{else if eq $a.Scheme "light"}}
|
||||
<span data-tooltip-content="{{ctx.Locale.Tr "settings.theme_light"}}">{{svg "octicon-sun" 16 "dropdown icon"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui primary button">{{ctx.Locale.Tr "settings.update_theme"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue