show radio dummy icon in the player bar
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Artem Anufrij 2023-09-12 20:24:31 +02:00
parent 608e16c827
commit 173cf77054

View File

@ -17,11 +17,7 @@
<div class="flex-row grow"> <div class="flex-row grow">
<img <img
class="cover pointer" class="cover pointer"
:src=" :src="cover"
selectedTrack.parent.covers.cover64 ||
selectedRadio.cover64 ||
'/static/icons/dummy/album.svg'
"
:title="selectedTrack.parent.title" :title="selectedTrack.parent.title"
@click="gotoContainer" @click="gotoContainer"
/> />
@ -182,7 +178,7 @@ export default {
this.audio.src = url; this.audio.src = url;
this.pushHistoryItem(); this.pushHistoryItem();
// Try to fix SAFARI // Try to fix SAFARI
this.audio.play(); this.audio.play();
}, },
@ -310,6 +306,27 @@ export default {
}, },
}, },
computed: { computed: {
cover() {
if (this.selectedTrack.title != "") {
let res = "/static/icons/dummy/album.svg";
if (this.selectedTrack.parent.covers.cover64) {
res = this.selectedTrack.parent.covers.cover64;
}
return res;
}
if (this.selectedRadio) {
let res = "/static/icons/dummy/radio.svg";
if (this.selectedRadio.cover64) {
res = this.selectedRadio.cover64;
}
return res;
}
return "";
},
selectedTrack() { selectedTrack() {
return this.$store.getters["tracks/selectedTrack"]; return this.$store.getters["tracks/selectedTrack"];
}, },