~metalune/simplytranslate_web

6010f71ed0f3b463133d206b19d16e852d834a8e — fattalion 2 months ago e504c53
Remove switchengine (not used anymore)
2 files changed, 2 insertions(+), 3 deletions(-)

M main.py
M templates/index.html
M main.py => main.py +0 -1
@@ 55,7 55,6 @@ async def index():

    engine = next((engine for engine in engines if engine.name == engine_name), google_translate_engine)

    switch_engine = request.args.get("switchengine", False)
    translation = None

    if request.method == "GET":

M templates/index.html => templates/index.html +2 -2
@@ 23,8 23,8 @@
        <form action="/?engine={{ engine }}&typingiscool={{ use_text_fields }}" method="POST">
            Translation Engine:

            <button type="submit" formaction="/?engine=google&switchengine=true&typingiscool={{ use_text_fields }}" formmethod="POST">Google</button>
            <button type="submit" formaction="/?engine=libre&switchengine=true&typingiscool={{ use_text_fields }}" formmethod="POST">LibreTranslate</button>
            <button type="submit" formaction="/?engine=google&typingiscool={{ use_text_fields }}" formmethod="POST">Google</button>
            <button type="submit" formaction="/?engine=libre&typingiscool={{ use_text_fields }}" formmethod="POST">LibreTranslate</button>

            <br>
            <br>