mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 23:55:57 -05:00
2 lines
3.4 KiB
JavaScript
2 lines
3.4 KiB
JavaScript
import{C as b}from"./CoverArtwork.js";import{_ as h,e as d,r as u,o as m,c,d as i,w as p,a as t,t as l,k as f,T as C}from"./index.js";const k={name:"ModalDialogAlbumSpotify",components:{CoverArtwork:b},props:["show","album"],emits:["close"],data(){return{artwork_visible:!1}},computed:{artwork_url(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{play(){this.$emit("close"),d.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),d.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),d.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},x={key:0,class:"modal is-active"},y={class:"modal-content fd-modal-card"},w={class:"card"},g={class:"card-content"},v={class:"title is-4"},q=["textContent"],z={class:"content is-small"},A=["textContent"],B=["textContent"],D=["textContent"],E=["textContent"],M=["textContent"],N=["textContent"],S={class:"card-footer"},V=["textContent"],L=["textContent"],T=["textContent"];function $(o,e,n,j,F,a){const _=u("cover-artwork"),r=u("mdicon");return m(),c("div",null,[i(C,{name:"fade"},{default:p(()=>[n.show?(m(),c("div",x,[t("div",{class:"modal-background",onClick:e[0]||(e[0]=s=>o.$emit("close"))}),t("div",y,[t("div",w,[t("div",g,[i(_,{artwork_url:a.artwork_url,artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5",onLoad:a.artwork_loaded,onError:a.artwork_error},null,8,["artwork_url","artist","album","onLoad","onError"]),t("p",v,[t("a",{class:"has-text-link",onClick:e[1]||(e[1]=(...s)=>a.open_album&&a.open_album(...s)),textContent:l(n.album.name)},null,8,q)]),t("div",z,[t("p",null,[t("span",{class:"heading",textContent:l(o.$t("dialog.spotify.album.album-artist"))},null,8,A),t("a",{class:"title is-6 has-text-link",onClick:e[2]||(e[2]=(...s)=>a.open_artist&&a.open_artist(...s)),textContent:l(n.album.artists[0].name)},null,8,B)]),t("p",null,[t("span",{class:"heading",textContent:l(o.$t("dialog.spotify.album.release-date"))},null,8,D),t("span",{class:"title is-6",textContent:l(o.$filters.date(n.album.release_date))},null,8,E)]),t("p",null,[t("span",{class:"heading",textContent:l(o.$t("dialog.spotify.album.type"))},null,8,M),t("span",{class:"title is-6",textContent:l(n.album.album_type)},null,8,N)])])]),t("footer",S,[t("a",{class:"card-footer-item has-text-dark",onClick:e[3]||(e[3]=(...s)=>a.queue_add&&a.queue_add(...s))},[i(r,{class:"icon",name:"playlist-plus",size:"16"}),t("span",{class:"is-size-7",textContent:l(o.$t("dialog.spotify.album.add"))},null,8,V)]),t("a",{class:"card-footer-item has-text-dark",onClick:e[4]||(e[4]=(...s)=>a.queue_add_next&&a.queue_add_next(...s))},[i(r,{class:"icon",name:"playlist-play",size:"16"}),t("span",{class:"is-size-7",textContent:l(o.$t("dialog.spotify.album.add-next"))},null,8,L)]),t("a",{class:"card-footer-item has-text-dark",onClick:e[5]||(e[5]=(...s)=>a.play&&a.play(...s))},[i(r,{class:"icon",name:"play",size:"16"}),t("span",{class:"is-size-7",textContent:l(o.$t("dialog.spotify.album.play"))},null,8,T)])])])]),t("button",{class:"modal-close is-large","aria-label":"close",onClick:e[6]||(e[6]=s=>o.$emit("close"))})])):f("",!0)]),_:1})])}const I=h(k,[["render",$]]);export{I as M};
|