PageSourceSearch

https://wahidkhorasani.com/_nuxt/Cme-595E.js

js wahidkhorasani.com collected 2026-10-02 19:49:34 UTC 12,003 bytes, 1 lines download raw bytes

1import{_ as F}from"./BfJvqi9u.js";import{_ as L}from"./nad_nDu3.js";import{e as M,C as $,H as B,u as H,c as d,a as e,g as l,t as m,F as f,h as x,s as i,v as u,r as U,q as R,y as g,o,b as C,az as J}from"./DWlMSW4v.js";import{r as Q,D as P}from"./Cr-INHhm.js";import{u as z}from"./BPH8NtIX.js";import{u as G}from"./cd2P44UR.js";import{u as K}from"./D1abb-hd.js";import"./BQUjefz5.js";import"./CTpEFuYq.js";import"./C0HWcbYo.js";function W(){const _=G();async function v(){const p=await _.get("/api/admin/pages/irshad");return Q(p??P)}async function w(p){return await _.put("/api/admin/pages/irshad",p)??p}return{fetchIrshadPage:v,updateIrshadPage:w}}const X={key:0,class:"p-8 text-center text-slate-500"},Y={key:1,class:"p-4 rounded-xl bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 text-sm"},Z={key:0,class:"mb-4 p-4 rounded-xl bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 text-sm"},ee={key:1,class:"mb-4 p-4 rounded-xl bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 text-green-700 dark:text-green-300 text-sm"},te={class:"bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 p-4 space-y-4"},le={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},se={class:"bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 p-4 space-y-4"},ae={class:"bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 p-4 space-y-4"},re={class:"space-y-4"},de={class:"flex items-center justify-between gap-2"},oe={class:"text-sm font-medium text-slate-700 dark:text-slate-300"},ne=["onClick"],ie={class:"bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 p-4 space-y-4"},ue={class:"flex items-center justify-between gap-2"},be={class:"text-sm font-medium text-slate-700 dark:text-slate-300"},me=["onClick"],pe={class:"grid grid-cols-1 md:grid-cols-2 gap-3"},xe=["onUpdate:modelValue"],ge=["onUpdate:modelValue"],ke={class:"bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 p-4 space-y-4"},ce={class:"flex items-center justify-between gap-2"},ye={class:"text-sm font-medium text-slate-700 dark:text-slate-300"},fe=["onClick"],_e={class:"grid grid-cols-1 md:grid-cols-3 gap-3"},ve=["onUpdate:modelValue"],we=["onUpdate:modelValue"],he=["disabled"],Oe=M({__name:"index",setup(_){const{can:v}=z(),{fetchIrshadPage:w,updateIrshadPage:p}=W(),{messageFromError:h}=K(),q=g(!0),k=g(!1),V=g(""),c=g(""),y=g(""),s=$(structuredClone(P));B(async()=>{try{const n=await w();Object.assign(s,structuredClone(n))}catch(n){V.value=h(n)}finally{q.value=!1}});function A(){s.who_we_are_paragraphs.push("<p></p>")}function I(n){s.who_we_are_paragraphs.splice(n,1)}function N(){s.value_cards.push({icon:"star",title:"",body:""})}function S(n){s.value_cards.splice(n,1)}function O(){s.quick_links.push({label:"",path:"/",icon:"link"})}function D(n){s.quick_links.splice(n,1)}async function T(){k.value=!0,c.value="",y.value="";try{const n=JSON.parse(JSON.stringify(J(s)));await p(n),y.value="محتوای صفحه ذخیره شد."}catch(n){c.value=h(n)}finally{k.value=!1}}return H({title:"ویرایش صفحه نکات و توصیه"}),(n,t)=>{const j=F,E=L;return o(),d("div",null,[t[29]||(t[29]=e("h1",{class:"text-xl font-bold text-slate-900 dark:text-white mb-2"},"ویرایش صفحه نکات و توصیه",-1)),t[30]||(t[30]=e("p",{class:"text-sm text-slate-500 dark:text-slate-400 mb-6"}," متون نمایش‌داده‌شده در صفحه عمومی «نکات و توصیه» را از اینجا مدیریت کنید. ",-1)),l(q)?(o(),d("div",X,"در حال بارگذاری...")):l(V)?(o(),d("div",Y,m(l(V)),1)):(o(),d(f,{key:2},[l(c)?(o(),d("div",Z,m(l(c)),1)):x("",!0),l(y)?(o(),d("div",ee,m(l(y)),1)):x("",!0),e("form",{class:"space-y-6",onSubmit:R(T,["prevent"])},[e("div",te,[t[14]||(t[14]=e("h2",{class:"text-lg font-medium text-slate-900 dark:text-white"},"مسیر و SEO",-1)),e("div",le,[e("div",null,[t[10]||(t[10]=e("label",{class:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"برچسب خانه (breadcrumb)",-1)),i(e("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>l(s).breadcrumb_home_label=a),type:"text",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,512),[[u,l(s).breadcrumb_home_label]])]),e("div",null,[t[11]||(t[11]=e("label",{class:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"برچسب صفحه فعلی (breadcrumb)",-1)),i(e("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>l(s).breadcrumb_current_label=a),type:"text",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,512),[[u,l(s).breadcrumb_current_label]])])]),e("div",null,[t[12]||(t[12]=e("label",{class:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"عنوان مرورگر (meta title)",-1)),i(e("input",{"onUpdate:modelValue":t[2]||(t[2]=a=>l(s).meta_title=a),type:"text",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,512),[[u,l(s).meta_title]])]),e("div",null,[t[13]||(t[13]=e("label",{class:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"توضیحات SEO (meta description)",-1)),i(e("textarea",{"onUpdate:modelValue":t[3]||(t[3]=a=>l(s).meta_description=a),rows:"2",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,512),[[u,l(s).meta_description]])])]),e("div",se,[t[17]||(t[17]=e("h2",{class:"text-lg font-medium text-slate-900 dark:text-white"},"هدر صفحه",-1)),e("div",null,[t[15]||(t[15]=e("label",{class:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"عنوان اصلی",-1)),i(e("input",{"onUpdate:modelValue":t[4]||(t[4]=a=>l(s).header_title=a),type:"text",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,512),[[u,l(s).header_title]])]),e("div",null,[t[16]||(t[16]=e("label",{class:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"زیرعنوان",-1)),i(e("textarea",{"onUpdate:modelValue":t[5]||(t[5]=a=>l(s).header_subtitle=a),rows:"2",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,512),[[u,l(s).header_subtitle]])])]),e("div",ae,[t[19]||(t[19]=e("h2",{class:"text-lg font-medium text-slate-900 dark:text-white"},"معرفی بخش نکات و توصیه",-1)),e("div",null,[t[18]||(t[18]=e("label",{class:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"عنوان بخش",-1)),i(e("input",{"onUpdate:modelValue":t[6]||(t[6]=a=>l(s).who_we_are_heading=a),type:"text",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,512),[[u,l(s).who_we_are_heading]])]),e("div",re,[(o(!0),d(f,null,U(l(s).who_we_are_paragraphs,(a,b)=>(o(),d("div",{key:b,class:"rounded-lg border border-slate-200 dark:border-slate-600 p-3 space-y-2"},[e("div",de,[e("span",oe,"پاراگراف "+m(b+1),1),l(s).who_we_are_paragraphs.length>
11?(o(),d("button",{key:0,type:"button",class:"text-xs text-red-600 hover:underline",onClick:r=>I(b)}," حذف ",8,ne)):x("",!0)]),C(j,{modelValue:l(s).who_we_are_paragraphs[b],"onUpdate:modelValue":r=>l(s).who_we_are_paragraphs[b]=r,"min-height":"120px"},null,8,["modelValue","onUpdate:modelValue"])]))),128)),e("button",{type:"button",class:"text-sm text-primary hover:underline",onClick:A}," + افزودن پاراگراف ")])]),e("div",ie,[t[23]||(t[23]=e("h2",{class:"text-lg font-medium text-slate-900 dark:text-white"},"خدمات نکات و توصیه",-1)),e("div",null,[t[20]||(t[20]=e("label",{class:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"عنوان بخش",-1)),i(e("input",{"onUpdate:modelValue":t[7]||(t[7]=a=>l(s).values_heading=a),type:"text",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,512),[[u,l(s).values_heading]])]),(o(!0),d(f,null,U(l(s).value_cards,(a,b)=>(o(),d("div",{key:b,class:"rounded-lg border border-slate-200 dark:border-slate-600 p-3 space-y-3"},[e("div",ue,[e("span",be,"کارت "+m(b+1),1),l(s).value_cards.length>1?(o(),d("button",{key:0,type:"button",class:"text-xs text-red-600 hover:underline",onClick:r=>S(b)}," حذف ",8,me)):x("",!0)]),e("div",pe,[e("div",null,[C(E,{modelValue:a.icon,"onUpdate:modelValue":r=>a.icon=r,label:"آیکون"},null,8,["modelValue","onUpdate:modelValue"])]),e("div",null,[t[21]||(t[21]=e("label",{class:"block text-xs text-slate-500 mb-1"},"عنوان",-1)),i(e("input",{"onUpdate:modelValue":r=>a.title=r,type:"text",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,8,xe),[[u,a.title]])])]),e("div",null,[t[22]||(t[22]=e("label",{class:"block text-xs text-slate-500 mb-1"},"متن",-1)),i(e("textarea",{"onUpdate:modelValue":r=>a.body=r,rows:"3",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,8,ge),[[u,a.body]])])]))),128)),e("button",{type:"button",class:"text-sm text-primary hover:underline",onClick:N}," + افزودن کارت ")]),e("div",ke,[t[28]||(t[28]=e("h2",{class:"text-lg font-medium text-slate-900 dark:text-white"},"لینک‌های سریع",-1)),e("div",null,[t[24]||(t[24]=e("label",{class:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"عنوان بخش",-1)),i(e("input",{"onUpdate:modelValue":t[8]||(t[8]=a=>l(s).quick_links_heading=a),type:"text",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,512),[[u,l(s).quick_links_heading]])]),e("div",null,[t[25]||(t[25]=e("label",{class:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"متن معرفی",-1)),i(e("textarea",{"onUpdate:modelValue":t[9]||(t[9]=a=>l(s).quick_links_intro=a),rows:"2",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,512),[[u,l(s).quick_links_intro]])]),(o(!0),d(f,null,U(l(s).quick_links,(a,b)=>(o(),d("div",{key:b,class:"rounded-lg border border-slate-200 dark:border-slate-600 p-3 space-y-3"},[e("div",ce,[e("span",ye,"لینک "+m(b+1),1),l(s).quick_links.length>1?(o(),d("button",{key:0,type:"button",class:"text-xs text-red-600 hover:underline",onClick:r=>D(b)}," حذف ",8,fe)):x("",!0)]),e("div",_e,[e("div",null,[t[26]||(t[26]=e("label",{class:"block text-xs text-slate-500 mb-1"},"برچسب",-1)),i(e("input",{"onUpdate:modelValue":r=>a.label=r,type:"text",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,8,ve),[[u,a.label]])]),e("div",null,[t[27]||(t[27]=e("label",{class:"block text-xs text-slate-500 mb-1"},"مسیر",-1)),i(e("input",{"onUpdate:modelValue":r=>a.path=r,type:"text",placeholder:"/qna",class:"w-full rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 px-3 py-2 text-sm"},null,8,we),[[u,a.path]])]),e("div",null,[C(E,{modelValue:a.icon,"onUpdate:modelValue":r=>a.icon=r,label:"آیکون"},null,8,["modelValue","onUpdate:modelValue"])])])]))),128)),e("button",{type:"button",class:"text-sm text-primary hover:underline",onClick:O}," + افزودن لینک ")]),l(v)("pages.irshad.manage")?(o(),d("button",{key:0,t
1ype:"submit",class:"px-4 py-2 rounded-lg bg-primary text-white text-sm font-medium hover:bg-primary/90 disabled:opacity-50",disabled:l(k)},m(l(k)?"در حال ذخیره...":"ذخیره تغییرات"),9,he)):x("",!0)],32)],64))])}}});export{Oe 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.