Fixed tab back function and added disc number

This commit is contained in:
RemixDev 2020-04-18 11:40:19 +02:00
parent 683cf30927
commit 07d376b582
2 changed files with 19 additions and 13 deletions

View File

@ -416,17 +416,23 @@ <h2><span v-if="metadata">{{ metadata }}</span><span v-if="release_date">{{ rele
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="track in body"> <template v-for="track in body">
<td><i class="material-icons">play_arrow</i></td> <tr v-if="track.type == 'track'">
<td>{{ track.track_position }}</td> <td><i class="material-icons">play_arrow</i></td>
<td><i v-if="track.explicit_lyrics" class="material-icons">explicit</i>{{ track.title }} <span v-if="track.title_version">{{track.title_version}}</span></td> <td>{{ track.track_position }}</td>
<td>{{ track.artist.name }}</td> <td><i v-if="track.explicit_lyrics" class="material-icons">explicit</i>{{ track.title }} <span v-if="track.title_version">{{track.title_version}}</span></td>
<td>{{ convertDuration(track.duration) }}</td> <td>{{ track.artist.name }}</td>
<td><input class="trackCheckbox" type="checkbox" v-model="track.selected"></td> <td>{{ convertDuration(track.duration) }}</td>
</tr> <td><input class="trackCheckbox" type="checkbox" v-model="track.selected"></td>
</tr>
<tr v-if="track.type == 'disc_separator'">
<td colspan="6" style="opacity: 0.54;"><i class="material-icons">album</i>{{ track.number }}</td>
</tr>
</template>
</tbody> </tbody>
</table> </table>
<span v-if="label" style="opacity: 0.40;margin-top: 8px;display: inline-block;font-size: 13px;">{{ label }}</span>
<footer> <footer>
<button v-bind:data-link="link">Download {{ type }}</button> <button v-bind:data-link="link">Download {{ type }}</button>
<button>Download selection<i class="material-icons right">file_download</i></button> <button>Download selection<i class="material-icons right">file_download</i></button>

View File

@ -37,9 +37,9 @@ function changeTab(evt, section, tabName) {
} }
} }
function showTab(type, id) { function showTab(type, id, back=false) {
if (windows_stack.length == 0) windows_stack.push({ tab: main_selected }) if (windows_stack.length == 0) windows_stack.push({ tab: main_selected })
else windows_stack.push(currentStack) else if (!back) windows_stack.push(currentStack)
if (type == 'artist') tab = 'artist_tab' if (type == 'artist') tab = 'artist_tab'
else tab = 'tracklist_tab' else tab = 'tracklist_tab'
currentStack = { type: type, id: id } currentStack = { type: type, id: id }
@ -55,7 +55,7 @@ function backTab() {
clickElement('main_' + main_selected + 'link') clickElement('main_' + main_selected + 'link')
} else { } else {
let tabObj = windows_stack.pop() let tabObj = windows_stack.pop()
showTab(tabObj.type, tabObj.id) showTab(tabObj.type, tabObj.id, true)
} }
} }