mirror of
https://github.com/hanzobot/adnexus.git
synced 2026-10-30 19:44:10 +00:00
29 lines
7.2 KiB
JavaScript
29 lines
7.2 KiB
JavaScript
import{r as c,j as e}from"./ui-SA1K2VdO.js";import{B as b,F as v}from"./index-BBRaFEzF.js";import{I as o}from"./input-jTrHrzjY.js";import{L as l}from"./label-CXIJoLRr.js";import{b as j,L as x}from"./vendor-khT4bKqW.js";import{ah as N,h as w,ae as f,af as S,ag as C,z as A}from"./utils-BOogt4zp.js";const m=async s=>{console.log("📧 Email Notification Sent:"),console.log("To:",s.to.join(", ")),console.log("Subject:",s.subject),console.log("Body:",s.body),console.log("Type:",s.type),console.log("---");const t=JSON.parse(localStorage.getItem("emailNotifications")||"[]");t.push({...s,timestamp:new Date().toISOString()}),localStorage.setItem("emailNotifications",JSON.stringify(t))},$={newSignup:(s,t)=>{m({to:["[email protected]","[email protected]"],subject:"New User Signup - Adnexus Agency",body:`A new user has signed up:
|
|
|
|
Name: ${t}
|
|
Email: ${s}
|
|
Time: ${new Date().toLocaleString()}
|
|
|
|
Please log in to the admin dashboard to view details.`,type:"signup"})},creditsPurchased:(s,t,n)=>{m({to:["[email protected]","[email protected]"],subject:"New Credit Purchase - Adnexus Agency",body:`A user has purchased credits:
|
|
|
|
User: ${s}
|
|
Credits: ${t}
|
|
Amount: $${n}
|
|
Time: ${new Date().toLocaleString()}
|
|
|
|
Please log in to the admin dashboard to view details.`,type:"purchase"})},serviceRedeemed:(s,t,n)=>{m({to:["[email protected]","[email protected]"],subject:"Service Redeemed - Adnexus Agency",body:`A user has redeemed a service:
|
|
|
|
User: ${s}
|
|
Service: ${t}
|
|
Credits Used: ${n}
|
|
Time: ${new Date().toLocaleString()}
|
|
|
|
Please log in to the admin dashboard to view details.`,type:"redemption"})},serviceStarted:(s,t)=>{m({to:["[email protected]","[email protected]"],subject:"Service Started - Adnexus Agency",body:`A user has started their service:
|
|
|
|
User: ${s}
|
|
Service: ${t}
|
|
Time: ${new Date().toLocaleString()}
|
|
Status: Booking scheduled
|
|
|
|
Please log in to the admin dashboard to view details.`,type:"service_start"})}},T=()=>{const s=j(),[t,n]=c.useState(!1),[h,u]=c.useState(!1),[d,y]=c.useState(!1),[a,i]=c.useState({name:"",email:"",password:"",cardNumber:"",expiry:"",cvc:""}),p=async r=>{r.preventDefault(),u(!0),setTimeout(()=>{localStorage.setItem("authToken","demo-token"),localStorage.setItem("userEmail",a.email),localStorage.setItem("userName",a.name),localStorage.setItem("userCredits","0"),localStorage.setItem("hasPaymentMethod",d?"true":"false");const g=["[email protected]","[email protected]"].includes(a.email);localStorage.setItem("isAdmin",g.toString()),$.newSignup(a.email,a.name),s(g?"/admin":"/dashboard")},1e3)};return e.jsxs(e.Fragment,{children:[e.jsx("main",{className:"pt-32 pb-20 bg-black text-white min-h-screen",children:e.jsxs("div",{className:"container-custom max-w-md",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4",children:"Create Account"}),e.jsx("p",{className:"text-gray-400",children:"Join to start using our credit-based design services"})]}),e.jsx("form",{onSubmit:p,className:"space-y-6",children:e.jsxs("div",{className:"bg-gray-900/30 border border-gray-800 rounded-xl p-8",children:[e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx(l,{htmlFor:"name",className:"text-gray-300 mb-2 block",children:"Full Name"}),e.jsxs("div",{className:"relative",children:[e.jsx(o,{id:"name",type:"text",required:!0,value:a.name,onChange:r=>i({...a,name:r.target.value}),className:"bg-gray-900/50 border-gray-700 text-white pl-12 pr-4 py-3 rounded-lg w-full",placeholder:"John Doe"}),e.jsx(N,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-500"})]})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"email",className:"text-gray-300 mb-2 block",children:"Email Address"}),e.jsxs("div",{className:"relative",children:[e.jsx(o,{id:"email",type:"email",required:!0,value:a.email,onChange:r=>i({...a,email:r.target.value}),className:"bg-gray-900/50 border-gray-700 text-white pl-12 pr-4 py-3 rounded-lg w-full",placeholder:"[email protected]"}),e.jsx(w,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-500"})]})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"password",className:"text-gray-300 mb-2 block",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(o,{id:"password",type:t?"text":"password",required:!0,value:a.password,onChange:r=>i({...a,password:r.target.value}),className:"bg-gray-900/50 border-gray-700 text-white pl-12 pr-12 py-3 rounded-lg w-full",placeholder:"••••••••",minLength:8}),e.jsx(f,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-500"}),e.jsx("button",{type:"button",onClick:()=>n(!t),className:"absolute right-4 top-1/2 -translate-y-1/2 text-gray-500 hover:text-white transition-colors",children:t?e.jsx(S,{className:"h-5 w-5"}):e.jsx(C,{className:"h-5 w-5"})})]}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Minimum 8 characters"})]}),e.jsxs("div",{className:"pt-4 border-t border-gray-800",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx(l,{className:"text-gray-300",children:"Payment Method (Optional)"}),e.jsx("button",{type:"button",onClick:()=>y(!d),className:"text-sm text-white hover:text-gray-300",children:d?"Remove":"Add Card"})]}),d&&e.jsxs("div",{className:"space-y-4 p-4 bg-gray-900/50 rounded-lg",children:[e.jsx("p",{className:"text-sm text-gray-400 mb-3",children:"Add a card now to purchase credits later"}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"cardNumber",className:"sr-only",children:"Card Number"}),e.jsxs("div",{className:"relative",children:[e.jsx(o,{id:"cardNumber",type:"text",value:a.cardNumber,onChange:r=>i({...a,cardNumber:r.target.value}),className:"bg-gray-800/50 border-gray-700 text-white pl-12 pr-4 py-3 rounded-lg w-full",placeholder:"1234 5678 9012 3456"}),e.jsx(A,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-500"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(l,{htmlFor:"expiry",className:"sr-only",children:"Expiry"}),e.jsx(o,{id:"expiry",type:"text",value:a.expiry,onChange:r=>i({...a,expiry:r.target.value}),className:"bg-gray-800/50 border-gray-700 text-white px-4 py-3 rounded-lg",placeholder:"MM/YY"})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"cvc",className:"sr-only",children:"CVC"}),e.jsx(o,{id:"cvc",type:"text",value:a.cvc,onChange:r=>i({...a,cvc:r.target.value}),className:"bg-gray-800/50 border-gray-700 text-white px-4 py-3 rounded-lg",placeholder:"CVC"})]})]})]})]}),e.jsxs("div",{className:"flex items-start space-x-2",children:[e.jsx("input",{type:"checkbox",required:!0,className:"rounded border-gray-700 bg-gray-900/50 text-white focus:ring-white mt-1"}),e.jsxs("label",{className:"text-sm text-gray-400",children:["I agree to the"," ",e.jsx(x,{to:"/terms",className:"text-white hover:text-gray-300",children:"Terms of Service"})," ","and"," ",e.jsx(x,{to:"/privacy",className:"text-white hover:text-gray-300",children:"Privacy Policy"})]})]})]}),e.jsx(b,{type:"submit",disabled:h,className:"w-full bg-white hover:bg-gray-100 text-black py-3 text-lg font-semibold rounded-lg transition-colors mt-8",children:h?"Creating account...":"Create Account"}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-gray-400",children:["Already have an account?"," ",e.jsx(x,{to:"/login",className:"text-white hover:text-gray-300",children:"Sign in"})]})})]})})]})}),e.jsx(v,{})]})};export{T as default};
|