add file and translate button display

This commit is contained in:
Sébastien Thuret 2021-10-24 17:38:53 +02:00
parent 50ce3720eb
commit aaa3c83d4f
No known key found for this signature in database
GPG key ID: 4742E2D66933BB08
3 changed files with 32 additions and 4 deletions

View file

@ -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();
}
}
});