mirror of
				https://github.com/LibreTranslate/LibreTranslate.git
				synced 2025-11-03 19:17:17 -05:00 
			
		
		
		
	Dont show switch type if files translation disabled
This commit is contained in:
		
							parent
							
								
									aac45a60ab
								
							
						
					
					
						commit
						b3c089b246
					
				@ -36,6 +36,7 @@ document.addEventListener('DOMContentLoaded', function(){
 | 
				
			|||||||
            inputFile: false,
 | 
					            inputFile: false,
 | 
				
			||||||
            loadingFileTranslation: false,
 | 
					            loadingFileTranslation: false,
 | 
				
			||||||
            translatedFileUrl: false,
 | 
					            translatedFileUrl: false,
 | 
				
			||||||
 | 
					            disableFilesTranslation: false,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        mounted: function(){
 | 
					        mounted: function(){
 | 
				
			||||||
            var self = this;
 | 
					            var self = this;
 | 
				
			||||||
@ -51,6 +52,7 @@ document.addEventListener('DOMContentLoaded', function(){
 | 
				
			|||||||
                    self.charactersLimit = self.settings.charLimit;
 | 
					                    self.charactersLimit = self.settings.charLimit;
 | 
				
			||||||
                    self.suggestions = self.settings.suggestions;
 | 
					                    self.suggestions = self.settings.suggestions;
 | 
				
			||||||
                    self.supportedFilesFormat = self.settings.supportedFilesFormat;
 | 
					                    self.supportedFilesFormat = self.settings.supportedFilesFormat;
 | 
				
			||||||
 | 
					                    self.disableFilesTranslation = self.settings.disableFilesTranslation;
 | 
				
			||||||
                }else {
 | 
					                }else {
 | 
				
			||||||
                    self.error = "Cannot load /frontend/settings";
 | 
					                    self.error = "Cannot load /frontend/settings";
 | 
				
			||||||
                    self.loading = false;
 | 
					                    self.loading = false;
 | 
				
			||||||
 | 
				
			|||||||
@ -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">
 | 
					                    <div class="col s12 mb-1" v-if="disableFilesTranslation === false">
 | 
				
			||||||
                        <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>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user