Merge branch 'currenttrack-null' into 'master'
Front-end minor fixes / error handling See merge request funkwhale/funkwhale!816
This commit is contained in:
commit
5e18333135
|
@ -356,7 +356,11 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let image = this.$refs.cover
|
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 }) {
|
handleError({ sound, error }) {
|
||||||
this.$store.commit("player/isLoadingAudio", false)
|
this.$store.commit("player/isLoadingAudio", false)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="track in tracks">
|
<tr v-for="track in tracks">
|
||||||
<td class="play-cell">
|
<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>
|
||||||
<td class="content-cell" colspan="5">
|
<td class="content-cell" colspan="5">
|
||||||
<track-favorite-icon :track="track"></track-favorite-icon>
|
<track-favorite-icon :track="track"></track-favorite-icon>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<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>
|
||||||
<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)">
|
<img class="ui mini image" v-if="track.album.cover.original" v-lazy="$store.getters['instance/absoluteUrl'](track.album.cover.small_square_crop)">
|
||||||
|
|
Loading…
Reference in New Issue