Пилим фичу с плеером твича встроенным в сайт
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Gitea Actions / Build and deploy (push) Has been cancelled
				
			
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Gitea Actions / Build and deploy (push) Has been cancelled
				
			This commit is contained in:
		
							parent
							
								
									be63dccac2
								
							
						
					
					
						commit
						fdbb8e9f79
					
				|  | @ -1,11 +1,17 @@ | ||||||
| <template> | <template> | ||||||
|     <v-sheet class="mt-5 mb-5 rounded-lg w-75"> |     <v-sheet class="mt-5 mb-5 rounded-lg w-75"> | ||||||
|         <p class="text-h3 ma-5">Расписание стримов</p> |  | ||||||
|         <v-skeleton-loader v-if="fetching" type="text" /> |         <v-skeleton-loader v-if="fetching" type="text" /> | ||||||
|         <p v-else class="ma-5 text-h4"> {{ parseDate(dates[0].current_date) }} - {{ parseDate(dates[1].current_date) }}</p> |         <p v-else class="ma-5 text-h4"> {{ parseDate(dates[0].current_date) }} - {{ parseDate(dates[1].current_date) }}</p> | ||||||
|         <ScheduleTable/> |         <ScheduleTable/> | ||||||
|         <p class="text-h3 ma-5">Ссылочки</p> |  | ||||||
|         <Links/> |         <Links/> | ||||||
|  |         <iframe | ||||||
|  |             src="https://player.twitch.tv/?channel=dhaverd&parent=localhost:8000/&muted=true" | ||||||
|  |             frameborder="0" | ||||||
|  |             allowfullscreen="true" | ||||||
|  |             scrolling="no" | ||||||
|  |             height="378" | ||||||
|  |             width="620" | ||||||
|  |         /> | ||||||
|     </v-sheet> |     </v-sheet> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
|  | @ -19,7 +25,8 @@ export default { | ||||||
|     components: {Links, ScheduleTable}, |     components: {Links, ScheduleTable}, | ||||||
|     data: () => ({ |     data: () => ({ | ||||||
|         dates: [], |         dates: [], | ||||||
|         fetching: true |         fetching: true, | ||||||
|  |         twitchStreamIsOnline: false | ||||||
|     }), |     }), | ||||||
|     methods: { |     methods: { | ||||||
|         parseDate(date){ |         parseDate(date){ | ||||||
|  | @ -33,10 +40,25 @@ export default { | ||||||
|                     this.dates = response.data; |                     this.dates = response.data; | ||||||
|                     this.fetching = false; |                     this.fetching = false; | ||||||
|                 }); |                 }); | ||||||
|  |         }, | ||||||
|  |         async checkTwitchStreamOnline(){ | ||||||
|  |             await axios | ||||||
|  |                 .get('https://api.twitch.tv/helix/search/channels?query=Dhaverd', { | ||||||
|  |                     headers: { | ||||||
|  |                         'Authorization': 'Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx', | ||||||
|  |                         'Client-Id': 'wbmytr93xzw8zbg0p1izqyzzc5mbiz' | ||||||
|  |                     } | ||||||
|  |                 }) | ||||||
|  |                 .then(response => { | ||||||
|  |                     for (let item in response.data){ | ||||||
|  |                         console.log(item); | ||||||
|  |                     } | ||||||
|  |                 }); | ||||||
|         } |         } | ||||||
|     }, |     }, | ||||||
|     mounted() { |     mounted() { | ||||||
|         this.getDates(); |         this.getDates(); | ||||||
|  |         this.checkTwitchStreamOnline(); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
|  | @ -20,6 +20,7 @@ | ||||||
| 
 | 
 | ||||||
| <template> | <template> | ||||||
|     <div class="w-100 d-flex justify-center"> |     <div class="w-100 d-flex justify-center"> | ||||||
|  |         <p class="text-h3 ma-5">Ссылочки</p> | ||||||
|         <v-list class="w-66"> |         <v-list class="w-66"> | ||||||
|             <v-skeleton-loader v-if="fetching" type="list-item"/> |             <v-skeleton-loader v-if="fetching" type="list-item"/> | ||||||
|             <v-list-item v-else class="ma-5 bg-gradient-noh" elevation="6" v-for="link in links" :href="link.link"> <!-- style="background-color: #E57373; color: #FFFFFF" --> |             <v-list-item v-else class="ma-5 bg-gradient-noh" elevation="6" v-for="link in links" :href="link.link"> <!-- style="background-color: #E57373; color: #FFFFFF" --> | ||||||
|  |  | ||||||
|  | @ -26,6 +26,7 @@ | ||||||
| 
 | 
 | ||||||
| <template> | <template> | ||||||
|     <div class="w-100 d-flex justify-center"> |     <div class="w-100 d-flex justify-center"> | ||||||
|  |         <p class="text-h3 ma-5">Расписание стримов</p> | ||||||
|         <v-skeleton-loader v-if="fetching" type="table"/> |         <v-skeleton-loader v-if="fetching" type="table"/> | ||||||
|         <v-table v-else class="text-h5 w-66"> |         <v-table v-else class="text-h5 w-66"> | ||||||
|             <tbody> |             <tbody> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue