From f906a39f66ecd26392257e519f629f5d9fcedbe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Thuret?= Date: Sun, 24 Oct 2021 13:15:36 +0200 Subject: [PATCH] make switch type work --- app/static/js/app.js | 6 ++++++ app/templates/index.html | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/static/js/app.js b/app/static/js/app.js index b957b08..434ad1a 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -30,6 +30,8 @@ document.addEventListener('DOMContentLoaded', function(){ suggestions: false, isSuggesting: false, + + translationType: "text" }, mounted: function(){ var self = this; @@ -299,6 +301,10 @@ document.addEventListener('DOMContentLoaded', function(){ deleteText: function(e){ e.preventDefault(); this.inputText = this.translatedText = this.output = ""; + }, + switchType: function(type) { + console.log(type) + this.translationType = type; } } }); diff --git a/app/templates/index.html b/app/templates/index.html index d3f1577..5242e78 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -106,8 +106,8 @@

Translation API

- titleTranslate text - descriptionTranslate files + +
@@ -133,7 +133,7 @@
-
+
-
+
+
+ +
+
-