Added Tracklist button and error feedback to Link Analyzer Tab

This commit is contained in:
RemixDev
2020-06-04 15:04:06 +02:00
parent d3974d5bbe
commit f2ca3c53ac
4 changed files with 28187 additions and 8 deletions

View File

@@ -12,6 +12,7 @@ const LinkAnalyzerTab = new Vue({
data: {},
type: '',
link: '',
id: '0',
countries: []
}
},
@@ -34,13 +35,15 @@ const LinkAnalyzerTab = new Vue({
title_version,
album: { cover_xl },
link,
available_countries
available_countries,
id
} = data
this.title = title + (title_version && title.indexOf(title_version) == -1 ? ' ' + title_version : '')
this.image = cover_xl
this.type = 'track'
this.link = link
this.id = id
available_countries.forEach(cc => {
let temp = []
@@ -53,18 +56,23 @@ const LinkAnalyzerTab = new Vue({
this.data = data
},
showAlbum(data) {
const { title, cover_xl, link } = data
const { title, cover_xl, link, id } = data
this.title = title
this.image = cover_xl
this.type = 'album'
this.link = link
this.data = data
this.id = id
},
notSupported(){
this.link = 'error'
}
},
mounted() {
socket.on('analyze_track', this.showTrack)
socket.on('analyze_album', this.showAlbum)
socket.on('analyze_notSupported', this.notSupported)
}
}).$mount('#analyzer_tab')