so://phie

verbal

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]

1import VIcon from './icon.js';

2

3export 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 <div

15 ref="image"

16 class="bg-zinc-900 rounded-md overflow-hidden"

17 @click="$emit('click')"

18 >

19 <img

20 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-icon

27 v-else

28 id="access-point"

29 size="32px"

30 class="text-gray-400 select-none pointer-events-none"

31 ></v-icon>

32 </div>

33 `

34}