Added Tracklist button and error feedback to Link Analyzer Tab
This commit is contained in:
		
							parent
							
								
									d3974d5bbe
								
							
						
					
					
						commit
						f2ca3c53ac
					
				@ -577,6 +577,10 @@
 | 
				
			|||||||
									download<br />This is usefull if you're trying to download some tracks that are not available in your
 | 
														download<br />This is usefull if you're trying to download some tracks that are not available in your
 | 
				
			||||||
									country and want to know where they are available</p>
 | 
														country and want to know where they are available</p>
 | 
				
			||||||
							</div>
 | 
												</div>
 | 
				
			||||||
 | 
												<div v-else-if="link == 'error'">
 | 
				
			||||||
 | 
													<h2>This link is not supported</h2>
 | 
				
			||||||
 | 
													<p>Seems like this link is not yet supported, try analyzing another one.</p>
 | 
				
			||||||
 | 
												</div>
 | 
				
			||||||
							<div v-else>
 | 
												<div v-else>
 | 
				
			||||||
								<header class="inline-flex"
 | 
													<header class="inline-flex"
 | 
				
			||||||
									:style="{ 'background-image': 'linear-gradient(to bottom, transparent 0%, var(--main-background) 100%), url(\''+image+'\')' }">
 | 
														:style="{ 'background-image': 'linear-gradient(to bottom, transparent 0%, var(--main-background) 100%), url(\''+image+'\')' }">
 | 
				
			||||||
@ -593,6 +597,10 @@
 | 
				
			|||||||
									</div>
 | 
														</div>
 | 
				
			||||||
								</header>
 | 
													</header>
 | 
				
			||||||
								<table class="table">
 | 
													<table class="table">
 | 
				
			||||||
 | 
														<tr v-if="data.id">
 | 
				
			||||||
 | 
															<td>ID</td>
 | 
				
			||||||
 | 
															<td>{{ data.id }}</td>
 | 
				
			||||||
 | 
														</tr>
 | 
				
			||||||
									<tr v-if="data.isrc">
 | 
														<tr v-if="data.isrc">
 | 
				
			||||||
										<td>ISRC</td>
 | 
															<td>ISRC</td>
 | 
				
			||||||
										<td>{{ data.isrc }}</td>
 | 
															<td>{{ data.isrc }}</td>
 | 
				
			||||||
@ -634,6 +642,9 @@
 | 
				
			|||||||
										<td>{{ data.genres.data.map(x => x.name).join("; ") }}</td>
 | 
															<td>{{ data.genres.data.map(x => x.name).join("; ") }}</td>
 | 
				
			||||||
									</tr>
 | 
														</tr>
 | 
				
			||||||
								</table>
 | 
													</table>
 | 
				
			||||||
 | 
													<div v-if="type == 'album'">
 | 
				
			||||||
 | 
														<button @click="albumView" :data-id="id">Tracklist</button>
 | 
				
			||||||
 | 
													</div>
 | 
				
			||||||
								<div v-if="countries.length">
 | 
													<div v-if="countries.length">
 | 
				
			||||||
									<p v-for="country in countries">{{ country[0] }} - {{ country[1] }}</p>
 | 
														<p v-for="country in countries">{{ country[0] }} - {{ country[1] }}</p>
 | 
				
			||||||
								</div>
 | 
													</div>
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										28170
									
								
								public/js/bundle.js
									
									
									
									
									
								
							
							
						
						
									
										28170
									
								
								public/js/bundle.js
									
									
									
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -12,6 +12,7 @@ const LinkAnalyzerTab = new Vue({
 | 
				
			|||||||
			data: {},
 | 
								data: {},
 | 
				
			||||||
			type: '',
 | 
								type: '',
 | 
				
			||||||
			link: '',
 | 
								link: '',
 | 
				
			||||||
 | 
								id: '0',
 | 
				
			||||||
			countries: []
 | 
								countries: []
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@ -34,13 +35,15 @@ const LinkAnalyzerTab = new Vue({
 | 
				
			|||||||
				title_version,
 | 
									title_version,
 | 
				
			||||||
				album: { cover_xl },
 | 
									album: { cover_xl },
 | 
				
			||||||
				link,
 | 
									link,
 | 
				
			||||||
				available_countries
 | 
									available_countries,
 | 
				
			||||||
 | 
									id
 | 
				
			||||||
			} = data
 | 
								} = data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			this.title = title + (title_version && title.indexOf(title_version) == -1 ? ' ' + title_version : '')
 | 
								this.title = title + (title_version && title.indexOf(title_version) == -1 ? ' ' + title_version : '')
 | 
				
			||||||
			this.image = cover_xl
 | 
								this.image = cover_xl
 | 
				
			||||||
			this.type = 'track'
 | 
								this.type = 'track'
 | 
				
			||||||
			this.link = link
 | 
								this.link = link
 | 
				
			||||||
 | 
								this.id = id
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			available_countries.forEach(cc => {
 | 
								available_countries.forEach(cc => {
 | 
				
			||||||
				let temp = []
 | 
									let temp = []
 | 
				
			||||||
@ -53,18 +56,23 @@ const LinkAnalyzerTab = new Vue({
 | 
				
			|||||||
			this.data = data
 | 
								this.data = data
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		showAlbum(data) {
 | 
							showAlbum(data) {
 | 
				
			||||||
			const { title, cover_xl, link } = data
 | 
								const { title, cover_xl, link, id } = data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			this.title = title
 | 
								this.title = title
 | 
				
			||||||
			this.image = cover_xl
 | 
								this.image = cover_xl
 | 
				
			||||||
			this.type = 'album'
 | 
								this.type = 'album'
 | 
				
			||||||
			this.link = link
 | 
								this.link = link
 | 
				
			||||||
			this.data = data
 | 
								this.data = data
 | 
				
			||||||
 | 
								this.id = id
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							notSupported(){
 | 
				
			||||||
 | 
								this.link = 'error'
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
		socket.on('analyze_track', this.showTrack)
 | 
							socket.on('analyze_track', this.showTrack)
 | 
				
			||||||
		socket.on('analyze_album', this.showAlbum)
 | 
							socket.on('analyze_album', this.showAlbum)
 | 
				
			||||||
 | 
							socket.on('analyze_notSupported', this.notSupported)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}).$mount('#analyzer_tab')
 | 
					}).$mount('#analyzer_tab')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user