PageSourceSearch

https://havis.ai/build/assets/EditTerms-Bu4Pz67h.js

js havis.ai collected 2026-10-05 15:37:09 UTC 7,394 bytes, 2 lines download raw bytes

1import{r as m,j as e,H as T,a as C}from"./app-DkzgWy36.js";import{A}from"./AdminLayout-D8UZocet.js";import{n as g}from"./index-KDvjrFIN.js";import"./ThemeToggle-DiXnFyet.js";import"./BrandIcons-C0HLJ6Sw.js";import"./use-text-value-DskAX54E.js";import"./portal-ZvTLHscc.js";import"./transition-CTy_Zjl2.js";import"./dialog--qJ_JiWV.js";import"./formatCredits-YnkQjvaJ.js";const u=t=>e.jsx("input",{...t,className:`w-full bg-slate-50 dark:bg-[#0f0e0d] border border-slate-200 dark:border-white/10 rounded-lg px-3 py-2 text-slate-900 dark:text-white text-sm focus:ring-2 focus:ring-primary focus:border-transparent transition-colors ${t.className||""}`}),v=t=>e.jsx("textarea",{...t,className:`w-full bg-slate-50 dark:bg-[#0f0e0d] border border-slate-200 dark:border-white/10 rounded-lg px-3 py-2 text-slate-900 dark:text-white text-sm focus:ring-2 focus:ring-primary focus:border-transparent transition-colors resize-none ${t.className||""}`}),j=({icon:t,title:r,children:o})=>e.jsxs("div",{className:"bg-white dark:bg-[#181410] rounded-2xl border border-slate-200 dark:border-white/10 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-6 py-4 border-b border-slate-100 dark:border-white/5 bg-primary/5",children:[e.jsx("span",{className:"material-symbols-outlined text-primary text-[20px]",children:t}),e.jsx("h3",{className:"text-sm font-bold text-slate-900 dark:text-white uppercase tracking-wider",children:r})]}),e.jsx("div",{className:"p-6 space-y-4",children:o})]}),n=({children:t})=>e.jsx("label",{className:"block text-xs font-semibold text-slate-500 dark:text-white/50 uppercase tracking-wider mb-1",children:t}),E=[["Acceptance of Terms","By accessing or using our platform, you agree to be bound by these Terms of Service. If you do not agree to these terms, please do not use our services."],["Use of Services","You may use our services only for lawful purposes and in accordance with these terms. You agree not to use our services in any way that violates applicable laws or regulations."],["Account Registration","To access certain features, you must create an account. You are responsible for maintaining the confidentiality of your account credentials and all activities under your account."],["Intellectual Property","The content, features, and functionality of our services are owned by us and are protected by intellectual property laws. AI-generated content created by you belongs to you, subject to our usage policies."],["Prohibited Uses","You may not use our services to generate harmful, illegal, or deceptive content. We reserve the right to terminate access for violations of these policies."],["Payment Terms","Paid subscriptions are billed in advance and are non-refundable except as provided in our refund policy. We reserve the right to change pricing with 30 days notice."],["Limitation of Liability","We shall not be liable for any indirect, incidental, or consequential damages arising from your use of our services."],["Governing Law","These terms are governed by applicable law. Any disputes shall be resolved in the competent courts."]].map(([t,r])=>({title:t,body:r}));function W({page:t}){const r=(t==null?void 0:t.content)||{},[o,w]=m.useState({label:r.label||"Last updated: March 2026",title:r.title||"Terms of Service",desc:r.desc||"Please read these terms carefully before using our services."}),[p,c]=m.useState(Array.isArray(r.sections)&&r.sections.length>0?r.sections:E),[l,b]=m.useState(!1),d=(s,a)=>w(i=>({...i,[s]:a})),h=(s,a,i)=>{c(x=>x.map((f,S)=>S===s?{...f,[a]:i}:f))},N=()=>c(s=>[...s,{title:"New Section",body:""}]),k=s=>c(a=>a.filter((i,x)=>x!==s)),y=()=>{b(!0),C.patch(route("manager.pages.update",t.id),{title:t.title,slug:"terms",status:"published",content:{...r,...o,sections:p,page_type:"terms"}},{onSuccess:()=>g.success("Terms page saved!"),onError:()=>g.error("Save failed."),onFinish:()=>b(!1)})};return e.jsxs(A,{children:[e.jsx(T,{title:"Edit Terms of Service"}),e.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-8 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("a",{href:route("manager.pages.index"),className:"size-9 flex items-center justify-center rounded-xl bg-slate-100 dar
1k:bg-white/10 hover:bg-primary/10 hover:text-primary transition-colors",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"arrow_back"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-bold text-slate-900 dark:text-white",children:"Edit Terms of Service"}),e.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"Header & content sections"})]})]}),e.jsxs("button",{onClick:y,disabled:l,className:"flex items-center gap-2 px-5 py-2.5 bg-primary hover:bg-primary/90 text-black text-sm font-bold rounded-xl transition-all disabled:opacity-60",children:[l?e.jsx("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"save"}),"Save"]})]}),e.jsxs(j,{icon:"title",title:"Page Header",children:[e.jsxs("div",{children:[e.jsx(n,{children:"Badge / Date Label"}),e.jsx(u,{value:o.label,onChange:s=>d("label",s.target.value)})]}),e.jsxs("div",{children:[e.jsx(n,{children:"Title"}),e.jsx(u,{value:o.title,onChange:s=>d("title",s.target.value)})]}),e.jsxs("div",{children:[e.jsx(n,{children:"Description"}),e.jsx(v,{rows:2,value:o.desc,onChange:s=>d("desc",s.target.value)})]})]}),e.jsx(j,{icon:"gavel",title:"Content Sections",children:e.jsxs("div",{className:"space-y-4",children:[p.map((s,a)=>e.jsxs("div",{className:"rounded-xl border border-slate-200 dark:border-white/10 p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"size-6 rounded-md bg-primary flex items-center justify-center text-xs font-black text-black",children:a+1}),e.jsx("button",{onClick:()=>k(a),className:"size-7 flex items-center justify-center rounded-lg text-slate-400 hover:text-red-500 hover:bg-red-500/10 transition-colors",children:e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"delete"})})]}),e.jsxs("div",{children:[e.jsx(n,{children:"Section Title"}),e.jsx(u,{value:s.title,onChange:i=>h(a,"title",i.target.value)})]}),e.jsxs("div",{children:[e.jsx(n,{children:"Content"}),e.jsx(v,{rows:4,value:s.body,onChange:i=>h(a,"body",i.target.value)})]})]},a)),e.jsxs("button",{onClick:N,className:"w-full flex items-center justify-center gap-2 py-3 border-2 border-dashed border-slate-300 dark:border-white/10 rounded-xl text-sm text-slate-500 dark:text-white/50 hover:border-primary hover:text-primary transition-colors",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"add"}),"Add Section"]})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:y,disabled:l,className:"flex items-center gap-2 px-6 py-3 bg-primary hover:bg-primary/90 text-black font-bold rounded-xl transition-all disabled:opacity-60",children:[l?e.jsx("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"save"}),"Save Changes"]})})]})]})}export{W as default};
2//# sourceMappingURL=EditTerms-Bu4Pz67h.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.