PageSourceSearch

https://atzuma.co.il/assets/ReportContentPage-CABWtAO3.js

js atzuma.co.il collected 2026-10-02 07:47:39 UTC 10,137 bytes, 2 lines download raw bytes

1import{j as e}from"./index-C_Fqshtm.js";import{a as _,r as l}from"./router-BXL9ASSk.js";import"./vendor-BNcAc9ko.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};o.SENTRY_RELEASE={id:"[email protected]"}}catch{}})();try{(function(){var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new o.Error().stack;r&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[r]="9428860d-983f-4d77-9899-22be293a1e13",o._sentryDebugIdIdentifier="sentry-dbid-9428860d-983f-4d77-9899-22be293a1e13")})()}catch{}const C=()=>{const o=_(),[r,x]=l.useState({petition_id:"",reporter_name:"",reporter_email:"",category:"",description:"",report_source:"report_page"}),[s,m]=l.useState({}),[p,h]=l.useState(!1),[g,d]=l.useState("idle"),[f,c]=l.useState(""),b=l.useRef(null);l.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]),l.useEffect(()=>{new URLSearchParams(o.search).get("petition_id")},[o]);const y=[{value:"",label:"בחרו קטגוריה"},{value:"spam_misleading",label:"ספאם/תוכן מטעה"},{value:"hate_speech",label:"דברי שטנה"},{value:"violence_threats",label:"אלימות/איומים"},{value:"false_information",label:"מידע כוזב"},{value:"copyright_violation",label:"הפרת זכויות יוצרים"},{value:"inappropriate_content",label:"תוכן לא מתאים"},{value:"other",label:"אחר"}],j=()=>{const t={};r.petition_id.trim()||(t.petition_id="כתובת העצומה נדרשת"),r.reporter_name.trim()?r.reporter_name.trim().length<2&&(t.reporter_name="השם חייב להכיל לפחות 2 תווים"):t.reporter_name="שם הוא שדה חובה";const i=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return r.reporter_email.trim()?i.test(r.reporter_email)||(t.reporter_email="נא להזין כתובת אימייל תקינה"):t.reporter_email="אימייל הוא שדה חובה",r.category||(t.category="נא לבחור קטגוריית דיווח"),r.description.trim()?r.description.trim().length<10?t.description="התיאור חייב להכיל לפחות 10 תווים":r.description.trim().length>5e3&&(t.description="התיאור לא יכול לעלות על 5000 תווים"):t.description="נא לתאר את הבעיה",m(t),Object.keys(t).length===0},n=t=>{const{name:i,value:a}=t.target;x(u=>({...u,[i]:a})),s[i]&&m(u=>({...u,[i]:void 0}))},v=async t=>{if(t.preventDefault(),!!j()){h(!0),d("idle"),c("");try{const a=await(await fetch("/api/v1/petition-reports",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)})).json();a.success?(d("success"),c(a.message||"תודה שעוזר לנו לשמור על הקהילה."),x({petition_id:"",reporter_name:"",reporter_email:"",category:"",description:"",report_source:"report_page"}),setTimeout(()=>{window.scrollTo({top:0,behavior:"smooth"})},100)):(d("error"),c(a.message||"שליחת הדיווח נכשלה. נא לנסות שוב."),a.errors&&m(a.errors))}catch(i){console.error("Report submission error:",i),d("error"),c("שגיאת רשת. נא לבדוק את החיבור ולנסות שוב.")}finally{h(!1)}}};return e.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"דיווח על תוכן"}),e.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto",children:"עזרו לנו לשמור על קהילה בטוחה ומכבדת על ידי דיווח על תוכן לא הולם."})]}),g==="success"&&e.jsx("div",{className:"mb-8 bg-green-50 border border-green-200 rounded-lg p-6",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("svg",{className:"h-5 w-5 text-green-400",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),e.jsxs("div",{className:"ml-3",children:[e.jsx("h3",{className:"text-sm font-medium text-green-800",children:"הדיווח נשלח בהצלחה"}),e.jsx("div",{className:"mt-2 text-sm text-green-700",children:e.jsx("p",{children:f})})]})]})}),g==="error"&&e.jsx("div",{className:"mb-8 bg-red-50 border border-red-200 rounded-lg p-6",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("svg",{className:"h-5 w-5 text-red-400",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),e.jsxs("div",{className:"ml-3",children:[e.jsx("h3",{className:"text-sm font-medium text-red-800",children:"שגיאה בשליחת הדיווח"}),e.jsx("div",{className:"mt-2 text-sm text-red-700",children:e.jsx("p",{children:f})})]})]})}),e.jsx("div",{className:"grid grid-cols-1 gap-8",children:e.jsx("div",{children:e.jsxs("div",{ref:b,className:"bg-white rounded-lg shadow-lg p-8",children:[e.jsx("h2",{className:"text-2xl font-semibold text-gray-800 mb
1-6",children:"שליחת דיווח"}),e.jsxs("form",{onSubmit:v,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"petition_id",className:"block text-sm font-medium text-gray-700 mb-2",children:"קישור לעצומה *"}),e.jsx("input",{type:"text",id:"petition_id",name:"petition_id",value:r.petition_id,onChange:n,className:`w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-colors ${s.petition_id?"border-red-500":"border-gray-300"}`,placeholder:"קישור מלא לעצומה (לדוגמה: https://atzuma.co.il/petition/123)"}),s.petition_id&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:s.petition_id}),e.jsxs("p",{className:"mt-1 text-sm text-gray-500",children:["העתק והדבק את קישור העצומה מסרגל הכתובות בדפדפן.",e.jsx("br",{}),e.jsx("code",{className:"text-xs bg-gray-100 px-1 py-0.5 rounded",children:"https://atzuma.co.il/sign/כותרת-עצומה-abc123"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"reporter_name",className:"block text-sm font-medium text-gray-700 mb-2",children:"שם מלא *"}),e.jsx("input",{type:"text",id:"reporter_name",name:"reporter_name",value:r.reporter_name,onChange:n,className:`w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-colors ${s.reporter_name?"border-red-500":"border-gray-300"}`,placeholder:"הכנס שם מלא"}),s.reporter_name&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:s.reporter_name})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"reporter_email",className:"block text-sm font-medium text-gray-700 mb-2",children:"כתובת אימייל *"}),e.jsx("input",{type:"email",id:"reporter_email",name:"reporter_email",value:r.reporter_email,onChange:n,className:`w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-colors ${s.reporter_email?"border-red-500":"border-gray-300"}`,placeholder:"הכנס כתובת אימייל"}),s.reporter_email&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:s.reporter_email}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"ייתכן שניצור איתך קשר לקבלת מידע נוסף."})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-700 mb-2",children:"קטגוריית הדיווח *"}),e.jsx("select",{id:"category",name:"category",value:r.category,onChange:n,className:`w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-colors ${s.category?"border-red-500":"border-gray-300"}`,children:y.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))}),s.category&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:s.category})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-2",children:"תיאור *"}),e.jsx("textarea",{id:"description",name:"description",value:r.description,onChange:n,rows:6,className:`w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-colors resize-vertical ${s.description?"border-red-500":"border-gray-300"}`,placeholder:"נא לספק תיאור מפורט של הבעיה. כללו דוגמאות ספציפיות אם אפשר."}),s.description&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:s.description}),e.jsxs("p",{className:"mt-1 text-sm text-gray-500",children:["תווים: ",r.description.length,"/5000"]})]}),e.jsx("div",{className:"pt-4",children:e.jsx("button",{type:"submit",disabled:p,className:`w-full flex justify-center py-3 px-6 border border-transparent rounded-lg text-white font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors ${p?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 focus:ring-red-500"}`,children:p?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"שליחת דיווח..."]}
1):"שליחת דיווח"})})]})]})})})]})})};export{C as default};
2//# sourceMappingURL=ReportContentPage-CABWtAO3.js.map

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.