move translate buttons up for better mobile usability (closes #16)
Some checks are pending
mozhi pipeline / Push Docker image to Codeberg docker registry (push) Waiting to run
mozhi pipeline / Build and publish artifacts (push) Waiting to run

This commit is contained in:
2024-12-27 14:40:02 +05:30
parent 2f63e58e4d
commit 0f72048b11
2 changed files with 27 additions and 25 deletions

View File

@@ -97,9 +97,11 @@ func HandleIndex(c *fiber.Ctx) error {
if engine != "" && originalText != "" && from != "" && to != "" {
if engine == "all" {
transmany = libmozhi.TranslateAll(to, from, originalText)
translationExists = true
} else if engine == "some" {
// The error doesn't really matter since it just checks if the engines are valid, which is already checked in the code at the beginning of the func
transmany, _ = libmozhi.TranslateSome(enginesSome.Engines, to, from, originalText)
translationExists = true
} else {
translation, tlerr = libmozhi.Translate(engine, to, from, originalText)
if tlerr != nil {