mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 23:55:57 -05:00
2 lines
1.1 KiB
JavaScript
2 lines
1.1 KiB
JavaScript
import{C as m}from"./ContentWithHeading.js";import{G as _}from"./GroupByList.js";import{L as u}from"./ListTracks.js";import{T as y}from"./TabsMusic.js";import{_ as f,r as c,o as h,c as k,d as r,w as i,e as g,a as b,t as w}from"./index.js";import"./spotify-web-api.js";const n={load(t){return g.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50})},set(t,s){t.recently_played=new _(s.data.tracks)}},x={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:m,TabsMusic:y,ListTracks:u},beforeRouteEnter(t,s,a){n.load(t).then(o=>{a(e=>n.set(e,o))})},beforeRouteUpdate(t,s,a){const o=this;n.load(t).then(e=>{n.set(o,e),a()})},data(){return{recently_played:{}}}},C={class:"fd-page-with-tabs"},B=["textContent"];function P(t,s,a,o,e,R){const l=c("tabs-music"),d=c("list-tracks"),p=c("content-with-heading");return h(),k("div",C,[r(l),r(p,null,{"heading-left":i(()=>[b("p",{class:"title is-4",textContent:w(t.$t("page.music.recently-played.title"))},null,8,B)]),content:i(()=>[r(d,{tracks:e.recently_played},null,8,["tracks"])]),_:1})])}const G=f(x,[["render",P]]);export{G as default};
|