Added a style to the Link Analyzer tab

This commit is contained in:
RemixDev 2020-05-09 13:44:47 +02:00
parent b529f8b789
commit 303183fc3c
5 changed files with 42173 additions and 56 deletions

View File

@ -5,6 +5,10 @@
display: none;
}
.main_tabcontent h1{
margin-bottom: 12px;
}
.tab button{
background-color: var(--primary-background);
}

View File

@ -477,54 +477,68 @@ <h1>No Favorite Tracks found</h1>
</div>
</div>
<div id="analyzer_tab" class="main_tabcontent">
<div id="analyzer_tab" class="main_tabcontent image_header">
<h1>Link Analyzer</h1>
<h1>{{ title }}</h1>
<h2>{{ subtitle }}</h2>
<table>
<tr v-if="data.isrc">
<td>ISRC</td>
<td>{{ data.isrc }}</td>
</tr>
<tr v-if="data.upc">
<td>UPC</td>
<td>{{ data.upc }}</td>
</tr>
<tr v-if="data.duration">
<td>Duration</td>
<td>{{ convertDuration(data.duration) }}</td>
</tr>
<tr v-if="data.disk_number">
<td>Disk Number</td>
<td>{{ data.disk_number }}</td>
</tr>
<tr v-if="data.track_position">
<td>Track Number</td>
<td>{{ data.track_position }}</td>
</tr>
<tr v-if="data.release_date">
<td>Release Date</td>
<td>{{ data.release_date }}</td>
</tr>
<tr v-if="data.bpm">
<td>BPM</td>
<td>{{ data.bpm }}</td>
</tr>
<tr v-if="data.label">
<td>Label</td>
<td>{{ data.label }}</td>
</tr>
<tr v-if="data.record_type">
<td>Record Type</td>
<td>{{ data.record_type }}</td>
</tr>
<tr v-if="data.genres && data.genres.data.length">
<td>Genres</td>
<td>{{ data.genres.data.map(x => x.name).join("; ") }}</td>
</tr>
</table>
<div v-if="countries.length">
<p v-for="country in countries">{{ country[0] }} - {{ country[1] }}</p>
<div v-if="link == ''">
<p>You can use this section to find out more information about the link you are trying to 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>
</div>
<div v-else>
<header class="inline-flex"
:style="{ 'background-image': 'linear-gradient(to bottom, transparent 0%, var(--main-background) 100%), url(\''+image+'\')' }">
<div>
<h1>{{ title }}</h1>
<h2 v-if="type == 'track'">by <span class="clickable" @click="artistView" :data-id="data.artist.id">{{data.artist.name}}</span> • in <span class="clickable" @click="albumView" :data-id="data.album.id">{{data.album.title}}</span></h2>
<h2 v-else-if="type == 'album'">by <span class="clickable" @click="artistView" :data-id="data.artist.id">{{data.artist.name}}</span> • {{data.nb_tracks}} tracks</h2>
</div>
<div role="button" aria-label="download" @contextmenu.prevent="openQualityModal"
@click.stop="addToQueue" :data-link="link" class="fab right"><i class="material-icons">get_app</i>
</div>
</header>
<table>
<tr v-if="data.isrc">
<td>ISRC</td>
<td>{{ data.isrc }}</td>
</tr>
<tr v-if="data.upc">
<td>UPC</td>
<td>{{ data.upc }}</td>
</tr>
<tr v-if="data.duration">
<td>Duration</td>
<td>{{ convertDuration(data.duration) }}</td>
</tr>
<tr v-if="data.disk_number">
<td>Disk Number</td>
<td>{{ data.disk_number }}</td>
</tr>
<tr v-if="data.track_position">
<td>Track Number</td>
<td>{{ data.track_position }}</td>
</tr>
<tr v-if="data.release_date">
<td>Release Date</td>
<td>{{ data.release_date }}</td>
</tr>
<tr v-if="data.bpm">
<td>BPM</td>
<td>{{ data.bpm }}</td>
</tr>
<tr v-if="data.label">
<td>Label</td>
<td>{{ data.label }}</td>
</tr>
<tr v-if="data.record_type">
<td>Record Type</td>
<td>{{ data.record_type }}</td>
</tr>
<tr v-if="data.genres && data.genres.data.length">
<td>Genres</td>
<td>{{ data.genres.data.map(x => x.name).join("; ") }}</td>
</tr>
</table>
<div v-if="countries.length">
<p v-for="country in countries">{{ country[0] }} - {{ country[1] }}</p>
</div>
</div>
</div>
@ -1104,4 +1118,4 @@ <h2 class="inline-flex"><span v-if="metadata">{{ metadata }}</span><span class="
<script src="/public/js/bundle.js"></script>
</html>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
import Vue from 'vue/dist/vue.esm'
import { socket } from '../socket.js'
import { albumView } from '../tabs.js'
import { albumView, artistView } from '../tabs.js'
import Utils from '../utils.js'
const LinkAnalyzerTab = new Vue({
@ -17,6 +17,7 @@ const LinkAnalyzerTab = new Vue({
},
methods: {
albumView,
artistView,
convertDuration: Utils.convertDuration,
reset() {
this.title = 'Loading...'
@ -31,7 +32,6 @@ const LinkAnalyzerTab = new Vue({
this.title =
data.title +
(data.title_version && data.title.indexOf(data.title_version) == -1 ? ' ' + data.title_version : '')
this.subtitle = `by ${data.artist.name}\nin ${data.album.title}`
this.image = data.album.cover_xl
this.type = 'track'
this.link = data.link
@ -47,7 +47,6 @@ const LinkAnalyzerTab = new Vue({
showAlbum(data) {
console.log(data)
this.title = data.title
this.subtitle = `by ${data.artist.name}\n${data.nb_tracks} tracks`
this.image = data.cover_xl
this.type = 'album'
this.link = data.link