|
@@ -1,9 +1,14 @@
|
|
|
<script setup>
|
|
|
-import useRadioStore from "../js/store";
|
|
|
-setInterval(function() {
|
|
|
- useRadioStore().cambia();
|
|
|
-return true;
|
|
|
-}, 1000)
|
|
|
+import { useRadioStore } from "../js/store";
|
|
|
+import radiomanifest from "@radiomanifest/radiomanifest";
|
|
|
+const store = useRadioStore()
|
|
|
+ setTimeout(() => {
|
|
|
+ for(const url of Object.keys(store.radios)) {
|
|
|
+ radiomanifest.get(url).then((data) => {
|
|
|
+ store.radios[url] = {...store.radios[url], ...data}
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, 100)
|
|
|
</script>
|
|
|
<template>
|
|
|
<f7-page name="home">
|
|
@@ -11,7 +16,7 @@ return true;
|
|
|
<f7-block-title>Radio</f7-block-title>
|
|
|
<f7-list>
|
|
|
<f7-list-item
|
|
|
- v-for="(radio, url) in store.getters.radios.value"
|
|
|
+ v-for="(radio, url) in store.radios"
|
|
|
:key="radio.name"
|
|
|
:link="`/radio/${encodeURIComponent(url)}`"
|
|
|
:title="radio.name"
|