PageSourceSearch

https://escortadvisor-b4fe68rl.manus.space/assets/ForumCategory-C3ZnhNFd.js

js escortadvisor-b4fe68rl.manus.space collected 2026-10-03 05:02:43 UTC 13,059 bytes, 1 lines download raw bytes

1import{Q as X,r as n,t as g,q as o,a as Z,I as ee,j as e,N as te,L as C,E as I,ao as se,b6 as ie,B as r,aU as ne,ap as ae,b7 as oe,b8 as re,ac as N,w as M,as as F,ax as q,aw as le,Y as ce,a8 as de,F as xe}from"./index-cscxoOf9.js";import{L as me}from"./lock-7nE03dXu.js";import{P as he}from"./pin-CZy0fqey.js";import{T as ue}from"./thumbs-up-CUW1KD7P.js";import{R as Q}from"./reply-WmfrflJ5.js";import{f as pe,i as fe}from"./it-DRU4lADs.js";function ye({params:l}){const[,O]=X(),[x,k]=n.useState(1),[U,T]=n.useState(!1),[b,D]=n.useState(""),[m,S]=n.useState(""),[A,B]=n.useState(""),[h,E]=n.useState("discussion"),{data:s}=g.forum.getCategoryBySlug.useQuery({slug:l.slug}),{data:u,isLoading:H,refetch:J}=g.forum.getThreads.useQuery({categoryId:s?.id??0,page:x},{enabled:!!s?.id}),j=g.forum.createThread.useMutation({onSuccess:t=>{o.success("Thread creato!"),T(!1),D(""),S(""),B(""),O(`/forum/thread/${t.id}`)},onError:()=>o.error("Errore nella creazione del thread")}),_=()=>{if(!b.trim()||!m.trim())return o.error("Titolo e contenuto sono obbligatori");s?.id&&j.mutate({categoryId:s.id,title:b.trim(),content:m.trim(),authorNick:A.trim()||void 0,threadType:h})},p=u?Math.ceil(u.total/20):1,[L,w]=n.useState(null),[c,f]=n.useState(""),[P,R]=n.useState(""),$=n.useRef(null),v=g.forum.createPost.useMutation({onSuccess:()=>{o.success("Risposta pubblicata!"),w(null),f(""),R(""),J()},onError:()=>o.error("Errore nella pubblicazione della risposta")}),W=t=>{if(!c.trim())return o.error("Scrivi un messaggio prima di inviare");v.mutate({threadId:t,content:c.trim(),authorNick:P.trim()||void 0})},Y=t=>{w(i=>i===t?null:t),f(""),setTimeout(()=>$.current?.focus(),100)};Z(`/forum/${l.slug}`);const G=s?{"@context":"https://schema.org","@type":"DiscussionForum",name:`${s.name} — Forum EscortAnnunci`,description:s.description??`Discussioni nella categoria ${s.name} del forum EscortAnnunci.`,url:`https://escortannunci.me/forum/${l.slug}`,inLanguage:"it",isPartOf:{"@type":"WebSite",name:"EscortAnnunci",url:"https://escortannunci.me"}}:null;return ee("forum-category-jsonld",G),n.useEffect(()=>{if(!s)return;const t=`${s.name} — Forum Escort Italia | EscortAnnunci`,i=s.description?`${s.description} Partecipa alle discussioni, leggi esperienze e condividi consigli nel forum EscortAnnunci.`:`Discussioni nella categoria ${s.name}. Forum anonimo dedicato alle escort in Italia.`;document.title=t;const a=(z,K,V)=>{let d=document.querySelector(z);if(!d){d=document.createElement("meta");const y=z.match(/\[([^=]+)="([^"]+)"\]/);y&&d.setAttribute(y[1],y[2]),document.head.appendChild(d)}d.setAttribute(K,V)};return a('meta[name="description"]',"content",i.slice(0,160)),a('meta[property="og:title"]',"content",t),a('meta[property="og:description"]',"content",i.slice(0,160)),a('meta[property="og:url"]',"content",`https://escortannunci.me/forum/${l.slug}`),a('meta[property="og:type"]',"content","website"),a('meta[property="og:site_name"]',"content","EscortAnnunci Forum"),a('meta[name="twitter:card"]',"content","summary"),a('meta[name="twitter:title"]',"content",t),a('meta[name="twitter:description"]',"content",i.slice(0,160)),()=>{document.title="EscortAnnunci — Le Migliori Escort in Italia",document.querySelector('meta[name="description"]')?.remove()}},[s,l.slug]),e.jsxs("div",{className:"min-h-screen bg-[#0a0a14] pb-nav pt-[94px]",children:[e.jsx(te,{}),e.jsx("section",{className:"pt-[135px] md:pt-24 pb-8 border-b border-white/5",children:e.jsxs("div",{className:"container",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-white/40 font-['Nunito'] mb-4",children:[e.jsx(C,{href:"/forum",className:"hover:text-white/70 transition-colors",children:"Forum"}),e.jsx(I,{className:"w-3 h-3"}),e.jsx("span",{className:"text-white/70",children:s?.name??"..."})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:`w-14 h-14 rounded-2xl bg-gradient-to-br ${s?.color??"from-[#2F7F88]/20 to-[#246068]/10 border-[#2F7F88]/20"} flex items-center justify-center text-2xl`,children:s?.icon??"💬"}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-['Nunito'] font-bold text-2xl text-white",children:s?.name??"Caricamento..."}),e.jsx("p",{className:"text-sm text-white/40 font-['Nunito']",children:s?.description})]})]}),e.jsxs(se,{open:U,onOpenChange:T,children:[e.jsx(ie,{asChild:!0,children:e.jsxs(r,{className:"bg-gradient-to-r from-[#2F7F88] to-[#7A3060] hover:from-[#5BBAC5] hover:to-[#07793e] text-white border-0 font-['Nunito'] font-bold rounded-xl gap-2",children:[e.jsx(ne,{className:"w-4 h-4"}),"Nuovo Thread"]})}),e.jsxs(ae,{className:"bg-[#111118] border-white/10 text-white max-w-lg",children:[e.jsx(oe,{children:e.jsx(re,{className:"font-['Nunito'] text-white",children:"Crea nuovo thread"})}
1),e.jsxs("div",{className:"space-y-4 mt-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-white/50 font-['Nunito'] mb-2 block",children:"Tipo di contributo"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>E("discussion"),className:`flex flex-col items-center gap-1.5 p-3 rounded-xl border transition-all ${h==="discussion"?"bg-[#2F7F88]/20 border-[#2F7F88]/40 text-[#7DCDD6]":"bg-[#0f1117]/5 border-white/10 text-white/50 hover:border-white/20"}`,children:[e.jsx(N,{className:"w-4 h-4"}),e.jsx("span",{className:"text-xs font-['Nunito'] font-semibold",children:"Discussione"}),e.jsx("span",{className:"text-[10px] font-['Nunito'] opacity-70",children:"Libera e aperta"})]}),e.jsxs("button",{type:"button",onClick:()=>E("review"),className:`flex flex-col items-center gap-1.5 p-3 rounded-xl border transition-all ${h==="review"?"bg-[#C28B2C]/20 border-[#C28B2C]/40 text-[#D9A84A]":"bg-[#0f1117]/5 border-white/10 text-white/50 hover:border-white/20"}`,children:[e.jsx(M,{className:"w-4 h-4"}),e.jsx("span",{className:"text-xs font-['Nunito'] font-semibold",children:"Recensione"}),e.jsx("span",{className:"text-[10px] font-['Nunito'] opacity-70",children:"Strutturata e moderata"})]})]}),h==="review"&&e.jsxs("p",{className:"text-xs text-[#C28B2C]/70 font-['Nunito'] mt-2 flex items-start gap-1",children:[e.jsx("span",{className:"mt-0.5",children:"ℹ"}),"Le recensioni seguono un formato strutturato e vengono moderate prima della pubblicazione."]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-white/50 font-['Nunito'] mb-1 block",children:"Nickname (opzionale)"}),e.jsx(F,{placeholder:"Anonimo",value:A,onChange:t=>B(t.target.value),maxLength:50,className:"bg-[#0f1117]/5 border-white/10 text-white placeholder:text-white/30 font-['Nunito']"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-white/50 font-['Nunito'] mb-1 block",children:"Titolo *"}),e.jsx(F,{placeholder:"Titolo del thread...",value:b,onChange:t=>D(t.target.value),maxLength:200,className:"bg-[#0f1117]/5 border-white/10 text-white placeholder:text-white/30 font-['Nunito']"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-white/50 font-['Nunito'] mb-1 block",children:"Contenuto *"}),e.jsx(q,{placeholder:"Scrivi il tuo messaggio...",value:m,onChange:t=>S(t.target.value),maxLength:5e3,rows:6,className:"bg-[#0f1117]/5 border-white/10 text-white placeholder:text-white/30 font-['Nunito'] resize-none"}),e.jsxs("div",{className:"text-xs text-white/30 text-right mt-1",children:[m.length,"/5000"]})]}),e.jsx(r,{onClick:_,disabled:j.isPending,className:"w-full bg-gradient-to-r from-[#2F7F88] to-[#7A3060] hover:from-[#5BBAC5] hover:to-[#07793e] text-white border-0 font-['Nunito'] font-bold",children:j.isPending?"Pubblicazione...":"Pubblica Thread"})]})]})]})]})]})}),e.jsxs("section",{className:"container py-8",children:[H?e.jsx("div",{className:"space-y-2",children:[...Array(8)].map((t,i)=>e.jsx("div",{className:"h-20 bg-[#0f1117]/5 rounded-xl animate-pulse"},i))}):u?.threads.length?e.jsx("div",{className:"space-y-2",children:u.threads.map(t=>e.jsxs("div",{className:"rounded-xl overflow-hidden border border-white/8 hover:border-white/15 transition-all",children:[e.jsxs("div",{className:"group flex items-start gap-4 bg-[#191D22] hover:bg-[#1F2328] p-4 transition-all",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-[#2F7F88]/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:t.isLocked?e.jsx(me,{className:"w-4 h-4 text-white/30"}):e.jsx(N,{className:"w-4 h-4 text-[#5BBAC5]"})}),e.jsxs(C,{href:`/forum/thread/${t.id}`,className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[t.isPinned&&e.jsx(he,{className:"w-3 h-3 text-[#C28B2C] flex-shrink-0"}),t.threadType==="review"&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded-md bg-[#C28B2C]/15 border border-[#C28B2C]/20 text-[#C28B2C] text-[10px] font-['Nunito'] font-semibold flex-shrink-0",children:[e.jsx(M,{className:"w-2.5 h-2.5"}),"Rec."]}),t.isHighlighted&&e.jsx("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded-md bg-[#2F7F88]/15 border border-[#2F7F88]/20 text-[#5BBAC5] text-[10px] font-['Nunito'] font-semibold flex-shrink-0",children:"★ Top"}),e.jsx("h3",{className:"font-['Nunito'] font-semibold text-white group-hover:text-[#7DCDD6] transition-colors truncate",children:t.title})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-white/40 font-['Nunito']",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(le,{className:"w-3 h-3"}),t.authorNick]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ce,{className:"w-3 h-3"}),pe(new Date(t.createdAt),{addSuffix:!0,locale:fe})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsxs("div",{className:"hidden sm:flex items-center gap-4 text-xs text-white/40 font-['Nunito']",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(N,{className:"w-3 h-3"}),t.replyCount]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(de,{className:"w-3 h-3"}),t.viewCount]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ue,{className:"w-3 h-3"}),t.upvotes]})]}),!t.isLocked&&e.jsxs("button",{type:"button",onClick:()=>Y(t.id),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-['Nunito'] font-semibold transition-all ${L===t.id?"bg-[#2F7F88]/30 text-[#7DCDD6] border border-[#2F7F88]/40":"bg-[#0f1117]/5 hover:bg-[#2F7F88]/15 text-white/50 hover:text-[#7DCDD6] border border-white/10 hover:border-[#2F7F88]/30"}`,children:[e.jsx(Q,{className:"w-3.5 h-3.5"}),"Rispondi"]}),e.jsx(C,{href:`/forum/thread/${t.id}`,children:e.jsx(I,{className:"w-4 h-4 text-white/20 hover:text-white/60 flex-shrink-0 transition-colors"})})]})]}),L===t.id&&e.jsxs("div",{className:"bg-[#141719] border-t border-[#2F7F88]/20 p-4 space-y-3",children:[e.jsxs("p",{className:"text-xs text-[#5BBAC5] font-['Nunito'] font-semibold flex items-center gap-1.5",children:[e.jsx(Q,{className:"w-3.5 h-3.5"}),"Rispondi a: ",e.jsx("span",{className:"text-white/70 truncate max-w-[200px]",children:t.title})]}),e.jsx(F,{placeholder:"Nickname (opzionale)",value:P,onChange:i=>R(i.target.value),maxLength:50,className:"bg-[#0f1117]/5 border-white/10 text-white placeholder:text-white/30 font-['Nunito'] text-sm h-9"}),e.jsx(q,{ref:$,placeholder:"Scrivi la tua risposta...",value:c,onChange:i=>f(i.target.value),maxLength:5e3,rows:3,className:"bg-[#0f1117]/5 border-white/10 text-white placeholder:text-white/30 font-['Nunito'] text-sm resize-none"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs text-white/30 font-['Nunito']",children:[c.length,"/5000"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(r,{variant:"ghost",size:"sm",onClick:()=>{w(null),f("")},className:"text-white/40 hover:text-white/70 font-['Nunito'] text-xs",children:"Annulla"}),e.jsx(r,{size:"sm",onClick:()=>W(t.id),disabled:v.isPending||!c.trim(),className:"bg-gradient-to-r from-[#2F7F88] to-[#7A3060] hover:from-[#5BBAC5] hover:to-[#07793e] text-white border-0 font-['Nunito'] font-bold text-xs",children:v.isPending?"Invio...":"Pubblica risposta"})]})]})]})]},t.id))}):e.jsxs("div",{className:"text-center py-20",children:[e.jsx(N,{className:"w-12 h-12 text-white/20 mx-auto mb-4"}),e.jsx("p",{className:"text-white/40 font-['Nunito']",children:"Nessun thread ancora. Sii il primo a scrivere!"})]}),p>1&&e.jsxs("div",{className:"flex items-center justify-center gap-2 mt-8",children:[e.jsx(r,{variant:"outline",size:"sm",onClick:()=>k(t=>Math.max(1,t-1)),disabled:x===1,className:"border-white/10 text-white/60 hover:text-white font-['Nunito']",children:"Precedente"}),e.jsxs("span",{className:"text-sm text-white/40 font-['Nunito']",children:["Pagina ",x," di ",p]}),e.jsx(r,{variant:"outline",size:"sm",onClick:()=>k(t=>Math.min(p,t+1)),disabled:x===p,className:"border-white/10 text-white/60 hover:text-white font-['Nunito']",children:"Successiva"})]})]}),e.jsx(xe,{})]})}
1export{ye 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.