make disabling engines work correctly with webui and show right capitalization in webui

This commit is contained in:
2023-09-11 07:45:52 +05:30
parent 6c509efcd2
commit fc4e2d70b6
6 changed files with 42 additions and 12 deletions

View File

@@ -2,11 +2,12 @@
<main>
<!-- Need to do this custom selector thingy since <select> cant submit on click -->
<div class="custom-select">
Translate with: <a href="#" class="selected-option">{{.Engine}}</a>
{{range $key, $value := .enginesNames}} {{ if eq $.Engine $key }}Translate
with: <a href="#" class="selected-option">{{$value}}</a> {{end}} {{end}}
<ul class="options">
{{range .enginesNames}}
<a href="/?engine={{.}}">
<li>{{.}}</li>
{{range $key, $value := .enginesNames}}
<a href="/?engine={{$key}}">
<li>{{$value}}</li>
</a>
{{end}}
</ul>