so://phie

verbal

A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal

blob: da565a0bc1121e06c4e5523d079a272c2964d6f0 (2677 bytes)[doc][blame][raw]

1import {state} from '../main.js';

2import {$lang, $route} from '../utils.js';

3import VButton from '../element/button.js';

4import VIcon from '../element/icon.js';

5import VImage from '../element/image.js';

6

7export default {

8 props: ['station', 'type'],

9 data() {

10 return { state };

11 },

12 components: {

13 VButton,

14 VIcon,

15 VImage

16 },

17 methods: {

18 $lang,

19 $route

20 },

21 template: `

22 <div>

23 <div v-if="type === undefined || type === 'list'" class="w-full gap-4 group flex items-center">

24 <v-image

25 :station="station"

26 @click="() => state.app.$refs.player.play(station)"

27 class="w-[54px] h-[54px] min-w-[54px] cursor-pointer"

28 ></v-image>

29 <div

30 class="flex flex-col flex-1 min-w-0 cursor-pointer"

31 @click="$route('/station/' + station.id)"

32 >

33 <p

34 :title="station.name"

35 class="text-lg font-medium text-gray-100 pb-0 overflow-hidden text-ellipsis whitespace-nowrap"

36 >

37 {{station.name}}

38 </p>

39 <span class="text-md text-gray-400 overflow-hidden flex gap-2 sm:gap-3">

40 <span

41 v-if="station.country"

42 class="text-gray-400 inline-flex items-center gap-[5px]"

43 :title="$lang('global.country')"

44 >

45 <v-icon

46 id="map-pin"

47 class="w-[18px] h-[18px] !min-w-[18px] inline-flex text-gray-400"

48 size="100%"

49 ></v-icon>

50 <p>{{station.city ? station.city + ', ' : ''}}{{station.state ? station.state + ', ' : ''}}{{station.country}}</p>

51 </span>

52 </span>

53 </div>

54 </div>

55 <div v-if="type === 'grid'" class="flex flex-col gap-3 group w-full min-w-full">

56 <v-image

57 :station="station"

58 @click="$route('/station/' + station.id)"

59 class="w-full aspect-square min-w-full cursor-pointer"

60 ></v-image>

61 <p

62 :title="station.name"

63 class="text-md font-medium text-gray-100 pb-0 w-full"

64 >

65 {{station.name}}

66 </p>

67 </div>

68 </div>

69 `

70}