mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-16 15:03:03 +00:00
add file and translate button display
This commit is contained in:
parent
50ce3720eb
commit
aaa3c83d4f
3 changed files with 32 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue