diff --git a/app/static/css/main.css b/app/static/css/main.css index 9e6b8c5..2aca92b 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -142,7 +142,7 @@ h3.header { border: 1px solid #ccc; background: #f3f3f3; padding: 1rem 2rem 1rem 1.5rem; - height: 220px; + min-height: 220px; position: relative; } diff --git a/app/static/js/app.js b/app/static/js/app.js index ec074b9..a232369 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -32,7 +32,8 @@ document.addEventListener('DOMContentLoaded', function(){ isSuggesting: false, supportedFilesFormat : [], - translationType: "text" + translationType: "text", + inputFile: false }, mounted: function(){ var self = this; @@ -308,6 +309,16 @@ document.addEventListener('DOMContentLoaded', function(){ }, switchType: function(type) { this.translationType = type; + }, + handleInputFile: function(e) { + this.inputFile = e.target.files[0]; + }, + removeFile: function(e) { + e.preventDefault() + this.inputFile = false; + }, + translateFile: function(e) { + e.preventDefault(); } } }); diff --git a/app/templates/index.html b/app/templates/index.html index a09a313..a247eba 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -174,13 +174,13 @@
-
+
Supported file format: [[ supportedFilesFormatFormatted ]]
File - +
+
+
+
+
+
+

[[ inputFile.name ]]

+
+
+ +
+
+
+
+ +