mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 23:55:57 -05:00
2 lines
2.3 KiB
JavaScript
2 lines
2.3 KiB
JavaScript
import{C as g}from"./ContentWithHeading.js";import{G as h}from"./GroupByList.js";import{L as k}from"./ListAlbums.js";import{M as w}from"./ModalDialogComposer.js";import{_ as x,e as d,r as i,o as y,c as v,d as a,w as u,a as e,t as c}from"./index.js";import"./CoverArtwork.js";import"./ModalDialogAlbum.js";const p={load(o){return Promise.all([d.library_composer(o.params.name),d.library_composer_albums(o.params.name)])},set(o,s){o.composer=s[0].data,o.albums_list=new h(s[1].data.albums)}},B={name:"PageComposerAlbums",components:{ContentWithHeading:g,ListAlbums:k,ModalDialogComposer:w},beforeRouteEnter(o,s,l){p.load(o).then(m=>{l(t=>p.set(t,m))})},beforeRouteUpdate(o,s,l){const m=this;p.load(o).then(t=>{p.set(m,t),l()})},data(){return{albums_list:new h,composer:{},show_details_modal:!1}},methods:{open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){d.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!0)}}},z=["textContent"],A={class:"buttons is-centered"},L=["textContent"],P={class:"heading has-text-centered-mobile"},D=["textContent"],E=e("span",null," | ",-1),G=["textContent"];function M(o,s,l,m,t,r){const _=i("mdicon"),b=i("list-albums"),f=i("modal-dialog-composer"),C=i("content-with-heading");return y(),v("div",null,[a(C,null,{"heading-left":u(()=>[e("p",{class:"title is-4",textContent:c(t.composer.name)},null,8,z)]),"heading-right":u(()=>[e("div",A,[e("a",{class:"button is-small is-light is-rounded",onClick:s[0]||(s[0]=n=>t.show_details_modal=!0)},[a(_,{class:"icon",name:"dots-horizontal",size:"16"})]),e("a",{class:"button is-small is-dark is-rounded",onClick:s[1]||(s[1]=(...n)=>r.play&&r.play(...n))},[a(_,{class:"icon",name:"shuffle",size:"16"}),e("span",{textContent:c(o.$t("page.composer.shuffle"))},null,8,L)])])]),content:u(()=>[e("p",P,[e("span",{textContent:c(o.$t("page.composer.album-count",{count:t.composer.album_count}))},null,8,D),E,e("a",{class:"has-text-link",onClick:s[2]||(s[2]=(...n)=>r.open_tracks&&r.open_tracks(...n)),textContent:c(o.$t("page.composer.track-count",{count:t.composer.track_count}))},null,8,G)]),a(b,{albums:t.albums_list,hide_group_title:!0},null,8,["albums"]),a(f,{show:t.show_details_modal,composer:t.composer,onClose:s[3]||(s[3]=n=>t.show_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const U=x(B,[["render",M]]);export{U as default};
|