initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{7589:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return n(3634)}])},3634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}}),n(7043);let i=n(7437);n(2265);let o={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},l={display:"inline-block"},r={display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},d={fontSize:14,fontWeight:400,lineHeight:"49px",margin:0};function s(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"404: This page could not be found."}),(0,i.jsx)("div",{style:o,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,i.jsx)("h1",{className:"next-error-h1",style:r,children:"404"}),(0,i.jsx)("div",{style:l,children:(0,i.jsx)("h2",{style:d,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[971,117,744],function(){return e(e.s=7589)}),_N_E=e.O()}]);
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{6470:function(n,e,u){Promise.resolve().then(u.t.bind(u,7960,23))},7960:function(){}},function(n){n.O(0,[587,971,117,744],function(){return n(n.s=6470)}),_N_E=n.O()}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{2537:function(e,t,r){Promise.resolve().then(r.bind(r,7340))},7340:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return a}});var o=r(7437),n=r(2265),i=r(9376);function a(){let e=(0,i.useRouter)(),[t,r]=(0,n.useState)(""),[a,l]=(0,n.useState)(""),[d,u]=(0,n.useState)(""),[c,p]=(0,n.useState)(!1);async function h(r){r.preventDefault(),p(!0),u("");try{let r=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({email:t,password:a})}),o=await r.json();if(!r.ok)throw Error(o.message||"Ошибка входа");e.push("/dashboard")}catch(e){u(e instanceof Error?e.message:"Неизвестная ошибка"),p(!1)}}return(0,n.useEffect)(()=>{(async function(){try{(await fetch("/api/auth/me",{credentials:"same-origin"})).ok&&e.push("/dashboard")}catch(e){}})()},[e]),(0,o.jsx)("div",{style:s.container,children:(0,o.jsxs)("div",{style:s.card,children:[(0,o.jsx)("h1",{style:s.title,children:"Uno Click"}),(0,o.jsx)("p",{style:s.subtitle,children:"Войдите для продолжения"}),d&&(0,o.jsx)("div",{style:s.error,children:d}),(0,o.jsxs)("form",{onSubmit:h,children:[(0,o.jsxs)("div",{style:s.formGroup,children:[(0,o.jsx)("label",{htmlFor:"email",style:s.label,children:"Email"}),(0,o.jsx)("input",{type:"email",id:"email",value:t,onChange:e=>r(e.target.value),required:!0,placeholder:"test.user@uno-click.local",style:s.input})]}),(0,o.jsxs)("div",{style:s.formGroup,children:[(0,o.jsx)("label",{htmlFor:"password",style:s.label,children:"Пароль"}),(0,o.jsx)("input",{type:"password",id:"password",value:a,onChange:e=>l(e.target.value),required:!0,placeholder:"test123",style:s.input})]}),(0,o.jsx)("button",{type:"submit",disabled:c,style:{...s.button,...c?s.buttonDisabled:{}},children:c?"Вход...":"Войти"})]})]})})}let s={container:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"#f5f5f5"},card:{background:"white",padding:"40px",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0,0,0,0.1)",width:"100%",maxWidth:"400px"},title:{fontSize:"24px",fontWeight:600,marginBottom:"8px",color:"#333"},subtitle:{color:"#666",marginBottom:"32px",fontSize:"14px"},formGroup:{marginBottom:"20px"},label:{display:"block",marginBottom:"6px",fontSize:"14px",color:"#333",fontWeight:500},input:{width:"100%",padding:"12px 14px",border:"1px solid #ddd",borderRadius:"6px",fontSize:"14px",transition:"border-color 0.2s"},button:{width:"100%",padding:"12px",background:"#007bff",color:"white",border:"none",borderRadius:"6px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background 0.2s"},buttonDisabled:{background:"#ccc",cursor:"not-allowed"},error:{background:"#fee",color:"#c00",padding:"12px",borderRadius:"6px",marginBottom:"20px",fontSize:"14px"}}},9376:function(e,t,r){"use strict";var o=r(5475);r.o(o,"useRouter")&&r.d(t,{useRouter:function(){return o.useRouter}}),r.o(o,"useSearchParams")&&r.d(t,{useSearchParams:function(){return o.useSearchParams}})}},function(e){e.O(0,[971,117,744],function(){return e(e.s=2537)}),_N_E=e.O()}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user