PageSourceSearch

https://magyarmenedek.com/build/assets/PagesIndex-D65xc_ej.js

js magyarmenedek.com collected 2026-10-02 08:09:16 UTC 12,323 bytes, 1 lines download raw bytes

1import{y as G,j as L,k as P,d as e,f as c,v as h,o as n,c as a,p as r,z as Z,F as b,q as J,w as T,t as d,m as g,T as Q,n as x,b as i,i as X,r as k,B as S,s as w}from"./app-BvyYjMQL.js";import{u as ee}from"./useUresForm-B9zE-b83.js";import{_ as te}from"./AdminLayout-sWhm4CWw.js";import{u as le}from"./useScreen-C37BbxFq.js";const se={class:"cat-toolbar nl-filter-bar"},oe={class:"cat-search"},ne={class:"bulk-bar",id:"bulkBar"},ie={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",style:{width:"15px",height:"15px"}},ae={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",style:{width:"15px",height:"15px"}},de={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",style:{width:"15px",height:"15px"}},re={class:"card nl-list-card"},ue={class:"table-scroll"},pe={class:"data-table stp-table"},ve={class:"col-check"},ce=["checked"],ke={id:"stpListBody"},me={class:"col-check"},be=["checked","onChange"],ge={class:"stp-name-cell"},ye=["onClick"],fe={key:0,class:"stp-req-badge"},he={key:0,class:"stp-loc none"},xe={key:1,class:"stp-loc"},we={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},ze=["d"],Ce={class:"stp-date"},_e=["checked","onChange"],Me={class:"vis-label"},Se={key:0},je={class:"modal-head"},Be={class:"modal-title"},Ve={class:"modal-body"},Ae={class:"stp-form"},Le={class:"stp-field"},Te={key:0,class:"stp-err"},$e={class:"stp-field"},De=["value"],qe={key:0,class:"stp-err"},Ue={class:"stp-field"},Ie={key:0,class:"stp-err"},Ee={class:"stp-grid2"},Ne={class:"stp-field"},Oe={class:"stp-field"},Re={class:"stp-vis-row"},Fe={class:"vis-toggle"},Ke={class:"vis-label"},He={class:"modal-foot"},We={class:"modal-sub",style:{"margin-top":"0"}},Ye={class:"modal-actions"},Ge=["disabled"],Pe={class:"modal-head"},Ze={class:"modal-sub",id:"stpDelText"},Je={class:"modal-foot"},Qe={class:"modal-sub",style:{"margin-top":"0"},id:"stpDelHint"},Xe={class:"modal-actions"},ot={__name:"PagesIndex",props:{pages:{type:Array,default:()=>[]}},setup($){const{screenClass:D}=le(),j=$,z=k(""),y=w(()=>{const s=z.value.toLowerCase().trim();return j.pages.filter(t=>!s||t.title.toLowerCase().includes(s))}),B={footer:{lbl:"Lábléc",ico:"M3 3h18v18H3z M3 15h18"},menu:{lbl:"Főmenü",ico:"M3 3h18v18H3z M3 9h18"}},u=k(new Set);function q(s){const t=new Set(u.value);t.has(s)?t.delete(s):t.add(s),u.value=t}const U=w(()=>y.value.length>0&&y.value.every(s=>u.value.has(s.id)));function I(s){u.value=s.target.checked?new Set(y.value.map(t=>t.id)):new Set}function C(s){S.post(route("admin.pages.bulk"),{action:s,ids:[...u.value]},{preserveScroll:!0,onSuccess:()=>{u.value=new Set}})}function E(s,t){S.patch(route("admin.pages.visibility",s.id),{is_visible:t.target.checked},{preserveScroll:!0,preserveState:!0})}const p=k(!1),m=k(null),V=k(!1),o=ee({title:"",slug:"",content:"",meta_title:"",meta_description:"",is_visible:!0});function N(s){const t={á:"a",é:"e",í:"i",ó:"o",ö:"o",ő:"o",ú:"u",ü:"u",ű:"u"};return(s||"").toLowerCase().replace(/[áéíóöőúüű]/g,l=>t[l]||l).replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-")}const _=k(!1);G(()=>o.title,s=>{!_.value&&!m.value&&(o.slug=N(s))});function O(s){_.value=!0,o.slug=s.target.value.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/-{2,}/g,"-")}function R(){m.value=null,V.value=!1,o.reset(),o.clearErrors(),_.value=!1,p.value=!0}function F(s){S.visit(route("admin.pages.edit",s.id))}function K(){const s={preserveScroll:!0,onSuccess:()=>{p.value=!1}};m.value?o.patch(route("admin.pages.update",m.value),s):o.post(route("admin.pages.store"),s)}const v=k(!1),f=w(()=>j.pages.filter(s=>u.value.has(s.id)&&!s.required).length),A=w(()=>u.value.size-f.value);function H(){u.value.size&&(v.value=!0)}function W(){C("delete"),v.value=!1}function Y(){p.value=!1,v.value=!1}return(s,t)=>(n(),L(te,{breadcrumb:"Statikus oldalak"},{default:P(()=>[e("div",{class:"page-header"},[t[14]||(t[14]=e("div",null,[e("h1",null,"Statikus oldalak"),e("div",{class:"sub"},"A weboldal információs oldalai — Rólunk, ÁSZF, Adatvédelem, Kapcsolat és társaik")],-1)),e("div",{style:{display:"flex",gap:"10px","align-items":"center"},class:"page-header-actions"},[e("button",{class:"btn-primary",type:"button",onClick:R},[...t[13]||(t[13]=[e("svg",{viewBox:"0 0 24 24"},[e("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1),e("span",{class:"btn-label"},"Új oldal",-1)])])])]),e("div",se,[e("div",oe,[t[15]||(t[15]=e("svg",{class:"search-icon",viewBox:"0 0 24 24","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e("circle",{cx:"11",cy:"11",r:"8"}),e("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})],-1)),c(e("input",{type:"text",id:"stpSearch",placeholder:"Keresés oldal neve alapján...","onUpdate:modelValue":t[0]||(t[0]=l=>z.value=l)},null,512),[[h,z.value]])])]),c(e("div",ne,[e("button",{class:"btn-outline",type:"button",onClick:t[1]||(t[1]=l=>C("show"))},[(n(),a("svg",ie,[...t[16]||(t[16]=[e("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z"},null,-1),e("circle",{cx:"12",cy:"12",r:"3"},null,-1)])])),t[17]||(t[17]=r(" Megjelenítés ",-1))]),e("button",{class:"btn-outline",type:"button",onClick:t[2]||(t[2]=l=>C("hide"))},[(n(),a("svg",ae,[...t[18]||(t[18]=[e("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z"},null,-1),e("line",{x1:"2",y1:"2",x2:"22",y2:"22"},null,-1)])])),t[19]||(t[19]=r(" Elrejtés ",-1))]),e("button",{class:"btn-outline danger",type:"button",onClick:H},[(n(),a("svg",de,[...t[20]||(t[20]=[e("polyline",{points:"3 6 5 6 21 6"},null,-1),e("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},null,-1)])])),t[21]||(t[21]=r(" Törlés ",-1))])],512),[[Z,u.value.size>0]]),e("div",re,[e("div",ue,[e("table",pe,[e("thead",null,[e("tr",null,[e("th",ve,[e("input",{type:"checkbox",checked:U.value,onChange:I},null,40,ce)]),t[22]||(t[22]=e("th",null,"Oldal",-1)),t[23]||(t[23]=e("th",null,"Elhelyezés",-1)),t[24]||(t[24]=e("th",null,"Módosítva",-1)),t[25]||(t[25]=e("th",null,"Látható a weben",-1))])]),e("tbody",ke,[(n(!0),a(b,null,J(y.value,l=>(n(),a("tr",{key:l.id},[e("td",me,[e("input",{type:"checkbox",checked:u.value.has(l.id),onChange:M=>q(l.id)},null,40,be)]),e("td",null,[e("div",ge,[e("a",{class:"stp-name-link",href:"#",onClick:T(M=>F(l),["prevent"])},d(l.title),9,ye),l.required?(n(),a("span",fe,[...t[26]||(t[26]=[e("svg",{viewBox:"0 0 24 24"},[e("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),e("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})],-1),r("Kötelező",-1)])])):g("",!0)])]),e("td",null,[l.location==="none"?(n(),a("span",he,"Nincs elhelyezve")):(n(),a("span",xe,[(n(),a("svg",we,[e("path",{d:B[l.location].ico},null,8,ze)])),r(d(B[l.location].lbl),1)]))]),e("td",null,[e("span",Ce,d(l.modified),1)]),e("td",null,[e("label",{class:"vis-toggle",onClick:t[3]||(t[3]=T(()=>{},["stop"]))},[e("input",{type:"checkbox",checked:l.visible,onChange:M=>E(l,M)},null,40,_e),t[27]||(t[27]=e("span",{class:"vis-track"},null,-1)),e("span",Me,d(l.visible?"Igen":"Rejtett"),1)])])]))),128)),y.value.length?g("",!0):(n(),a("tr",Se,[...t[28]||(t[28]=[e("td",{colspan:"5",style:{"text-align":"center",padding:"40px",color:"var(--text-body)","font-weight":"600"}},"Nincs a keresésnek megfelelő oldal.",-1)])]))])])])]),(n(),L(Q,{to:"body"},[e("div",{class:x(i(D)),style:{display:"contents"}},[e("div",{class:x(["modal-backdrop",{visible:p.value||v.value}]),id:"stpBackdrop",onClick:Y},null,2),e("div",{class:x(["modal",{visible:p.value}]),id:"stpEditModal",role:"dialog","aria-modal":"true",style:{width:"min(720px,94vw)"}},[e("div",je,[e("div",null,[e("div",Be,d(m.value?"Oldal szerkesztése":"Új oldal"),1),t[29]||(t[29]=e("div",{class:"modal-sub"},"A cím, a slug, a meta adatok és a tartalom szerkeszthető. A blokkos (WYSIWYG) szerkesztő a webshop dizájnnal együtt érkezik.",-1))]),e("button",{class:"modal-x","aria-label":"Bezárás",type:"button",onClick:t[4]||(t[4]=l=>p.value=!1)},[...t[30]||(t[30]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[e("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])]),e("div",Ve,[e("div",Ae,[e("div",Le,[t[31]||(t[31]=e("label",{for:"stpTitle"},"Oldal címe",-1)),c(e("input",{type:"text",class:"stp-input",id:"stpTitle",placeholder:"pl. Rólunk","onUpdate:modelValue":t[5]||(t[5]=l=>i(o).title=l)},null,512),[[h,i(o).title]]),i(o).errors.title?(n(),a("div",Te,d(i(o).errors.title),1)):g("",!0)]),e("div",$e,[t[32]||(t[32]=e("label",{for:"stpSlug"},"URL-slug",-1)),e("input",{type:"text",class:"stp-input stp-slug
1-input",id:"stpSlug",placeholder:"rolunk",value:i(o).slug,onInput:O},null,40,De),i(o).errors.slug?(n(),a("div",qe,d(i(o).errors.slug),1)):g("",!0)]),e("div",Ue,[t[33]||(t[33]=e("label",{for:"stpContent"},"Tartalom",-1)),c(e("textarea",{class:"stp-input",id:"stpContent",rows:"8",placeholder:"Az oldal tartalma…","onUpdate:modelValue":t[6]||(t[6]=l=>i(o).content=l)},null,512),[[h,i(o).content]]),i(o).errors.content?(n(),a("div",Ie,d(i(o).errors.content),1)):g("",!0)]),e("div",Ee,[e("div",Ne,[t[34]||(t[34]=e("label",{for:"stpMetaTitle"},"Meta cím",-1)),c(e("input",{type:"text",class:"stp-input",id:"stpMetaTitle",placeholder:"Üres = az oldal címe","onUpdate:modelValue":t[7]||(t[7]=l=>i(o).meta_title=l)},null,512),[[h,i(o).meta_title]])]),e("div",Oe,[t[35]||(t[35]=e("label",{for:"stpMetaDesc"},"Meta leírás",-1)),c(e("input",{type:"text",class:"stp-input",id:"stpMetaDesc",placeholder:"Üres = a leírás első 160 karaktere","onUpdate:modelValue":t[8]||(t[8]=l=>i(o).meta_description=l)},null,512),[[h,i(o).meta_description]])])]),e("div",Re,[t[37]||(t[37]=e("div",null,[e("div",{class:"t"},"Látható a weben"),e("div",{class:"d"},"Kikapcsolva az oldal nem érhető el a webshopon.")],-1)),e("label",Fe,[c(e("input",{type:"checkbox",id:"stpVisible","onUpdate:modelValue":t[9]||(t[9]=l=>i(o).is_visible=l)},null,512),[[X,i(o).is_visible]]),t[36]||(t[36]=e("span",{class:"vis-track"},null,-1)),e("span",Ke,d(i(o).is_visible?"Igen":"Rejtett"),1)])])])]),e("div",He,[e("span",We,d(V.value?"Kötelező (jogi) oldal — csak szerkeszthető, nem törölhető.":"A slug ékezetmentes, automatikusan generálódik a címből."),1),e("div",Ye,[e("button",{class:"btn-outline",type:"button",onClick:t[10]||(t[10]=l=>p.value=!1)},"Mégse"),e("button",{class:"btn-primary",type:"button",disabled:i(o).processing,onClick:K},d(m.value?"Mentés":"Létrehozás"),9,Ge)])])],2),e("div",{class:x(["modal danger",{visible:v.value}]),id:"stpDeleteModal",role:"dialog","aria-modal":"true",style:{width:"min(540px,93vw)"}},[e("div",Pe,[e("div",null,[t[43]||(t[43]=e("div",{class:"modal-title"},"Oldalak törlése",-1)),e("div",Ze,[f.value===0?(n(),a(b,{key:0},[t[38]||(t[38]=r("A kijelölt oldalak mind ",-1)),t[39]||(t[39]=e("strong",null,"kötelező oldalak",-1)),t[40]||(t[40]=r(", amelyek nem törölhetők.",-1))],64)):(n(),a(b,{key:1},[t[41]||(t[41]=r("Biztosan törlöd a kijelölt ",-1)),e("strong",null,d(f.value)+" oldalt",1),t[42]||(t[42]=r("?",-1))],64))])]),e("button",{class:"modal-x","aria-label":"Bezárás",type:"button",onClick:t[11]||(t[11]=l=>v.value=!1)},[...t[44]||(t[44]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[e("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])]),e("div",Je,[e("span",Qe,[f.value===0?(n(),a(b,{key:0},[r("A kötelező (jogi) oldalak csak szerkeszthetők, nem törölhetők.")],64)):A.value>0?(n(),a(b,{key:1},[r(d(A.value)+" kötelező oldal nem törölhető, ezért kihagyjuk.",1)],64)):(n(),a(b,{key:2},[r("A törlés végleges, a menü- és lábléchivatkozások is megszűnnek.")],64))]),e("div",Xe,[e("button",{class:"btn-outline",type:"button",onClick:t[12]||(t[12]=l=>v.value=!1)},"Mégse"),f.value>0?(n(),a("button",{key:0,class:"btn-primary",type:"button",onClick:W}
1,"Végleges törlés")):g("",!0)])])],2)],2)]))]),_:1}))}};export{ot 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.