show dummy icon for radios without logo. fix #13
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div :title="item.name" class="container radio" @click="clicked">
|
||||
<img class="radioCover shadow" :src="item.cover128" />
|
||||
<img class="radioCover shadow" :src="cover" />
|
||||
<p
|
||||
class="radioTitle"
|
||||
:class="{ selected: item == $store.state.selectedRadio }"
|
||||
@@ -30,5 +30,14 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
cover() {
|
||||
let res = "/static/icons/dummy/radio.svg";
|
||||
if (this.item && this.item.cover128) {
|
||||
res = this.item.cover128;
|
||||
}
|
||||
return res;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -53,7 +53,7 @@
|
||||
<td>
|
||||
<img
|
||||
class="radioCover"
|
||||
:src="radio.cover32"
|
||||
:src="cover(radio)"
|
||||
@click="updateCover(radio)"
|
||||
/>
|
||||
</td>
|
||||
@@ -116,6 +116,13 @@ export default {
|
||||
updateCover(radio) {
|
||||
this.$store.dispatch("radios/updateRadio", radio);
|
||||
},
|
||||
cover(radio) {
|
||||
let res = "/static/icons/dummy/radio.svg";
|
||||
if (radio.cover32) {
|
||||
res = radio.cover32;
|
||||
}
|
||||
return res;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user