owntone-server/htdocs/assets/PageRadioStreams.js
2023-12-14 20:00:28 +00:00

2 lines
1.0 KiB
JavaScript

import{C as u}from"./ContentWithHeading.js";import{G as p}from"./GroupByList.js";import{L as h}from"./ListTracks.js";import{_ as f,r,o as k,c as g,d as c,w as i,e as C,a as l,t as d}from"./index.js";import"./spotify-web-api.js";const s={load(t){return C.library_radio_streams()},set(t,o){t.tracks=new p(o.data.tracks)}},w={name:"PageRadioStreams",components:{ContentWithHeading:u,ListTracks:h},beforeRouteEnter(t,o,a){s.load(t).then(n=>{a(e=>s.set(e,n))})},beforeRouteUpdate(t,o,a){const n=this;s.load(t).then(e=>{s.set(n,e),a()})},data(){return{tracks:new p}}},x=["textContent"],b=["textContent"];function B(t,o,a,n,e,R){const m=r("list-tracks"),_=r("content-with-heading");return k(),g("div",null,[c(_,null,{"heading-left":i(()=>[l("p",{class:"title is-4",textContent:d(t.$t("page.radio.title"))},null,8,x),l("p",{class:"heading has-text-centered-mobile",textContent:d(t.$t("page.radio.count",{count:e.tracks.total}))},null,8,b)]),content:i(()=>[c(m,{tracks:e.tracks},null,8,["tracks"])]),_:1})])}const E=f(w,[["render",B]]);export{E as default};