Merge branch 'currenttrack-null' into 'master'

Front-end minor fixes / error handling

See merge request funkwhale/funkwhale!816
environments/review-front-brok-oyrjvg/deployments/2100
Eliot Berriot 2019-07-02 16:28:17 +02:00
commit 5e18333135
3 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -356,7 +356,11 @@ export default {
return
}
let image = this.$refs.cover
this.ambiantColors = ColorThief.prototype.getPalette(image, 4).slice(0, 4)
try {
this.ambiantColors = ColorThief.prototype.getPalette(image, 4).slice(0, 4)
} catch (e) {
console.log('Cannot generate player background from cover image, likely a cross-origin tainted canvas issue')
}
},
handleError({ sound, error }) {
this.$store.commit("player/isLoadingAudio", false)

Wyświetl plik

@ -20,7 +20,7 @@
<tbody>
<tr v-for="track in tracks">
<td class="play-cell">
<play-button :class="['basic', {orange: isPlaying && track.id === currentTrack.id}, 'icon']" :discrete="true" :track="track"></play-button>
<play-button :class="['basic', {orange: currentTrack && isPlaying && track.id === currentTrack.id}, 'icon']" :discrete="true" :track="track"></play-button>
</td>
<td class="content-cell" colspan="5">
<track-favorite-icon :track="track"></track-favorite-icon>

Wyświetl plik

@ -1,7 +1,7 @@
<template>
<tr>
<td>
<play-button :class="['basic', {orange: isPlaying && track.id === currentTrack.id}, 'icon']" :discrete="true" :is-playable="playable" :track="track"></play-button>
<play-button :class="['basic', {orange: currentTrack && isPlaying && track.id === currentTrack.id}, 'icon']" :discrete="true" :is-playable="playable" :track="track"></play-button>
</td>
<td>
<img class="ui mini image" v-if="track.album.cover.original" v-lazy="$store.getters['instance/absoluteUrl'](track.album.cover.small_square_crop)">