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

2 lines
2.8 KiB
JavaScript

import{_,e as r,r as y,o,c as d,d as c,w as h,a as t,t as e,k as p,T as m}from"./index.js";const C={name:"ModalDialogPlaylist",props:["show","playlist","uris"],emits:["close"],methods:{play(){this.$emit("close"),r.player_play_uri(this.uris?this.uris:this.playlist.uri,!1)},queue_add(){this.$emit("close"),r.queue_add(this.uris?this.uris:this.playlist.uri)},queue_add_next(){this.$emit("close"),r.queue_add_next(this.uris?this.uris:this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist",params:{id:this.playlist.id}})}}},x={key:0,class:"modal is-active"},k={class:"modal-content fd-modal-card"},f={class:"card"},g={class:"card-content"},v={class:"title is-4"},q=["textContent"],z={class:"content is-small"},w=["textContent"],$=["textContent"],b=["textContent"],B=["textContent"],D={key:0},M=["textContent"],N=["textContent"],V={key:0,class:"card-footer"},P=["textContent"],T=["textContent"],E=["textContent"];function S(l,s,n,j,A,i){const u=y("mdicon");return o(),d("div",null,[c(m,{name:"fade"},{default:h(()=>[n.show?(o(),d("div",x,[t("div",{class:"modal-background",onClick:s[0]||(s[0]=a=>l.$emit("close"))}),t("div",k,[t("div",f,[t("div",g,[t("p",v,[t("a",{class:"has-text-link",onClick:s[1]||(s[1]=(...a)=>i.open_playlist&&i.open_playlist(...a)),textContent:e(n.playlist.name)},null,8,q)]),t("div",z,[t("p",null,[t("span",{class:"heading",textContent:e(l.$t("dialog.playlist.path"))},null,8,w),t("span",{class:"title is-6",textContent:e(n.playlist.path)},null,8,$)]),t("p",null,[t("span",{class:"heading",textContent:e(l.$t("dialog.playlist.type"))},null,8,b),t("span",{class:"title is-6",textContent:e(l.$t("playlist.type."+n.playlist.type))},null,8,B)]),n.playlist.folder?p("",!0):(o(),d("p",D,[t("span",{class:"heading",textContent:e(l.$t("dialog.playlist.track-count"))},null,8,M),t("span",{class:"title is-6",textContent:e(n.playlist.item_count)},null,8,N)]))])]),n.playlist.folder?p("",!0):(o(),d("footer",V,[t("a",{class:"card-footer-item has-text-dark",onClick:s[2]||(s[2]=(...a)=>i.queue_add&&i.queue_add(...a))},[c(u,{class:"icon",name:"playlist-plus",size:"16"}),t("span",{class:"is-size-7",textContent:e(l.$t("dialog.playlist.add"))},null,8,P)]),t("a",{class:"card-footer-item has-text-dark",onClick:s[3]||(s[3]=(...a)=>i.queue_add_next&&i.queue_add_next(...a))},[c(u,{class:"icon",name:"playlist-play",size:"16"}),t("span",{class:"is-size-7",textContent:e(l.$t("dialog.playlist.add-next"))},null,8,T)]),t("a",{class:"card-footer-item has-text-dark",onClick:s[4]||(s[4]=(...a)=>i.play&&i.play(...a))},[c(u,{class:"icon",name:"play",size:"16"}),t("span",{class:"is-size-7",textContent:e(l.$t("dialog.playlist.play"))},null,8,E)])]))])]),t("button",{class:"modal-close is-large","aria-label":"close",onClick:s[5]||(s[5]=a=>l.$emit("close"))})])):p("",!0)]),_:1})])}const G=_(C,[["render",S]]);export{G as M};