Style fix

This commit is contained in:
Piero Toffanin 2021-10-26 16:04:50 -04:00
parent a1244b9e3e
commit 9d95e07d82
2 changed files with 8 additions and 10 deletions

View file

@ -496,7 +496,7 @@ def create_app(args):
name: file name: file
type: file type: file
required: true required: true
description: file to translate description: File to translate
- in: formData - in: formData
name: source name: source
schema: schema:
@ -573,7 +573,7 @@ def create_app(args):
file = request.files['file'] file = request.files['file']
if not file: if not file:
abort(400, description="Invalid request: missing q parameter") abort(400, description="Invalid request: missing file parameter")
if not source_lang: if not source_lang:
abort(400, description="Invalid request: missing source parameter") abort(400, description="Invalid request: missing source parameter")
if not target_lang: if not target_lang:

View file

@ -105,7 +105,7 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<h3 class="header center">Translation API</h3> <h3 class="header center">Translation API</h3>
<div class="col s12 mb-1" v-if="filesTranslation === true"> <div class="col s12 mb-1 center" v-if="filesTranslation === true">
<button type="button" class="btn btn-switch-type" @click="switchType('text')" :class="{'active': translationType === 'text'}"><i class="material-icons left">title</i>Translate text</button> <button type="button" class="btn btn-switch-type" @click="switchType('text')" :class="{'active': translationType === 'text'}"><i class="material-icons left">title</i>Translate text</button>
<button type="button" class="btn btn-switch-type" @click="switchType('files')" :class="{'active': translationType === 'files'}"><i class="material-icons left">description</i>Translate files</button> <button type="button" class="btn btn-switch-type" @click="switchType('files')" :class="{'active': translationType === 'files'}"><i class="material-icons left">description</i>Translate files</button>
</div> </div>
@ -190,12 +190,10 @@
</div> </div>
<div v-if="inputFile !== false" class="dropzone-content"> <div v-if="inputFile !== false" class="dropzone-content">
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content" style="padding-right: 6px;">
<div class="row"> <div class="row mb-0">
<div class="col s10"> <div class="col s12">
<p>[[ inputFile.name ]]</p> [[ inputFile.name ]]
</div>
<div class="col s2">
<button v-if="loadingFileTranslation !== true" @click="removeFile" class="btn-flat"> <button v-if="loadingFileTranslation !== true" @click="removeFile" class="btn-flat">
<i class="material-icons">close</i> <i class="material-icons">close</i>
</button> </button>
@ -216,7 +214,7 @@
</div> </div>
</div> </div>
<div class="section no-pad-bot"> <div class="section no-pad-bot" v-if="translationType !== 'files'">
<div class="container"> <div class="container">
<div class="row center"> <div class="row center">
<div class="col s12 m12"> <div class="col s12 m12">