mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
2 lines
2.8 KiB
JavaScript
2 lines
2.8 KiB
JavaScript
import{_ as u,e as r,r as m,o as c,c as _,d as i,w as g,a as e,t as s,k as p,T as h}from"./index.js";const x={name:"ModalDialogGenre",props:["genre","media_kind","show"],emits:["close"],computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`}},methods:{play(){this.$emit("close"),r.player_play_expression(this.expression,!1)},queue_add(){this.$emit("close"),r.queue_expression_add(this.expression)},queue_add_next(){this.$emit("close"),r.queue_expression_add_next(this.expression)},open_genre(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})}}},C={key:0,class:"modal is-active"},k={class:"modal-content fd-modal-card"},f={class:"card"},y={class:"card-content"},v={class:"title is-4"},q=["textContent"],$={class:"content is-small"},b=["textContent"],z=["textContent"],w=["textContent"],B=["textContent"],D=["textContent"],M=["textContent"],N={class:"card-footer"},V=["textContent"],G=["textContent"],T=["textContent"];function E(n,t,l,H,I,o){const d=m("mdicon");return c(),_("div",null,[i(h,{name:"fade"},{default:g(()=>[l.show?(c(),_("div",C,[e("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>n.$emit("close"))}),e("div",k,[e("div",f,[e("div",y,[e("p",v,[e("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>o.open_genre&&o.open_genre(...a)),textContent:s(l.genre.name)},null,8,q)]),e("div",$,[e("p",null,[e("span",{class:"heading",textContent:s(n.$t("dialog.genre.albums"))},null,8,b),e("span",{class:"title is-6",textContent:s(l.genre.album_count)},null,8,z)]),e("p",null,[e("span",{class:"heading",textContent:s(n.$t("dialog.genre.tracks"))},null,8,w),e("span",{class:"title is-6",textContent:s(l.genre.track_count)},null,8,B)]),e("p",null,[e("span",{class:"heading",textContent:s(n.$t("dialog.genre.duration"))},null,8,D),e("span",{class:"title is-6",textContent:s(n.$filters.durationInHours(l.genre.length_ms))},null,8,M)])])]),e("footer",N,[e("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>o.queue_add&&o.queue_add(...a))},[i(d,{class:"icon",name:"playlist-plus",size:"16"}),e("span",{class:"is-size-7",textContent:s(n.$t("dialog.genre.add"))},null,8,V)]),e("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>o.queue_add_next&&o.queue_add_next(...a))},[i(d,{class:"icon",name:"playlist-play",size:"16"}),e("span",{class:"is-size-7",textContent:s(n.$t("dialog.genre.add-next"))},null,8,G)]),e("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>o.play&&o.play(...a))},[i(d,{class:"icon",name:"play",size:"16"}),e("span",{class:"is-size-7",textContent:s(n.$t("dialog.genre.play"))},null,8,T)])])])]),e("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>n.$emit("close"))})])):p("",!0)]),_:1})])}const j=u(x,[["render",E]]);export{j as M};
|