home.vue 690 B

1234567891011121314151617181920212223242526
  1. <script setup>
  2. import { useRadioStore } from "../js/store";
  3. import radiomanifest from "@radiomanifest/radiomanifest";
  4. const store = useRadioStore();
  5. setTimeout(() => {
  6. for (const url of Object.keys(store.radios)) {
  7. radiomanifest.get(url).then((data) => {
  8. store.radios[url] = { ...store.radios[url], ...data };
  9. });
  10. }
  11. }, 100);
  12. </script>
  13. <template>
  14. <f7-page name="home">
  15. <!-- Page content-->
  16. <f7-block-title>Radio</f7-block-title>
  17. <f7-list>
  18. <f7-list-item
  19. v-for="(radio, url) in store.radios"
  20. :key="radio.name"
  21. :link="`/radio/${encodeURIComponent(url)}`"
  22. :title="radio.name"
  23. />
  24. </f7-list>
  25. </f7-page>
  26. </template>