Files
biiproject-kit-v2/public/build/assets/Register-DQmW76pT.js
T

1 line
8.4 KiB
JavaScript

import{a as e,c as t,n,o as r,r as i,t as a}from"./app-C-4jOatG.js";import{t as o}from"./GuestLayout-BORLbkZX.js";t();var s=a();function c(){let{system_settings:t}=r().props,a=t?.allow_registration===`1`||t?.allow_registration===!0,c=t?.oauth_google_enabled===`1`||t?.oauth_google_enabled===!0,l=t?.oauth_github_enabled===`1`||t?.oauth_github_enabled===!0,{data:u,setData:d,post:f,processing:p,errors:m,reset:h}=e({first_name:``,last_name:``,email:``,password:``,password_confirmation:``});return a?(0,s.jsxs)(o,{children:[(0,s.jsx)(n,{title:`Create account`}),(0,s.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,s.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Create account`}),(0,s.jsx)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium`,children:`Fill in your details to get started.`})]}),(c||l)&&(0,s.jsxs)(`div`,{className:`mb-6 anim-up`,style:{animationDelay:`0.08s`},children:[(0,s.jsxs)(`div`,{className:`grid gap-3 ${c&&l?`grid-cols-2`:`grid-cols-1`}`,children:[c&&(0,s.jsxs)(`a`,{href:`/auth/google/redirect`,className:`flex items-center justify-center gap-2.5 px-4 py-2.5 rounded-xl border border-gray-200 bg-white hover:bg-gray-50 hover:border-gray-300 transition-colors duration-200 text-sm font-semibold text-gray-700`,children:[(0,s.jsxs)(`svg`,{className:`w-4 h-4 shrink-0`,viewBox:`0 0 24 24`,children:[(0,s.jsx)(`path`,{fill:`#EA4335`,d:`M12 5c1.61 0 3.09.59 4.23 1.57l3.12-3.12C17.35 1.67 14.85 1 12 1 7.73 1 4.14 3.48 2.46 7.1l3.71 2.87C7.04 7.09 9.34 5 12 5z`}),(0,s.jsx)(`path`,{fill:`#4285F4`,d:`M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58l3.7 2.87c2.16-2 3.72-4.94 3.72-8.69z`}),(0,s.jsx)(`path`,{fill:`#FBBC05`,d:`M6.17 14.77l-3.71 2.87C4.14 21.27 7.73 23 12 23c2.97 0 5.48-1 7.37-2.69l-3.7-2.87c-1.03.69-2.35 1.11-3.67 1.11-2.66 0-4.96-2.09-5.83-4.78z`}),(0,s.jsx)(`path`,{fill:`#34A853`,d:`M12 19.45c1.32 0 2.64-.42 3.67-1.11l3.7 2.87C17.48 22 14.97 23 12 23 7.73 23 4.14 21.27 2.47 17.64l3.71-2.87c.86 2.69 3.16 4.68 5.82 4.68z`})]}),`Google`]}),l&&(0,s.jsxs)(`a`,{href:`/auth/github/redirect`,className:`flex items-center justify-center gap-2.5 px-4 py-2.5 rounded-xl border border-gray-200 bg-white hover:bg-gray-50 hover:border-gray-300 transition-colors duration-200 text-sm font-semibold text-gray-700`,children:[(0,s.jsx)(`svg`,{className:`w-4 h-4 shrink-0`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,s.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`})}),`GitHub`]})]}),(0,s.jsxs)(`div`,{className:`relative my-6`,children:[(0,s.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,s.jsx)(`div`,{className:`w-full border-t border-gray-100`})}),(0,s.jsx)(`div`,{className:`relative flex justify-center`,children:(0,s.jsx)(`span`,{className:`px-3 bg-white text-xs font-semibold text-gray-300 uppercase tracking-widest`,children:`or`})})]})]}),(0,s.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),f(route(`register`),{onFinish:()=>h(`password`,`password_confirmation`)})},className:`anim-up`,style:{animationDelay:`0.14s`},children:[(0,s.jsxs)(`div`,{className:`space-y-4`,children:[(0,s.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`label`,{htmlFor:`first_name`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`First name`}),(0,s.jsx)(`input`,{id:`first_name`,type:`text`,autoComplete:`given-name`,autoFocus:!0,value:u.first_name,onChange:e=>d(`first_name`,e.target.value),placeholder:`Alex`,className:`auth-input${m.first_name?` !border-red-300 !bg-red-50/50`:``}`}),m.first_name&&(0,s.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:m.first_name})]}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`label`,{htmlFor:`last_name`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Last name`}),(0,s.jsx)(`input`,{id:`last_name`,type:`text`,autoComplete:`family-name`,value:u.last_name,onChange:e=>d(`last_name`,e.target.value),placeholder:`Johnson`,className:`auth-input${m.last_name?` !border-red-300 !bg-red-50/50`:``}`}),m.last_name&&(0,s.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:m.last_name})]})]}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`label`,{htmlFor:`email`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Email address`}),(0,s.jsx)(`input`,{id:`email`,type:`email`,autoComplete:`email`,value:u.email,onChange:e=>d(`email`,e.target.value),placeholder:`you@company.com`,className:`auth-input${m.email?` !border-red-300 !bg-red-50/50`:``}`}),m.email&&(0,s.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:m.email})]}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`label`,{htmlFor:`password`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Password`}),(0,s.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`new-password`,value:u.password,onChange:e=>d(`password`,e.target.value),placeholder:`Min. 8 characters`,className:`auth-input${m.password?` !border-red-300 !bg-red-50/50`:``}`}),m.password&&(0,s.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:m.password})]}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`label`,{htmlFor:`password_confirmation`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Confirm password`}),(0,s.jsx)(`input`,{id:`password_confirmation`,type:`password`,autoComplete:`new-password`,value:u.password_confirmation,onChange:e=>d(`password_confirmation`,e.target.value),placeholder:`••••••••`,className:`auth-input${m.password_confirmation?` !border-red-300 !bg-red-50/50`:``}`}),m.password_confirmation&&(0,s.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:m.password_confirmation})]})]}),(0,s.jsx)(`button`,{type:`submit`,disabled:p,className:`mt-6 w-full h-11 rounded-xl bg-[#3D4E4B] hover:bg-[#2D3A38] text-white text-sm font-bold tracking-tight transition-colors duration-200 flex items-center justify-center gap-2 disabled:opacity-60 disabled:cursor-not-allowed`,children:p?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,s.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,s.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Creating account…`]}):`Create account`})]}),(0,s.jsxs)(`p`,{className:`mt-7 text-center text-sm text-gray-400 font-medium anim-fade`,style:{animationDelay:`0.22s`},children:[`Already have an account?`,` `,(0,s.jsx)(i,{href:route(`login`),className:`text-[#3D4E4B] font-semibold hover:text-[#D4A017] transition-colors duration-200`,children:`Sign in`})]})]}):(0,s.jsxs)(o,{children:[(0,s.jsx)(n,{title:`Registration Closed`}),(0,s.jsxs)(`div`,{className:`anim-fade`,children:[(0,s.jsx)(`div`,{className:`w-12 h-12 bg-amber-50 border border-amber-100 rounded-2xl flex items-center justify-center mb-6`,children:(0,s.jsx)(`svg`,{className:`w-5 h-5 text-amber-600`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,s.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`})})}),(0,s.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Registration closed`}),(0,s.jsx)(`p`,{className:`mt-2 text-sm text-gray-400 font-medium`,children:`New account registration is currently disabled by the administrator.`}),(0,s.jsx)(`div`,{className:`mt-8 pt-6 border-t border-gray-100`,children:(0,s.jsx)(i,{href:route(`login`),className:`text-sm font-semibold text-[#3D4E4B] hover:text-[#D4A017] transition-colors duration-200`,children:`← Back to sign in`})})]})]})}export{c as default};