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

2 lines
1.7 KiB
JavaScript

import{M as g}from"./ModalDialogComposer.js";import{_ as k,r as m,o as s,c as i,F as l,f as C,a as t,t as _,h as f,d as r,k as v,g as x,B as w}from"./index.js";const y={name:"ListComposers",components:{ModalDialogComposer:g},props:["composers","media_kind","hide_group_title"],data(){return{show_details_modal:!1,selected_composer:{}}},methods:{open_composer(o){this.selected_composer=o,this.$router.push({name:"music-composer-albums",params:{name:o.name}})},open_dialog(o){this.selected_composer=o,this.show_details_modal=!0}}},B={key:0,class:"mt-6 mb-5 py-2"},b={class:"media-content is-clipped"},L=["id","textContent"],I=["onClick"],M={class:"media-content is-clickable is-clipped"},N=["textContent"],V={class:"media-right"},D=["onClick"];function F(o,d,n,K,a,c){const p=m("mdicon"),h=m("modal-dialog-composer");return s(),i(l,null,[(s(!0),i(l,null,C(n.composers,e=>(s(),i(l,{key:e.itemId},[!e.isItem&&!n.hide_group_title?(s(),i("div",B,[t("div",b,[t("span",{id:"index_"+e.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:_(e.groupKey)},null,8,L)])])):e.isItem?(s(),i("div",{key:1,class:"media is-align-items-center",onClick:u=>c.open_composer(e.item)},[t("div",M,[t("h1",{class:"title is-6",textContent:_(e.item.name)},null,8,N)]),t("div",V,[t("a",{onClick:f(u=>c.open_dialog(e.item),["prevent","stop"])},[r(p,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,D)])],8,I)):v("",!0)],64))),128)),(s(),x(w,{to:"#app"},[r(h,{show:a.show_details_modal,composer:a.selected_composer,media_kind:n.media_kind,onClose:d[0]||(d[0]=e=>a.show_details_modal=!1)},null,8,["show","composer","media_kind"])]))],64)}const S=k(y,[["render",F]]);export{S as L};