PageSourceSearch

https://redgo.in/assets/js/LoginSetup-BKFSCIsj.js

js redgo.in collected 2026-10-02 01:58:35 UTC 14,956 bytes, 1 lines download raw bytes

1import{r as l,j as e}from"./index-CAG7YFZd.js";import{D as I,a as F,d as q,b as G}from"./dialog-GAffG_et.js";import{M as H}from"./monitor-4wdtvLtt.js";import{I as h}from"./info-D5gXA3ZG.js";import{S}from"./settings-Dn_VLM_1.js";import{A as c}from"./arrow-up-down-CvQMiJ_L.js";import{E as Y}from"./external-link-DwrQ4HQC.js";import{S as _}from"./square-pen-CEf7Xw1F.js";import{C as z}from"./copy-XdsshWYo.js";import{C as B}from"./columns-2-BgxSlXJz.js";import{C as J}from"./check-ww-GHu8x.js";import"./index-QHXycSr2.js";import"./index-CBAjRXir.js";import"./index-r6P5ANRq.js";import"./index-Cf6hN_Fs.js";import"./tslib.es6-CwyXKlH1.js";import"./index-gW1jScX8.js";import"./x-BCVCJpKG.js";const L=[{id:1,panelName:"Admin Panel",loginUrl:"https://admin.stackfood.com/login",status:"active"},{id:2,panelName:"Restaurant Panel",loginUrl:"https://restaurant.stackfood.com/login",status:"active"},{id:3,panelName:"Deliveryman Panel",loginUrl:"https://delivery.stackfood.com/login",status:"active"},{id:4,panelName:"Customer Panel",loginUrl:"https://app.stackfood.com/login",status:"active"}];function ge(){const[n,p]=l.useState("customer-login"),[d,u]=l.useState({manualLogin:!0,otpLogin:!0,socialMediaLogin:!0}),[m,b]=l.useState({google:!0,facebook:!1,apple:!1}),[x,f]=l.useState({emailVerification:!0,phoneVerification:!0}),[j,N]=l.useState(L),[w,r]=l.useState(null),[v,o]=l.useState(""),[P,g]=l.useState(!1),[a,y]=l.useState({si:!0,panelName:!0,loginUrl:!0,status:!0,actions:!0}),k=s=>{u(t=>({...t,[s]:!t[s]}))},C=s=>{b(t=>({...t,[s]:!t[s]}))},U=s=>{f(t=>({...t,[s]:!t[s]}))},R=s=>{s.preventDefault(),alert("Settings saved successfully!")},V=()=>{n==="customer-login"?(u({manualLogin:!0,otpLogin:!0,socialMediaLogin:!0}),b({google:!0,facebook:!1,apple:!1}),f({emailVerification:!0,phoneVerification:!0})):(N(L),r(null),o(""))},E=s=>{navigator.clipboard.writeText(s),alert("URL copied to clipboard!")},M=(s,t)=>{r(s),o(t)},T=s=>{N(t=>t.map(i=>i.id===s?{...i,loginUrl:v}:i)),r(null),o("")},$=()=>{r(null),o("")},O=s=>{y(t=>({...t,[s]:!t[s]}))},A=()=>{y({si:!0,panelName:!0,loginUrl:!0,status:!0,actions:!0})},D={si:"Serial Number",panelName:"Panel Name",loginUrl:"Login Page URL",status:"Status",actions:"Actions"};return e.jsxs("div",{className:"p-4 lg:p-6 bg-slate-50 min-h-screen",children:[e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("div",{className:"bg-white rounded-xl shadow-sm border border-slate-200 p-6 mb-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-orange-400 to-orange-600 flex items-center justify-center",children:e.jsx(H,{className:"w-5 h-5 text-white"})}),e.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Login Setup"})]})}),e.jsx("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-2 mb-6",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>p("customer-login"),className:`px-4 py-2 rounded-lg text-sm font-medium transition-colors ${n==="customer-login"?"bg-orange-500 text-white":"text-slate-600 hover:bg-slate-100"}`,children:"Customer Login"}),e.jsx("button",{onClick:()=>p("panel-login"),className:`px-4 py-2 rounded-lg text-sm font-medium transition-colors ${n==="panel-login"?"bg-orange-500 text-white":"text-slate-600 hover:bg-slate-100"}`,children:"Panel login page Url"})]})}),n==="customer-login"&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:[e.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"The option you select customer will have the option to login"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{key:"manualLogin",label:"Manual Login",icon:"??"},{key:"otpLogin",label:"OTP Login",icon:"??"},{key:"socialMediaLogin",label:"Social Media Login",icon:"??"}].map(s=>e.jsx("div",{onClick:()=>k(s.key),className:`border-2 rounded-lg p-4 cursor-pointer transition-all ${d[s.key]?"border-orange-500 bg-orange-50":"border-slate-200 bg-white hover:border-slate-300"}`,children:e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:s.icon}),e.jsx("span",{className:"text-sm font-semibold text-slate-700",children:s.label})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),k(s.key)},className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-offset-2 ${d[s.key]?"bg-orange-500":"bg-slate-300"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${d[s.key]?"translate-x-6":"translate-x-1"}`})}),e.jsx(h,{className:"w-4 h-4 text-slate-400 cursor-help",title:"Toggle this option"})]})]})},s.key))})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:[e.jsx("p",{className:"text-sm text-slate-600 mb-4",children:e.jsx("a",{href:"#",className:"text-orange-500 hover:text-orange-600 hover:underline",children:"Connect 3rd party login system from here"})}),e.jsxs("div",{className:"mb-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-slate-700 mb-3",children:"Choose social media"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{key:"google",label:"Google",icon:"??",color:"blue"},{key:"facebook",label:"Facebook",icon:"??",color:"blue"},{key:"apple",label:"Apple",icon:"?",color:"black"}].map(s=>e.jsx("div",{onClick:()=>C(s.key),className:`border-2 rounded-lg p-4 cursor-pointer transition-all ${m[s.key]?"border-orange-500 bg-orange-50":"border-slate-200 bg-white hover:border-slate-300"}`,children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:s.icon}),e.jsx("span",{className:"text-sm font-semibold text-slate-700",children:s.label})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),C(s.key)},className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-offset-2 ${m[s.key]?"bg-orange-500":"bg-slate-300"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${m[s.key]?"translate-x-6":"translate-x-1"}`})}),e.jsx(h,{className:"w-4 h-4 text-slate-400 cursor-help",title:"Toggle this option"})]})]})},s.key))})]})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:[e.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"The option you select from below will need to verify by customer from customer app/website."}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[{key:"emailVerification",label:"Email Verification",icon:"??"},{key:"phoneVerification",label:"Phone Number Verification",icon:"??"}].map(s=>e.jsx("div",{onClick:()=>U(s.key),className:`border-2 rounded-lg p-4 cursor-pointer transition-all ${x[s.key]?"border-orange-500 bg-orange-50":"border-slate-200 bg-white hover:border-slate-300"}`,children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:s.icon}),e.jsx("span",{className:"text-sm font-semibold text-slate-700",children:s.label})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),U(s.key)},className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-offset-2 ${x[s.key]?"bg-orange-500":"bg-slate-300"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${x[s.key]?"translate-x-6":"translate-x-1"}`})}),e.jsx(h,{className:"w-4 h-4 text-slate-400 cursor-help",title:"Toggle this option"})]})]})},s.key))})]})]}),n==="panel-login"&&e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-6",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("p",{className:"text-sm text-slate-600",children:"Manage login page URLs for different panels. You can edit and copy the URLs as 
1needed."}),e.jsx("button",{onClick:()=>g(!0),className:"p-2.5 rounded-lg border border-slate-300 bg-white hover:bg-slate-50 text-slate-700 transition-all",children:e.jsx(S,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:e.jsxs("tr",{children:[a.si&&e.jsx("th",{className:"px-6 py-4 text-left text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:"SI"}),e.jsx(c,{className:"w-3 h-3 text-slate-400 cursor-pointer hover:text-slate-600"})]})}),a.panelName&&e.jsx("th",{className:"px-6 py-4 text-left text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:"Panel Name"}),e.jsx(c,{className:"w-3 h-3 text-slate-400 cursor-pointer hover:text-slate-600"})]})}),a.loginUrl&&e.jsx("th",{className:"px-6 py-4 text-left text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:"Login Page URL"}),e.jsx(c,{className:"w-3 h-3 text-slate-400 cursor-pointer hover:text-slate-600"})]})}),a.status&&e.jsx("th",{className:"px-6 py-4 text-left text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:"Status"}),e.jsx(c,{className:"w-3 h-3 text-slate-400 cursor-pointer hover:text-slate-600"})]})}),a.actions&&e.jsx("th",{className:"px-6 py-4 text-center text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:"Action"})]})}),e.jsx("tbody",{className:"bg-white divide-y divide-slate-100",children:j.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:Object.values(a).filter(s=>s).length,className:"px-6 py-8 text-center text-slate-500",children:"No panels found"})}):j.map((s,t)=>e.jsxs("tr",{className:"hover:bg-slate-50 transition-colors",children:[a.si&&e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:"text-sm font-medium text-slate-700",children:t+1})}),a.panelName&&e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:"text-sm font-medium text-slate-900",children:s.panelName})}),a.loginUrl&&e.jsx("td",{className:"px-6 py-4",children:w===s.id?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"text",value:v,onChange:i=>o(i.target.value),className:"flex-1 px-3 py-2 text-sm border border-slate-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-orange-500",placeholder:"Enter login URL"}),e.jsx("button",{onClick:()=>T(s.id),className:"px-3 py-2 text-sm bg-orange-500 text-white rounded-lg hover:bg-orange-600 transition-colors",children:"Save"}),e.jsx("button",{onClick:$,className:"px-3 py-2 text-sm bg-slate-200 text-slate-700 rounded-lg hover:bg-slate-300 transition-colors",children:"Cancel"})]}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-slate-600 break-all",children:s.loginUrl}),e.jsx("a",{href:s.loginUrl,target:"_blank",rel:"noopener noreferrer",className:"text-orange-500 hover:text-orange-600",title:"Open in new tab",children:e.jsx(Y,{className:"w-4 h-4"})})]})}),a.status&&e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:"px-3 py-1 text-xs font-medium bg-green-100 text-green-700 rounded-full",children:s.status})}),a.actions&&e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-center",children:e.jsx("div",{className:"flex items-center justify-center gap-2",children:w!==s.id&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>M(s.id,s.loginUrl),className:"p-1.5 rounded text-orange-500 hover:bg-orange-50 transition-colors",title:"Edit URL",children:e.jsx(_,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>E(s.loginUrl),className:"p-1.5 rounded text-slate-600 hover:bg-slate-100 transition-colors",title:"Copy URL",children:e.jsx(z,{className:"w-4 h-4"})})]})})})]},s.id))})]})})]}),e.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[e.jsx("button",{type:"button",onClick:V,className:"px-6 py-2.5 bg-white border border-slate-300 text-slate-700 rounded-lg hover:bg-slate-50 transition-colors font-medium",children:"Reset"}),e.jsx("button",{type:"button",onClick:R,className:"px-6 py-2.5 bg-orange-500 text-white rounded-lg hover:bg-orange-600 transition-colors font-medium",children:"Submit"})]})]}),n==="panel-login"&&e.jsx(I,{open:P,onOpenChange:g,children:e.jsxs(F,{className:"max-w-md bg-white p-0 o
1pacity-0 data-[state=open]:opacity-100 data-[state=closed]:opacity-0 transition-opacity duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:scale-100 data-[state=closed]:scale-100",children:[e.jsx(q,{className:"px-6 pt-6 pb-4",children:e.jsxs(G,{className:"flex items-center gap-2",children:[e.jsx(S,{className:"w-5 h-5"}),"Table Settings"]})}),e.jsxs("div",{className:"px-6 pb-6 space-y-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-semibold text-slate-700 mb-3 flex items-center gap-2",children:[e.jsx(B,{className:"w-4 h-4"}),"Visible Columns"]}),e.jsx("div",{className:"space-y-2",children:Object.entries(D).map(([s,t])=>e.jsxs("label",{className:"flex items-center gap-3 p-2 rounded-lg hover:bg-slate-50 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:a[s],onChange:()=>O(s),className:"w-4 h-4 text-orange-500 border-slate-300 rounded focus:ring-orange-500"}),e.jsx("span",{className:"text-sm text-slate-700",children:t}),a[s]&&e.jsx(J,{className:"w-4 h-4 text-orange-500 ml-auto"})]},s))})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4 border-t border-slate-200",children:[e.jsx("button",{onClick:A,className:"px-4 py-2 text-sm font-medium rounded-lg border border-slate-300 bg-white text-slate-700 hover:bg-slate-50 transition-all",children:"Reset"}),e.jsx("button",{onClick:()=>g(!1),className:"px-4 py-2 text-sm font-medium rounded-lg bg-orange-500 text-white hover:bg-orange-600 transition-all shadow-md",children:"Apply"})]})]})]})})]})}export{ge 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.