Добавил вывод ошибок на страницу
This commit is contained in:
		
							parent
							
								
									2878ed2684
								
							
						
					
					
						commit
						9f98e55bfa
					
				|  | @ -64,3 +64,22 @@ @keyframes wave { | |||
|     } | ||||
| } | ||||
| 
 | ||||
| .tg-link { | ||||
|     color: #00e5ff!important; | ||||
|     text-decoration: none!important; | ||||
| } | ||||
| 
 | ||||
| .tg-link:link { | ||||
|     color: #00e5ff!important; | ||||
|     text-decoration: none!important; | ||||
| } | ||||
| 
 | ||||
| .tg-link:visited { | ||||
|     color: #00ff2d!important; | ||||
|     text-decoration: none!important; | ||||
| } | ||||
| 
 | ||||
| .tg-link:hover { | ||||
|     color: #f9ff00!important; | ||||
|     text-decoration: none!important; | ||||
| } | ||||
|  |  | |||
|  | @ -5,10 +5,11 @@ | |||
|         <div class="wave"/> | ||||
|         <v-card-text class="d-flex justify-center align-center h-100"> | ||||
|             <v-card class="bg-grey-darken-3 pl-6 pr-6 d-flex flex-column justify-center w-75" :class="isWide ? 'h-100' : 'h-auto'"> | ||||
|                 <v-card-title>Вставьте ссылку:</v-card-title> | ||||
|                 <v-card-title>Link:</v-card-title> | ||||
|                 <v-card-text class="d-flex flex-column justify-center w-100 h-auto flex-grow-0"> | ||||
|                     <v-text-field class="h-auto flex-grow-0" v-model="url" label="Ссылка" :loading="fetching"/> | ||||
|                     <v-label v-if="error" class="text-red ml-5">{{ hint }}</v-label> | ||||
|                     <v-label v-if="error" class="text-wrap text-red mr-5 ml-5">{{ hint }}: {{ errorText }}</v-label> | ||||
|                     <v-label v-if="error" class="text-wrap text-red mr-5 ml-5">Contact me on Telegram: <span class="tg-link"><a class="tg-link" target="_blank" href="https://t.me/Dhaverd">@Dhaverd</a></span></v-label> | ||||
|                     <div class="d-flex align-center justify-center h-auto" :class="isWide ? '' : 'flex-column'"> | ||||
|                         <v-btn class="mt-3 mb-3 mr-5 ml-5" :class="isWide ? '' : 'w-75'" variant="elevated" color="blue" @click="startDownload">Найти</v-btn> | ||||
|                         <v-btn v-if="downloadAvailable" :href="downloadLink" target="_blank" class="mt-3 mb-3 mr-5 ml-5" :class="isWide ? '' : 'w-75'" variant="elevated" color="blue">Скачать</v-btn> | ||||
|  | @ -32,6 +33,7 @@ export default { | |||
|         downloadLink: '', | ||||
|         hint: ref(''), | ||||
|         error: ref(false), | ||||
|         errorText: ref(''), | ||||
|         windowHeight: document.documentElement.clientHeight, | ||||
|         windowWidth: document.documentElement.clientWidth, | ||||
|         isWide: window.innerWidth >= 460 | ||||
|  | @ -46,6 +48,7 @@ export default { | |||
|                 if (responce.data.error){ | ||||
|                     this.error = true; | ||||
|                     this.hint = 'Возникла ошибка'; | ||||
|                     this.errorText = responce.data.error; | ||||
|                     console.log(responce.data.error); | ||||
|                 } else if (responce.data.link){ | ||||
|                     this.downloadAvailable = true; | ||||
|  | @ -53,6 +56,7 @@ export default { | |||
|                 } | ||||
|             }).catch((error)=>{ | ||||
|                 this.fetching = false; | ||||
|                 this.errorText = error.response.data.message; | ||||
|                 console.log(error); | ||||
|                 this.error = true; | ||||
|                 this.hint = 'Возникла ошибка'; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue