mirror of
				https://github.com/KevinMidboe/seasonedRequest.git
				synced 2025-10-29 18:00:13 +00:00 
			
		
		
		
	Movie loaded status fix
This commit is contained in:
		
							
								
								
									
										4
									
								
								dist/build.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/build.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/build.js.map
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/build.js.map
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -1,6 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <section class="movie"> |   <section class="movie"> | ||||||
|     <div class="movie__container" v-if="loaded"> |     <div class="movie__container" v-if="movieLoaded"> | ||||||
|       <header class="movie__header" :class="{'movie__header--page': type=='page'}" :style="{ 'background-image': 'url(' + movieBackdropSrc + ')' }"> |       <header class="movie__header" :class="{'movie__header--page': type=='page'}" :style="{ 'background-image': 'url(' + movieBackdropSrc + ')' }"> | ||||||
|         <div class="movie__wrap movie__wrap--header" :class="{'movie__wrap--page': type=='page'}"> |         <div class="movie__wrap movie__wrap--header" :class="{'movie__wrap--page': type=='page'}"> | ||||||
|           <figure class="movie__poster"> |           <figure class="movie__poster"> | ||||||
| @@ -77,11 +77,11 @@ export default { | |||||||
|       favorite: '' |       favorite: '' | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   computed: { |   // computed: { | ||||||
|     loaded(){ |   //   loaded(){ | ||||||
|       return this.movieLoaded ? true : false; |   //     return this.movieLoaded ? true : false; | ||||||
|     } |   //   } | ||||||
|   }, |   // }, | ||||||
|   methods: { |   methods: { | ||||||
|     fetchMovie(id){ |     fetchMovie(id){ | ||||||
|       axios.get(`https://api.themoviedb.org/3/movie/${id}?api_key=${storage.apiKey}&language=en-US`) |       axios.get(`https://api.themoviedb.org/3/movie/${id}?api_key=${storage.apiKey}&language=en-US`) | ||||||
| @@ -90,9 +90,10 @@ export default { | |||||||
|           this.movie = movie; |           this.movie = movie; | ||||||
|           this.poster(); |           this.poster(); | ||||||
|           this.backdrop(); |           this.backdrop(); | ||||||
|           this.movieLoaded = true; |  | ||||||
|           if(this.userLoggedIn){ |           if(this.userLoggedIn){ | ||||||
|             this.checkIfInFavorites(movie.id); |             this.checkIfInFavorites(movie.id); | ||||||
|  |           } else { | ||||||
|  |             this.movieLoaded = true; | ||||||
|           } |           } | ||||||
|           // Push state |           // Push state | ||||||
|           if(storage.createMoviePopup){ |           if(storage.createMoviePopup){ | ||||||
| @@ -128,6 +129,7 @@ export default { | |||||||
|       .then(function(resp){ |       .then(function(resp){ | ||||||
|           this.favorite = resp.data.favorite; |           this.favorite = resp.data.favorite; | ||||||
|           this.favoriteChecked = true; |           this.favoriteChecked = true; | ||||||
|  |           this.movieLoaded = true; | ||||||
|       }.bind(this)) |       }.bind(this)) | ||||||
|     }, |     }, | ||||||
|     toggleFavorite(){ |     toggleFavorite(){ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user