so://phie

verbal

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

blob: f40cbd8c27b04d491ca8536509e9abbbbf768e41 (2004 bytes)[doc][blame][raw]

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

2import {$lang, http} 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'],

9 components: {

10 VButton,

11 VIcon,

12 VImage

13 },

14 methods: {

15 $lang,

16 setStation(station) {

17 state.station = station;

18 state.app.$refs.player.open = true;

19 },

20 openDetail(station) {

21 state.app.$refs.detail.load(station.id);

22 }

23 },

24 template: `

25 <div class="w-full gap-4 group flex items-center">

26 <v-image

27 :station="station"

28 @click="() => setStation(station)"

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

30 ></v-image>

31 <div

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

33 @click="() => openDetail(station)"

34 >

35 <p

36 :title="station.name"

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

38 >

39 {{station.name}}

40 </p>

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

42 <span

43 v-if="station.country"

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

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

46 >

47 <v-icon

48 id="map-pin"

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

50 size="100%"

51 ></v-icon>

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

53 </span>

54 </span>

55 </div>

56 </div>

57 `

58}