mirror of
https://codeberg.org/aryak/mozhi
synced 2024-11-08 19:12:25 +05:30
add copy translation link
This commit is contained in:
parent
3f7ba6b071
commit
fbf74effcd
@ -84,8 +84,7 @@ func Serve(port string) {
|
||||
})
|
||||
|
||||
api := app.Group("/api")
|
||||
api.Get("/translate", pages.HandleTranslate)
|
||||
api.Post("/translate", pages.HandleTranslate)
|
||||
api.All("/translate", pages.HandleTranslate)
|
||||
api.Get("/source_languages", pages.HandleSourceLanguages)
|
||||
api.Get("/target_languages", pages.HandleTargetLanguages)
|
||||
api.Get("/tts", pages.HandleTTS)
|
||||
@ -97,8 +96,7 @@ func Serve(port string) {
|
||||
})
|
||||
api.Get("/swagger/*", swagger.HandlerDefault) // default
|
||||
|
||||
app.Get("/", pages.HandleIndex)
|
||||
app.Post("/", pages.HandleIndex)
|
||||
app.All("/", pages.HandleIndex)
|
||||
app.Get("/about", pages.HandleAbout)
|
||||
app.Get("/switchlanguages", func(c *fiber.Ctx) error {
|
||||
engine := c.Query("engine")
|
||||
|
@ -95,6 +95,7 @@
|
||||
<button class="wrap" type="submit">
|
||||
Translate!
|
||||
</button>
|
||||
{{ if and .Engine .From .To .OriginalText }}<p><a href="/?engine={{.Engine}}&from={{.From}}&to={{.To}}&text={{.OriginalText}}">Copy translation link</a></p>{{end}}
|
||||
</form>
|
||||
<script>
|
||||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
|
||||
|
Loading…
Reference in New Issue
Block a user