PageSourceSearch

https://frankieedgar.com/_nuxt/Bt3BZj29.js

js frankieedgar.com collected 2026-10-02 14:14:50 UTC 6,580 bytes, 1 lines download raw bytes

1import G from"./BO_wHg7V.js";import H from"./D1xCj3a0.js";import{s as Q}from"./CTHqDljx.js";import{C as Z,a as J}from"#entry";import{i as T,a as K}from"./BP6KYo0g.js";import{u as W}from"./CSQgM3SS.js";import{aC as X,g as Y,j as ee,F as ae,_ as w,q as d,ad as C,ae as le,$ as te,a7 as R,e as se,t as oe}from"./B9SPuWlS.js";import{_ as ne}from"./D6trejea.js";import{ac as L,ar as re,ag as k,p as B,aQ as l,o as i,y as e,x as U,aR as ie,aE as s,Z as u,ay as de,al as o,aH as ue,r as me}from"./CT7wXifU.js";import"./Cp2c5yTg.js";const ce={class:"content-wrapper"},pe={class:"page-header"},fe={class:"header-content"},ge={class:"form-section mb-6"},ve={class:"section-title"},_e={class:"form-section mb-6"},ye={class:"section-title"},be={class:"action-buttons"},Ve={__name:"PageAdd",setup(I){const{$toast:v}=X(),P=Z(),{getApiCalls:h,postApiCalls:c,secureEndpoint:z}=W(),$=J(),E=o([]),_=o(null),m=o(null),y=o(null),q=o([{text:"Landing Page",value:"landing_page"}]),b=o(null),V=o(null),x=o(!1),p=o(!1),f=o(!1),g=o(!1),A=o(null),N=o(null),S=o(null);L(async()=>{try{E.value=await h(z.PAGE)}catch{}});const D=n=>{if(E.value&&n){if(E.value.find(a=>a.name.toLowerCase()==n.toLowerCase()))return"A page already exists with this name.";if(n.toLowerCase()=="contact")return"Contact page is reserved."}return!0},F=n=>{m.value=Q(n,{lower:!0})},M=async()=>{if(await K({titleRef:A.value,pagename:N.value,pgetype:S.value}))O();else{v.error("Please fill out the required fields",{duration:15e3});return}},O=async()=>{try{const n={name:_.value,slug:m.value,title:y.value,location:$.location.id,show_header:x.value,in_menu:p.value,type:b.value,description:V.value,is_member_only:f.value,content:[]};g.value=!0;const a=await c(z.PAGE,n);v.success("page created successfully",{duration:1500}),g.value=!1,P.push("/admin/all-settings")}catch{g.value=!1}};return(n,a)=>{const r=H,j=re("validate");return k(),B(oe,{class:"page-content"},{default:l(()=>[i("div",ce,[i("div",pe,[i("div",fe,[e(r,{name:"mdi:plus-circle",class:"mr-3",style:{color:"white","font-size":"32px"}}),a[12]||(a[12]=i("h1",{class:"page-title"},"Add New Page",-1))]),a[13]||(a[13]=i("p",{class:"page-description"},"Create a new landing page with custom settings and configuration",-1))]),e(Y,{class:"form-card",variant:"outlined"},{default:l(()=>[e(ee,{class:"pa-6"},{default:l(()=>[e(ae,null,{default:l(()=>[i("div",ge,[i("h3",ve,[e(r,{name:"mdi:information",class:"mr-2",style:{color:"#124e66","font-size":"20px"}}),a[14]||(a[14]=U(" Basic Information ",-1))]),e(w,null,{default:l(()=>[e(d,{cols:"12",md:"6"},{default:l(()=>[ie((k(),B(C,{modelValue:s(y),"onUpdate:modelValue":a[0]||(a[0]=t=>u(y)?y.value=t:null),label:"Page Title",name:"Page Title",rules:[s(T)],ref_key:"titleRef",ref:A,variant:"outlined",density:"comfortable",placeholder:"Enter page title",class:"mb-4"},{prepend:l(()=>[e(r,{name:"mdi:format-title",class:"mr-2",style:{"font-size":"24px",color:"rgba(0, 0, 0, 0.6)"}})]),_:1},8,["modelValue","rules"])),[[j,"required"]])]),_:1}),e(d,{cols:"12",md:"6"},{default:l(()=>[e(C,{modelValue:s(_),"onUpdate:modelValue":[a[1]||(a[1]=t=>u(_)?_.value=t:null),a[2]||(a[2]=t=>F(t))],label:"Page Name",name:"Page Name",rules:[D],ref_key:"pagename",ref:N,variant:"outlined",density:"comfortable",placeholder:"Enter page name",class:"mb-4"},{prepend:l(()=>[e(r,{name:"mdi:page-layout-body",class:"mr-2",style:{"font-size":"24px",color:"rgba(0, 0, 0, 0.6)"}})]),_:1},8,["modelValue","rules"])]),_:1})]),_:1}),e(w,null,{default:l(()=>[e(d,{cols:"12",md:"6"},{default:l(()=>[e(C,{disabled:"",modelValue:s(m),"onUpdate:modelValue":a[3]||(a[3]=t=>u(m)?m.value=t:null),label:"Page URL",variant:"outlined",density:"comfortable",class:"mb-4"},{prepend:l(()=>[e(r,{name:"mdi:link",class:"mr-2",style:{"font-size":"24px",color:"rgba(0, 0, 0, 0.6)"}})]),_:1},8,["modelValue"])]),_:1}),e(d,{cols:"12",md:"6"},{default:l(()=>[e(C,{disabled:"",modelValue:s(m),"onUpdate:modelValue":a[4]||(a[4]=t=>u(m)?m.value=t:null),label:"Tag Name",variant:"outlined",density:"comfortable",class:"mb-4"},{prepend:l(()=>[e(r,{name:"mdi:tag",class:"mr-2",style:{"font-size":"24px",color:"rgba(0, 0, 0, 0.6)"}})]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(d,{cols:"12"},{default:l(()=>[e(le,{modelValue:s(V),"onUpdate:modelValue":a[5]||(a[5]=t=>u(V)?V.value=t:null),label:"Description",variant:"outlined",density:"comfortable",placeholder:"Enter page description",rows:"3",class:"mb-4"},{prepend:l(()=>[e(r,{name:"mdi:text",class:"mr-2",style:{"font-size":"24px",color:"rgba(0, 0, 0, 0.6)"}})]),_:1},8,["modelValue"])]),_:1})]),i("div",_e,[i("h3",ye,[e(r,{name:"mdi:cog",class:"mr-2",style:{color:"#124e66","font-size":"20px"}}),a[15]||(a[15]=U(" Page Configuration ",-1))]),e(w,null,{default:l(()=>[e(d,{cols:"12",md:"6"},{default:l(()=>[e(te,{variant:"outlined",items:s(q),"item-title":"text","item-value":"value",modelValue:s(b),"onUpdate:modelValue":a[6]||(a[6]=t=>u(b)?b.value=t:null),label:"Page Type",name:"Page Type",rules:[s(T)],ref_key:"pgetype",ref:S,density:"comfortable",class:"mb-4"},{prepend:l(()=>[e(r,{name:"mdi:file-document",class:"mr-2",style:{"font-size":"24px",color:"rgba(0, 0, 0, 0.6)"}})]),_:1},8,["items","modelValue","rules"])]),_:1})]),_:1}),e(w,null,{default:l(()=>[e(d,{cols:"12",md:"4"},{default:l(()=>[e(R,{label:"Show Header",modelValue:s(x),"onUpdate:modelValue":a[7]||(a[7]=t=>u(x)?x.value=t:null),color:"primary",density:"comfortable",class:"mb-4","hide-details":""},null,8,["modelValue"])]),_:1}),e(d,{cols:"12",md:"4"},{default:l(()=>
1[e(R,{label:"Show In Menu",modelValue:s(p),"onUpdate:modelValue":a[8]||(a[8]=t=>u(p)?p.value=t:null),onChange:a[9]||(a[9]=t=>s(p)?"":f.value=!1),color:"primary",density:"comfortable",class:"mb-4","hide-details":""},null,8,["modelValue"])]),_:1}),e(d,{cols:"12",md:"4"},{default:l(()=>[e(R,{label:"Member Only",modelValue:s(f),"onUpdate:modelValue":a[10]||(a[10]=t=>u(f)?f.value=t:null),color:"primary",density:"comfortable",class:"mb-4","hide-details":""},null,8,["modelValue"])]),_:1})]),_:1})]),i("div",be,[e(se,{loading:s(g),color:"primary",size:"large",onClick:a[11]||(a[11]=t=>M()),class:"submit-btn",elevation:"2"},{default:l(()=>[e(r,{name:"mdi:plus",class:"mr-2",style:{"font-size":"18px"}}),U(" "+de(s(g)?"Creating...":"Create Page"),1)]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1})])]),_:1})}}},xe=ne(Ve,[["__scopeId","data-v-bb7fe893"]]),Ne={__name:"[slug]",setup(I){const v=ue(),P=o("Create a landing page"),h=o("");return L(()=>{const c=v.params.slug;c!=="new"&&(h.value=c)}),(c,z)=>(k(),me("div",null,[e(s(G),{header:s(P)},null,8,["header"]),e(s(xe))]))}};export{Ne 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.