so://phie

verbal

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

blob: 1b05f1b0ad47be1a3d6585540e949f9009829dd7 (1291 bytes)[doc][blame][raw]

1import {http} from './utils.js';

2import VMenu from './component/menu.js';

3import VSearch from './page/search.js';

4import VFavorites from './page/favorites.js';

5import VAccount from './page/account.js';

6

7export const state = {

8 app: null,

9 tab: 'search',

10 account: {

11 username: 'typable',

12 language: 'en'

13 },

14 station: {

15 name: 'Liquid Trap',

16 favicon: 'https://cdn-images.audioaddict.com/6/b/5/b/d/6/6b5bd66a99e46fa1258cb565d988ea7c.jpg',

17 is_favorite: true

18 }

19};

20

21(async () => {

22 state.locale = await http`get::/asset/json/locale.json`();

23

24 new Vue({

25 el: '#app',

26 data: {

27 state

28 },

29 components: {

30 VMenu,

31 VSearch,

32 VFavorites,

33 VAccount

34 },

35 mounted() {

36 document.body.style.display = '';

37 state.app = this;

38 },

39 template: `

40 <div class="px-4 sm:px-10 pb-8 sm:pb-[100px] max-w-[800px] mx-auto flex flex-col">

41 <v-menu :state="state"></v-menu>

42 <v-search :state="state"></v-search>

43 <v-favorites ref="favorites" :state="state"></v-favorites>

44 <v-account :state="state"></v-account>

45 </div>

46 `

47 });

48})();