A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
blob: 02d1ffdf023ea1d1a9df580537f6c280d58b88e1 (913 bytes)[doc][blame][raw]
1
import VIcon from './icon.js';3
export default {4
props: ['station'],5
components: {6
VIcon,7
},8
methods: {9
getIcon(station) {10
return station.is_icon ? `/media/${station.id}.jpg` : station.icon;11
},12
},13
template: `14
<div15
ref="image"16
class="bg-zinc-900 rounded-md overflow-hidden"17
@click="$emit('click')"18
>19
<img20
v-if="station?.icon"21
:alt="station?.name"22
:src="getIcon(station)"23
@error="() => station.icon = null"24
class="w-full h-full object-contain select-none pointer-events-none"25
>26
<v-icon27
v-else28
id="access-point"29
size="32px"30
class="text-gray-400 select-none pointer-events-none"31
></v-icon>32
</div>33
`34
}