PageSourceSearch

https://netracuni.com/build/assets/ShopUpdateTheme-89d956c0.js

js netracuni.com collected 2026-09-24 09:08:35 UTC 14,656 bytes, 1 lines download raw bytes

1import{bw as D,T as E,p as N,r as A,G as F,o as v,c as C,w as d,u as s,f as B,t as f,e as V,a as o,aU as l,d as G,g as J,n as x,j as U,F as O,y as u,z as h,A as q,b as L,J as K,L as P}from"./app-58d237c0.js";import{_ as Q}from"./ActionMessage-c46e694d.js";import{_ as R}from"./FormSection-1b575815.js";import{_ as W}from"./PrimaryButton-ba04a1e8.js";import{S as X}from"./SaveIcon-6643834a.js";import{_ as Y}from"./StatusMessage-66611233.js";import{_ as Z}from"./_plugin-vue_export-helper-c27b6911.js";import"./SectionTitle-78fee7b0.js";import"./CloseIcon-bac753bb.js";const a=_=>(K("data-v-db04444b"),_=_(),P(),_),oo={class:"col-span-6"},ro={class:"text-center"},eo={class:"mt-6 mb-6 mx-auto h-96 border w-60"},to={class:"px-4"},so={class:"w-full h-12 bg-gray-50"},no={class:"flex justify-between"},fo=a(()=>o("p",{class:"p-1 m-1 mt-4 text-xs"},"menu menu",-1)),lo={class:"p-1 m-1 mt-4 text-xs uppercase font-medium rounded cursor-pointer btn-preview"},ao={class:"mt-4 px-4"},io={class:"inline-block mt-8 ml-4 p-1 text-xs uppercase font-medium rounded cursor-pointer btn-preview"},mo={class:"mt-4 px-4"},co={class:"grid grid-cols-2 gap-x-2"},po={class:"inline-block mt-8 ml-4 p-1 text-xs uppercase font-medium rounded cursor-pointer btn-preview"},uo={class:"inline-block mt-8 ml-4 p-1 text-xs uppercase font-medium rounded cursor-pointer btn-preview"},_o={class:"mt-4 px-4"},yo={class:"px-4"},Bo={class:"grid grid-cols-3 gap-x-2"},ho=a(()=>o("span",{class:"inline-block mt-8 ml-6 p-1 rounded-full cursor-pointer btn-preview"},[o("svg",{class:"h-5 w-5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24",stroke:"currentColor"},[o("path",{d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})])],-1)),bo=[ho],vo=a(()=>o("span",{class:"inline-block mt-8 ml-6 p-1 rounded-full cursor-pointer btn-preview"},[o("svg",{class:"h-5 w-5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24",stroke:"currentColor"},[o("path",{d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})])],-1)),go=[vo],Co=a(()=>o("span",{class:"inline-block mt-8 ml-6 p-1 rounded-full cursor-pointer btn-preview"},[o("svg",{class:"h-5 w-5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24",stroke:"currentColor"},[o("path",{d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})])],-1)),xo=[Co],ko=a(()=>o("div",{class:"mt-9"},[o("div",{class:"w-full h-8 bg-gray-50"},[o("div",{class:"text-center"},[o("p",{class:"pt-2 text-xs"},"Footer")])])],-1)),wo=a(()=>o("hr",{class:"mb-4"},null,-1)),Ho={class:"mt-2 p-4 rounded border grid grid-cols-2"},To=["onClick"],Mo=a(()=>o("svg",{class:"h-5 w-5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24",stroke:"currentColor"},[o("path",{d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})],-1)),So=[Mo],zo=["onClick"],jo=a(()=>o("svg",{class:"h-5 w-5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24",stroke:"currentColor"},[o("path",{d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})],-1)),Vo=[jo],Uo={class:"mt-4"},Lo={class:"mt-2 p-4 rounded border block sm:grid grid-cols-4 gap-1"},Io={class:"block sm:flex flex-col justify-between"},$o={class:"block font-medium text-sm text-gray-700 cursor-pointer",for:"from_color"},Do={class:"block font-medium text-sm text-gray-700 cursor-pointer",for:"to_color"},Eo={class:"block sm:flex flex-col justify-between"},No={class:"block font-medium text-sm text-gray-700 cursor-pointer",for:"btn_color"},Ao={class:"block font-medium text-sm text-gray-700 cursor-pointer",for:"btn_hover_color"},Fo={class:"block sm:flex flex-col justify-between"},Go={class:"block font-medium text-sm text-gray-700 cursor-pointer",for:"btn_text_color"},Jo={class:"block font-medium text-sm text-gray-700 cursor-pointer",for:"bg_direction_color"},Oo={value:"to right"},qo={value:"to bottom"},Ko={class:"block sm:flex flex-col justify-center"},Po=a(()=>o("span",{class:"inline-block self-center mt-1"},[o("span",{class:"inline-block p-1 rounded-full cursor-pointer btn-preview"},[o("svg",{class:"h-5 w-5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24",stroke:"currentColor"},[o("path",{d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 
10 014 0z"})])])],-1)),Qo=[Po],Ro={__name:"ShopUpdateTheme",props:{shop:Object},setup(_){var H,T,M,S,z,j;const m=_;D(r=>({a2b91730:s(e).theme.primaryBtnBg,d8bf9ee0:s(e).theme.primaryBtnText,"407d6b8e":s(e).theme.primaryBtnHover}));const I=[{fromColor:"#60a5fa",toColor:"#dbeafe",primaryBtnBg:"#2563eb",primaryBtnHover:"#60a5fa",primaryBtnText:"#ffffff"},{fromColor:"#bfdbfe",toColor:"#eff6ff",primaryBtnBg:"#2563eb",primaryBtnHover:"#60a5fa",primaryBtnText:"#ffffff"},{fromColor:"#94a3b8",toColor:"#f1f5f9",primaryBtnBg:"#64748b",primaryBtnHover:"#cbd5e1",primaryBtnText:"#ffffff"},{fromColor:"#e2e8f0",toColor:"#f8fafc",primaryBtnBg:"#64748b",primaryBtnHover:"#cbd5e1",primaryBtnText:"#ffffff"},{fromColor:"#a8a29e",toColor:"#f5f5f4",primaryBtnBg:"#78716c",primaryBtnHover:"#d6d3d1",primaryBtnText:"#ffffff"},{fromColor:"#e7e5e4",toColor:"#fafaf9",primaryBtnBg:"#78716c",primaryBtnHover:"#d6d3d1",primaryBtnText:"#ffffff"},{fromColor:"#f87171",toColor:"#fee2e2",primaryBtnBg:"#ef4444",primaryBtnHover:"#fca5a5",primaryBtnText:"#ffffff"},{fromColor:"#fecaca",toColor:"#fef2f2",primaryBtnBg:"#ef4444",primaryBtnHover:"#fca5a5",primaryBtnText:"#ffffff"},{fromColor:"#fb923c",toColor:"#ffedd5",primaryBtnBg:"#f97516",primaryBtnHover:"#fdbb74",primaryBtnText:"#ffffff"},{fromColor:"#fed7aa",toColor:"#fff7ed",primaryBtnBg:"#f97516",primaryBtnHover:"#fdbb74",primaryBtnText:"#ffffff"},{fromColor:"#facc15",toColor:"#fef9c3",primaryBtnBg:"#eab208",primaryBtnHover:"#fddf47",primaryBtnText:"#ffffff"},{fromColor:"#fef08a",toColor:"#fefce8",primaryBtnBg:"#eab208",primaryBtnHover:"#fddf47",primaryBtnText:"#ffffff"},{fromColor:"#a3e635",toColor:"#ecfccb",primaryBtnBg:"#83cc16",primaryBtnHover:"#bef264",primaryBtnText:"#ffffff"},{fromColor:"#d9f99d",toColor:"#f7fee7",primaryBtnBg:"#83cc16",primaryBtnHover:"#bef264",primaryBtnText:"#ffffff"},{fromColor:"#4ade80",toColor:"#dcfce7",primaryBtnBg:"#22c55e",primaryBtnHover:"#86efac",primaryBtnText:"#ffffff"},{fromColor:"#bbf7d0",toColor:"#f0fdf4",primaryBtnBg:"#22c55e",primaryBtnHover:"#86efac",primaryBtnText:"#ffffff"},{fromColor:"#38bef8",toColor:"#e0f2fe",primaryBtnBg:"#0ea4e9",primaryBtnHover:"#7dd3fc",primaryBtnText:"#ffffff"},{fromColor:"#bae6fd",toColor:"#f0f9ff",primaryBtnBg:"#0ea4e9",primaryBtnHover:"#7dd3fc",primaryBtnText:"#ffffff"},{fromColor:"#a78bfa",toColor:"#ede9fe",primaryBtnBg:"#8a5cf6",primaryBtnHover:"#c3b5fd",primaryBtnText:"#ffffff"},{fromColor:"#ddd6fe",toColor:"#f5f3ff",primaryBtnBg:"#8a5cf6",primaryBtnHover:"#c3b5fd",primaryBtnText:"#ffffff"},{fromColor:"#e879f9",toColor:"#fae8ff",primaryBtnBg:"#d846ef",primaryBtnHover:"#f0abfc",primaryBtnText:"#ffffff"},{fromColor:"#f5d0fe",toColor:"#fdf4ff",primaryBtnBg:"#d846ef",primaryBtnHover:"#f0abfc",primaryBtnText:"#ffffff"},{fromColor:"#f472b6",toColor:"#fce7f3",primaryBtnBg:"#ec489a",primaryBtnHover:"#f9a8d5",primaryBtnText:"#ffffff"},{fromColor:"#fbcfe8",toColor:"#fdf2f8",primaryBtnBg:"#ec489a",primaryBtnHover:"#f9a8d5",primaryBtnText:"#ffffff"},{fromColor:"#fb7185",toColor:"#ffe4e6",primaryBtnBg:"#f43f5d",primaryBtnHover:"#fda4ae",primaryBtnText:"#ffffff"},{fromColor:"#fecdd3",toColor:"#fff1f2",primaryBtnBg:"#f43f5d",primaryBtnHover:"#fda4ae",primaryBtnText:"#ffffff"},{fromColor:"#000000",toColor:"#ffffff",primaryBtnBg:"#000000",primaryBtnHover:"#524e4e",primaryBtnText:"#ffffff"}],y=(r,n)=>{if(r)return r=="#fff"?"#ffffff":r=="#000"?"#000000":r;switch(n){case"from":return"#60a5fa";case"to":return"#dbeafe";case"btn_bg":return"#2563eb";case"btn_hover":return"#60a5fa";case"btn_text":return"#ffffff";default:return"#ffffff"}},e=E({theme:{fromColor:y((H=m.shop.theme)==null?void 0:H.fromColor,"from"),toColor:y((T=m.shop.theme)==null?void 0:T.toColor,"to"),direction:((M=m.shop.theme)==null?void 0:M.direction)??"to right",primaryBtnBg:y((S=m.shop.theme)==null?void 0:S.primaryBtnBg,"btn_bg"),primaryBtnHover:y((z=m.shop.theme)==null?void 0:z.primaryBtnHover,"btn_hover"),primaryBtnText:y((j=m.shop.theme)==null?void 0:j.primaryBtnText,"btn_text")}}),$=()=>{e.put(route("shop.update-theme"),{errorBag:"updateShopTheme",preserveState:!0,preserveScroll:!0})},i=N(()=>"background-image: linear-gradient("+e.theme.direction+", "+e.theme.fromColor+", "+e.theme.toColor+");"),k=(r,n,t,c,p,b)=>{e.theme.fromColor=n,e.theme.toColor=t,e.theme.direction=r,e.theme.primaryBtnBg=c,e.theme.primaryBtnHover=p,e.theme.primaryBtnText=b},w=r=>{var n,t,c,p,b;return(r==null?void 0:r.fromColor)===((n=e.theme)==null?void 0:n.fromColor)&&(r==null?void 0:r.toColor)===((t=e.theme)==null?void 0:t.toColor)&&(r==null?void 0:r.primaryBtnBg)===((c=e.theme)==null?void 0:c.primaryBtnBg)&&(r==null?void 0:r.primaryBtnHover)===((p=e.theme)==null?void 0:p.primaryBtnHover)&&(r==null?void 0:r.primaryBtnText)===((b=e.theme)==null?void 0:b.primaryBtnText)},g=A(!1);return F(()=>[e.recentlySuccessful,e.hasErrors],()=>{g.value=!1}),(r,n)=>(v(),C(R,{onSubmitted:$},{title:d(()=>[B(f(r.__("shop.theme.title")),1),s(e).isDirty?(v(),C(X,{key:0,class:"inline-block mx-2 fill-slate-500"})):V("",!0)]),description:d(()=>[B(f(r.__("shop.theme.description")),1)]),form:d(()=>[o("div",oo,[o("h2",ro,f(r.__("shop.theme.previwe_title")),1),o("div",null,[o("div",eo,[o("div",to,[o("div",so,[o("div",no,[fo,o("p",lo,f(r.__("Search")),1)])])]),o("div",ao,[o("div",{class:"w-full h-16 rounded-sm",style:l(i.value)},[o("span",io,f(r.__("shop.buy")),1)],4)]),o("div",mo,[o("div",co,[o("div",{class:"w-full h-16 rounded-sm",style:l(i.value)},[o("span",po,f(r.__("shop.buy")),1)],4),o("div",{class:"w-full h-16 rounded-sm",style:l(i.value)},[o("span",uo,f(r.__("shop.buy")),1)],4)])]),o("div",_o,[o("p",null,f(r.__("app.menu.products")),1)]),o("div",yo,[o("div",Bo,[o("div",{class:"w-full h-16 rounded-sm",style:l(i.value)},bo,4),o("div",{class:"w-full h-16 rounded-sm",style:l(i.value)},go,4),o("div",{class:"w-full h-16 rounded-sm",style:l(i.value)},xo,4)])]),ko])]),wo,o("div",null,[o("p",null,f(r.__("shop.theme.gradian_select")),1),o("div",null,[o("div",Ho,[(v(),G(O,null,J(I,(t,c)=>o("span",{key:"TH"+c,class:"flex"},[o("button",{class:x([[w(t)&&s(e).theme.direction==="to right"?"border-2 border-indigo-600":""],"h-12 w-full ml-4 mt-2 rounded-sm"]),style:l("background-image: linear-gradient(to right, "+t.fromColor+", "+t.toColor+");"),onClick:U(p=>k("to right",t.fromColor,t.toColor,t.primaryBtnBg,t.primaryBtnHover,t.primaryBtnText),["prevent"])},[o("span",{class:"inline-block mx-auto mt-2 p-1 rounded-full",style:l("background-color: "+t.primaryBtnBg+"; color: "+t.primaryBtnText+";")},So,4)],14,To),o("button",{class:x([[w(t)&&s(e).theme.direction==="to bottom"?"border-2 border-indigo-600":""],"h-12 w-full ml-4 mt-2 rounded-sm"]),style:l("background-image: linear-gradient(to bottom, "+t.fromColor+", "+t.toColor+");"),onClick:U(p=>k("to bottom",t.fromColor,t.toColor,t.primaryBtnBg,t.primaryBtnHover,t.primaryBtnText),["prevent"])},[o("span",{class:"inline-block mx-auto mt-2 p-1 rounded-full",style:l("background-color: "+t.primaryBtnBg+"; color: "+t.primaryBtnText+";")},Vo,4)],14,zo)])),64))])])]),o("div",Uo,[o("p",null,f(r.__("shop.theme.gradian_custom")),1),o("div",null,[o("div",Lo,[o("div",Io,[o("div",null,[o("label",$o,f(r.__("shop.theme.from_select")),1),u(o("input",{type:"color",name:"from_color",id:"from_color","onUpdate:modelValue":n[0]||(n[0]=t=>s(e).theme.fromColor=t),class:"mt-1 cursor-pointer"},null,512),[[h,s(e).theme.fromColor]])]),o("div",null,[o("label",Do,f(r.__("shop.theme.to_select")),1),u(o("input",{type:"color",name:"to_color",id:"to_color","onUpdate:modelValue":n[1]||(n[1]=t=>s(e).theme.toColor=t),class:"mt-1 cursor-pointer"},null,512),[[h,s(e).theme.toColor]])])]),o("div",Eo,[o("div",null,[o("label",No,f(r.__("shop.theme.btn_select")),1),u(o("input",{type:"color",name:"btn_color",id:"btn_color","onUpdate:modelValue":n[2]||(n[2]=t=>s(e).theme.primaryBtnBg=t),class:"mt-1 cursor-pointer"},null,512),[[h,s(e).theme.primaryBtnBg]])]),o("div",null,[o("label",Ao,f(r.__("shop.theme.btn_hover_select")),1),u(o("input",{type:"color",name:"btn_hover_color",id:"btn_hover_color","onUpdate:modelValue":n[3]||(n[3]=t=>s(e).theme.primaryBtnHover=t),class:"mt-1 cursor-pointer"},null,512),[[h,s(e).theme.primaryBtnHover]])])]),o("div",Fo,[o("div",null,[o("label",Go,f(r.__("shop.theme.text_select")),1),u(o("input",{type:"color",name:"btn_text_color",id:"btn_text_color","onUpdate:modelValue":n[4]||(n[4]=t=>s(e).theme.primaryBtnText=t),class:"mt-1 cursor-pointer"},null,512),[[h,s(e).theme.primaryBtnText]])]),o("div",null,[o("label",Jo,f(r.__("shop.theme.direction_select")),1),u(o("select",{id:"bg_direction_color","onUpdate:modelValue":n[5]||(n[5]=t=>s(e).theme.direction=t),class:"mt-2 border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm"},[o("option",Oo,f(r.__("shop.theme.direction_right")),1),o("option",qo,f(r.__("shop.theme.direction_bottom")),1)],512),[[q,s(e).theme.direction]])])]),o("div",Ko,[o("div",null,[o("div",{class:"w-full h-16 rounded-sm flex flex-row justify-center",style:l(i.value)},Qo,4)])])])])])])]),actions:d(()=>[L(Q,{on:s(e).recentlySuccessful,class:"mr-3"},{default:d(()=>[B(f(r.__("Saved")),1)]),_:1},8,["on"]),r.appInfo&&r.appInfo.isApp?(v(),C(Y,{key:0,show:!g.value&&(s(e).recentlySuccessful||s(e).hasErrors),type:s(e).recentlySuccessful?"success":"error","auto-hide":s(e).recentlySuccessful?5e3:0,onClose:n[6]||(n[6]=t=>g.value=!0)},{default:d(()=>[B(f(s(e).hasErrors?r.__("save_failed_validation_errors"):r.__("Saved")),1)]),_:1},8,["show","type","auto-hide"])):V("",!0),L(W,{class:x({"opacity-25":s(e).processing}),disabled:s(e).processing},{default:d(()=>[B(f(r.__("Save")),1)]),_:1},8,["class","disabled"])]),_:1}))}},nr=Z(Ro,[["__scopeId","data-v-db04444b"]]);export{nr 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.