PageSourceSearch

https://spektrumtv.hu/build/assets/Index-Dl16GWQD.js

js spektrumtv.hu collected 2026-10-02 20:27:45 UTC 4,019 bytes, 1 lines download raw bytes

1import{_ as j}from"./AppLayout-CWz5USgu.js";import{d as g,i as C,c as h,w as l,o as r,a as s,b as o,g as a,u as p,k as v,e as n,t as f,F as y,h as w,f as T,N as k,n as M}from"./app-GYzGmuSI.js";import{_ as z}from"./PrimaryButton-kki9rAsL.js";import{_ as V}from"./DangerButton-pVmiS_vC.js";import{a as B}from"./DialogModal-CohHJNh8.js";import{_ as H}from"./SecondaryButton-hrSyXCJC.js";import{_ as L}from"./TextInput-DgVmerye.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./DropdownLink-DufrpttY.js";import"./Composables-BwLh971f.js";import"./RecipeList-C_W2Mw63.js";import"./Footer-CNVwS0s3.js";const D={class:"py-12"},R={class:"mx-auto max-w-7xl sm:px-6 lg:px-8"},S={class:"overflow-hidden bg-white shadow-xl sm:rounded-lg"},A={class:"p-6 bg-white border-b border-gray-200"},E={class:"flex justify-between items-center mb-6"},F={class:"mb-6"},O={key:0,class:"text-center py-8 text-gray-500"},I={key:1},K={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},U=["src","alt"],q={class:"p-4"},G=["innerHTML"],J={class:"text-sm text-gray-600 mb-2"},P={class:"text-sm text-gray-500 mb-2"},Q={class:"flex gap-2 mt-4"},W={key:0,class:"mt-6 flex justify-center items-center gap-2"},me={__name:"Index",props:{recipes:Object,filters:Object},setup(d){const u=g(d.filters.search||""),m=g(!1),c=g(null);C(u,i=>{k.get(route("recipes.index"),{search:i},{preserveState:!0,replace:!0})});const $=i=>{c.value=i,m.value=!0},N=()=>{c.value&&k.delete(route("recipes.destroy",c.value.id),{onSuccess:()=>{m.value=!1,c.value=null}})};return(i,e)=>(r(),h(j,{title:"Receptek"},{default:l(()=>[s("div",D,[s("div",R,[s("div",S,[s("div",A,[s("div",E,[e[4]||(e[4]=s("h2",{class:"text-2xl font-semibold text-gray-800"},"Receptek kezelése",-1)),o(p(v),{href:i.route("recipes.create")},{default:l(()=>[o(z,null,{default:l(()=>e[3]||(e[3]=[a("Új recept")])),_:1})]),_:1},8,["href"])]),s("div",F,[o(L,{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=t=>u.value=t),type:"text",placeholder:"Keresés cím, szakács vagy műsor alapján...",class:"w-full md:w-96"},null,8,["modelValue"])]),d.recipes.data.length===0?(r(),n("div",O,f(u.value?"Nincs találat a keresésre.":"Még nincsenek receptek. Hozz létre egyet!"),1)):(r(),n("div",I,[s("div",K,[(r(!0),n(y,null,w(d.recipes.data,t=>{var b,_;return r(),n("div",{key:t.id,class:"border rounded-lg overflow-hidden shadow-sm hover:shadow-md transition-shadow"},[s("img",{src:`/storage/recipes/${t.big_image||t.image}`,alt:t.title,class:"w-full h-48 object-cover"},null,8,U),s("div",q,[s("h3",{class:"text-lg font-semibold mb-2",innerHTML:t.title},null,8,G),s("p",J,f(((b=t.cooks)==null?void 0:b.map(x=>x.name).join(", "))||"N/A"),1),s("p",P,f(((_=t.program)==null?void 0:_.title)||"N/A")+" - "+f(t.episode),1),s("div",Q,[o(p(v),{href:i.route("recipes.edit",t.id),class:"flex-1 text-center px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition"},{default:l(()=>e[5]||(e[5]=[a(" Szerkesztés ")])),_:2},1032,["href"]),o(z,{class:"bg-red-500",onClick:x=>$(t)},{default:l(()=>e[6]||(e[6]=[a(" Törlés ")])),_:2},1032,["onClick"])])])])}),128))]),d.recipes.last_page>1?(r(),n("div",W,[(r(!0),n(y,null,w(d.recipes.links,t=>(r(),h(p(v),{key:t.label,href:t.url,class:M(["px-4 py-2 border rounded transition",t.active?"bg-blue-600 text-white border-blue-600":t.url?"bg-white text-gray-700 border-gray-300 hover:bg-gray-50":"bg-gray-100 text-gray-400 border-gray-300 cursor-not-allowed"]),disabled:!t.url,innerHTML:t.label},null,8,["href","class","disabled","innerHTML"]))),128))])):T("",!0)]))])])])]),o(B,{show:m.value,onClose:e[2]||(e[2]=t=>m.value=!1)},{title:l(()=>
1e[7]||(e[7]=[a(" Recept törlése ")])),content:l(()=>e[8]||(e[8]=[a(" Biztosan törölni szeretnéd ezt a receptet? Ez a művelet nem visszavonható. ")])),footer:l(()=>[o(H,{onClick:e[1]||(e[1]=t=>m.value=!1)},{default:l(()=>e[9]||(e[9]=[a(" Mégse ")])),_:1}),o(V,{class:"ms-3",onClick:N},{default:l(()=>e[10]||(e[10]=[a(" Törlés ")])),_:1})]),_:1},8,["show"])]),_:1}))}};export{me as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.