A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
blob: d02c13369c8c0651d037296a634e095e9e4eeecb (1283 bytes)[doc][blame][raw]
1
import {http} from './utils.js';2
import VMenu from './component/menu.js';3
import VSearch from './page/search.js';4
import VFavorites from './page/favorites.js';5
import VAccount from './page/account.js';7
export const state = {8
app: null,9
tab: 'search',10
account: {11
username: '',12
language: 'en'13
},14
station: null15
};17
(async () => {18
state.locale = await http`get::/asset/json/locale.json`();20
new Vue({21
el: '#app',22
data: {23
state24
},25
components: {26
VMenu,27
VSearch,28
VFavorites,29
VAccount30
},31
mounted() {32
document.body.style.display = '';33
state.app = this;34
this.init();35
},36
methods: {37
async init() {38
state.account = await http`get::/api/account`();39
}40
},41
template: `42
<div class="px-4 sm:px-10 pb-8 sm:pb-[100px] max-w-[800px] mx-auto flex flex-col">43
<v-menu :state="state"></v-menu>44
<v-search :state="state"></v-search>45
<v-favorites ref="favorites" :state="state"></v-favorites>46
<v-account :state="state"></v-account>47
</div>48
`49
});50
})();