This commit is contained in:
Sébastien Thuret 2021-10-25 11:46:23 +02:00
parent 5f2d0435f2
commit 738dba7476
No known key found for this signature in database
GPG key ID: 4742E2D66933BB08
2 changed files with 4 additions and 4 deletions

View file

@ -35,7 +35,7 @@ document.addEventListener('DOMContentLoaded', function(){
translationType: "text",
inputFile: false,
loadingFileTranslation: false,
translatedFileUrl: "",
translatedFileUrl: false,
},
mounted: function(){
var self = this;
@ -318,7 +318,7 @@ document.addEventListener('DOMContentLoaded', function(){
removeFile: function(e) {
e.preventDefault()
this.inputFile = false;
this.translatedFileUrl = "";
this.translatedFileUrl = false;
this.loadingFileTranslation = false;
},
translateFile: function(e) {

View file

@ -203,8 +203,8 @@
</div>
</div>
</div>
<button @click="translateFile" v-if="translatedFileUrl === '' && loadingFileTranslation === false" class="btn">Translate</button>
<a v-if="translatedFileUrl !== ''" :href="translatedFileUrl" class="btn">Download</a>
<button @click="translateFile" v-if="translatedFileUrl === false && loadingFileTranslation === false" class="btn">Translate</button>
<a v-if="translatedFileUrl !== false" :href="translatedFileUrl" class="btn">Download</a>
<div class="progress" v-if="loadingFileTranslation">
<div class="indeterminate"></div>
</div>