feat: add global toggles for TOTP and Email 2FA in system settings, conditionally show/hide user 2FA tab
This commit is contained in:
@@ -48,10 +48,30 @@ class SettingsController extends Controller
|
||||
$smtpConfigured = !empty($mailHost) && !empty($mailUsername) && !empty($mailPassword);
|
||||
}
|
||||
|
||||
$totpAllowed = true;
|
||||
$emailAllowed = true;
|
||||
try {
|
||||
$systemSettings = \Illuminate\Support\Facades\Cache::rememberForever('system_settings', function () {
|
||||
return \App\Models\Setting::all()->pluck('value', 'key')->toArray();
|
||||
});
|
||||
if (isset($systemSettings['two_factor_totp_enabled'])) {
|
||||
$totpAllowed = $systemSettings['two_factor_totp_enabled'] === '1' || $systemSettings['two_factor_totp_enabled'] === true;
|
||||
}
|
||||
if (isset($systemSettings['two_factor_email_enabled'])) {
|
||||
$emailAllowed = $systemSettings['two_factor_email_enabled'] === '1' || $systemSettings['two_factor_email_enabled'] === true;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// DB not ready or migrated
|
||||
}
|
||||
|
||||
return Inertia::render('Settings/Index', [
|
||||
'mustVerifyEmail' => $user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail,
|
||||
'status' => session('status'),
|
||||
'twoFactor' => [
|
||||
'mustVerifyEmail' => $user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail,
|
||||
'status' => session('status'),
|
||||
'twoFactorSettings' => [
|
||||
'totp_allowed' => $totpAllowed,
|
||||
'email_allowed' => $emailAllowed,
|
||||
],
|
||||
'twoFactor' => [
|
||||
'enabled' => $twoFactorEnabled,
|
||||
'qr_code' => $qrCode,
|
||||
'secret' => $secret,
|
||||
|
||||
@@ -31,6 +31,10 @@ class SystemSettingController extends Controller
|
||||
'password_require_numbers' => '0',
|
||||
'password_require_mixed_case' => '0',
|
||||
|
||||
// Two Factor global toggles
|
||||
'two_factor_totp_enabled' => '1',
|
||||
'two_factor_email_enabled' => '1',
|
||||
|
||||
// OAuth
|
||||
'oauth_google_enabled' => '0',
|
||||
'oauth_google_client_id' => '',
|
||||
@@ -83,6 +87,9 @@ class SystemSettingController extends Controller
|
||||
'settings.password_require_numbers' => 'boolean',
|
||||
'settings.password_require_mixed_case' => 'boolean',
|
||||
|
||||
'settings.two_factor_totp_enabled' => 'boolean',
|
||||
'settings.two_factor_email_enabled' => 'boolean',
|
||||
|
||||
'settings.oauth_google_enabled' => 'boolean',
|
||||
'settings.oauth_google_client_id' => 'nullable|string',
|
||||
'settings.oauth_google_client_secret' => 'nullable|string',
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{c as e,o as t,t as n}from"./app-DqWc0bf2.js";e();var r=n();function i({ability:e,children:n,fallback:i=null}){let{permissions:a}=t().props.auth;return(Array.isArray(e)?e:[e]).some(e=>a.includes(e))?(0,r.jsx)(r.Fragment,{children:n}):(0,r.jsx)(r.Fragment,{children:i})}export{i as t};
|
||||
import{c as e,o as t,t as n}from"./app-BK5KCPMc.js";e();var r=n();function i({ability:e,children:n,fallback:i=null}){let{permissions:a}=t().props.auth;return(Array.isArray(e)?e:[e]).some(e=>a.includes(e))?(0,r.jsx)(r.Fragment,{children:n}):(0,r.jsx)(r.Fragment,{children:i})}export{i as t};
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
import{a as e,c as t,d as n,i as r,n as i,t as a}from"./app-DqWc0bf2.js";import{t as o}from"./swal-OIXtGkLz.js";var s=n(t(),1),c=a();function l({type:t=`totp`}){let[n,a]=(0,s.useState)(!1),{data:l,setData:u,post:d,processing:f,errors:p}=e({code:``}),[m,h]=(0,s.useState)(!1),g=e=>{e.preventDefault(),d(route(`two-factor.verify`),{preserveScroll:!0})},_=()=>{m||(h(!0),r.post(route(`two-factor.resend`),{},{preserveScroll:!0,onSuccess:()=>{h(!1),o.success(`Sent!`,`A new verification code has been sent to your email.`)},onError:e=>{h(!1),o.error(`Error`,e.code||`Failed to resend verification code.`)}}))},v=t===`email`;return(0,c.jsxs)(`div`,{className:`min-h-screen bg-[#E3EBE8] flex items-center justify-center p-4`,children:[(0,c.jsx)(i,{title:`Two-Factor Authentication`}),(0,c.jsxs)(`div`,{className:`w-full max-w-sm`,children:[(0,c.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,c.jsx)(`div`,{className:`inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-[#3D4E4B] mb-4 shadow-lg shadow-[#3D4E4B]/10`,children:v&&!n?(0,c.jsx)(`svg`,{className:`w-7 h-7 text-[#D4A017]`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,c.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z`})}):(0,c.jsx)(`svg`,{className:`w-7 h-7 text-[#D4A017]`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,c.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z`})})}),(0,c.jsx)(`h1`,{className:`text-xl font-black text-[#3D4E4B] tracking-tight`,children:`Two-Factor Authentication`}),(0,c.jsx)(`p`,{className:`text-sm text-gray-500 font-medium mt-2 leading-relaxed px-2`,children:n?`Enter a recovery code to continue.`:v?`Please enter the 6-digit verification code sent to your registered email address.`:`Please enter the 6-digit authentication code from your authenticator app.`})]}),(0,c.jsxs)(`div`,{className:`bg-white rounded-2xl shadow-sm border border-gray-100 p-8`,children:[(0,c.jsxs)(`form`,{onSubmit:g,className:`space-y-5`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`label`,{className:`block text-xs font-bold text-gray-400 uppercase tracking-widest mb-2.5`,children:n?`Recovery Code`:v?`Email Verification Code`:`Authenticator Code`}),(0,c.jsx)(`input`,{type:`text`,inputMode:n?`text`:`numeric`,maxLength:n?21:6,value:l.code,onChange:e=>u(`code`,e.target.value),autoFocus:!0,className:`w-full h-12 border rounded-xl px-4 text-center font-mono font-bold text-lg tracking-[0.4em] outline-none transition-all
|
||||
import{a as e,c as t,d as n,i as r,n as i,t as a}from"./app-BK5KCPMc.js";import{t as o}from"./swal-D8hRpOIh.js";var s=n(t(),1),c=a();function l({type:t=`totp`}){let[n,a]=(0,s.useState)(!1),{data:l,setData:u,post:d,processing:f,errors:p}=e({code:``}),[m,h]=(0,s.useState)(!1),g=e=>{e.preventDefault(),d(route(`two-factor.verify`),{preserveScroll:!0})},_=()=>{m||(h(!0),r.post(route(`two-factor.resend`),{},{preserveScroll:!0,onSuccess:()=>{h(!1),o.success(`Sent!`,`A new verification code has been sent to your email.`)},onError:e=>{h(!1),o.error(`Error`,e.code||`Failed to resend verification code.`)}}))},v=t===`email`;return(0,c.jsxs)(`div`,{className:`min-h-screen bg-[#E3EBE8] flex items-center justify-center p-4`,children:[(0,c.jsx)(i,{title:`Two-Factor Authentication`}),(0,c.jsxs)(`div`,{className:`w-full max-w-sm`,children:[(0,c.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,c.jsx)(`div`,{className:`inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-[#3D4E4B] mb-4 shadow-lg shadow-[#3D4E4B]/10`,children:v&&!n?(0,c.jsx)(`svg`,{className:`w-7 h-7 text-[#D4A017]`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,c.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z`})}):(0,c.jsx)(`svg`,{className:`w-7 h-7 text-[#D4A017]`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,c.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z`})})}),(0,c.jsx)(`h1`,{className:`text-xl font-black text-[#3D4E4B] tracking-tight`,children:`Two-Factor Authentication`}),(0,c.jsx)(`p`,{className:`text-sm text-gray-500 font-medium mt-2 leading-relaxed px-2`,children:n?`Enter a recovery code to continue.`:v?`Please enter the 6-digit verification code sent to your registered email address.`:`Please enter the 6-digit authentication code from your authenticator app.`})]}),(0,c.jsxs)(`div`,{className:`bg-white rounded-2xl shadow-sm border border-gray-100 p-8`,children:[(0,c.jsxs)(`form`,{onSubmit:g,className:`space-y-5`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`label`,{className:`block text-xs font-bold text-gray-400 uppercase tracking-widest mb-2.5`,children:n?`Recovery Code`:v?`Email Verification Code`:`Authenticator Code`}),(0,c.jsx)(`input`,{type:`text`,inputMode:n?`text`:`numeric`,maxLength:n?21:6,value:l.code,onChange:e=>u(`code`,e.target.value),autoFocus:!0,className:`w-full h-12 border rounded-xl px-4 text-center font-mono font-bold text-lg tracking-[0.4em] outline-none transition-all
|
||||
${p.code?`border-red-300 bg-red-50 focus:ring-red-100`:`border-gray-200 focus:border-[#3D4E4B] focus:ring-2 focus:ring-[#3D4E4B]/10`}`,placeholder:n?`xxxxxxxxxx-xxxxxxxxxx`:`000000`}),p.code&&(0,c.jsx)(`p`,{className:`text-xs text-red-500 font-semibold mt-1.5 text-center`,children:p.code})]}),(0,c.jsx)(`button`,{type:`submit`,disabled:f||l.code.length<(n?5:6),className:`w-full h-11 bg-[#3D4E4B] text-white text-sm font-bold rounded-xl hover:bg-[#2D3A38] transition-all disabled:opacity-60 shadow-md shadow-[#3D4E4B]/15`,children:f?`Verifying...`:`Continue`})]}),v&&!n&&(0,c.jsx)(`div`,{className:`mt-5 text-center`,children:(0,c.jsx)(`button`,{onClick:_,disabled:m,className:`text-xs font-bold text-[#D4A017] hover:underline disabled:opacity-50`,children:m?`Resending code...`:`Didn't receive a code? Resend`})}),!v&&(0,c.jsx)(`div`,{className:`mt-6 text-center border-t border-gray-50 pt-4`,children:(0,c.jsx)(`button`,{onClick:()=>{a(!n),u(`code`,``)},className:`text-xs font-bold text-[#3D4E4B] hover:underline`,children:n?`Use authenticator code instead`:`Use a recovery code`})})]}),(0,c.jsx)(`div`,{className:`mt-6 text-center`,children:(0,c.jsx)(`a`,{href:`/login`,className:`text-xs font-semibold text-gray-400 hover:text-[#3D4E4B] transition-colors`,children:`← Back to login`})})]})]})}export{l as default};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{a as e,c as t,n,t as r}from"./app-DqWc0bf2.js";import{t as i}from"./GuestLayout-CRv8xuaB.js";t();var a=r();function o(){let{data:t,setData:r,post:o,processing:s,errors:c,reset:l}=e({password:``});return(0,a.jsxs)(i,{children:[(0,a.jsx)(n,{title:`Confirm password`}),(0,a.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,a.jsx)(`div`,{className:`w-12 h-12 bg-[#3D4E4B]/5 rounded-2xl flex items-center justify-center mb-6`,children:(0,a.jsx)(`svg`,{className:`w-5 h-5 text-[#3D4E4B]`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,a.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z`})})}),(0,a.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Confirm your password`}),(0,a.jsx)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium leading-relaxed`,children:`For your security, please confirm your password to continue.`})]}),(0,a.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),o(route(`password.confirm`),{onFinish:()=>l(`password`)})},className:`anim-up`,style:{animationDelay:`0.1s`},children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`label`,{htmlFor:`password`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Password`}),(0,a.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`current-password`,autoFocus:!0,value:t.password,onChange:e=>r(`password`,e.target.value),placeholder:`••••••••`,className:`auth-input${c.password?` !border-red-300 !bg-red-50/50`:``}`}),c.password&&(0,a.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:c.password})]}),(0,a.jsx)(`button`,{type:`submit`,disabled:s,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:s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,a.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,a.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Confirming…`]}):`Confirm password`})]})]})}export{o as default};
|
||||
import{a as e,c as t,n,t as r}from"./app-BK5KCPMc.js";import{t as i}from"./GuestLayout-CgPUg7Kz.js";t();var a=r();function o(){let{data:t,setData:r,post:o,processing:s,errors:c,reset:l}=e({password:``});return(0,a.jsxs)(i,{children:[(0,a.jsx)(n,{title:`Confirm password`}),(0,a.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,a.jsx)(`div`,{className:`w-12 h-12 bg-[#3D4E4B]/5 rounded-2xl flex items-center justify-center mb-6`,children:(0,a.jsx)(`svg`,{className:`w-5 h-5 text-[#3D4E4B]`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,a.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z`})})}),(0,a.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Confirm your password`}),(0,a.jsx)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium leading-relaxed`,children:`For your security, please confirm your password to continue.`})]}),(0,a.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),o(route(`password.confirm`),{onFinish:()=>l(`password`)})},className:`anim-up`,style:{animationDelay:`0.1s`},children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`label`,{htmlFor:`password`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Password`}),(0,a.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`current-password`,autoFocus:!0,value:t.password,onChange:e=>r(`password`,e.target.value),placeholder:`••••••••`,className:`auth-input${c.password?` !border-red-300 !bg-red-50/50`:``}`}),c.password&&(0,a.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:c.password})]}),(0,a.jsx)(`button`,{type:`submit`,disabled:s,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:s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,a.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,a.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Confirming…`]}):`Confirm password`})]})]})}export{o as default};
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{c as e,n as t,r as n,t as r}from"./app-DqWc0bf2.js";e();var i=r(),a={403:{title:`Access Denied`,description:`You don't have permission to access this resource.`},404:{title:`Page Not Found`,description:`The page you're looking for doesn't exist or has been moved.`},419:{title:`Session Expired`,description:`Your session has expired. Please refresh and try again.`},500:{title:`Server Error`,description:`Something went wrong on our end. Please try again later.`},503:{title:`Under Maintenance`,description:`The system is temporarily unavailable. Please check back soon.`}};function o({status:e}){let{title:r,description:o}=a[e]??{title:`Unexpected Error`,description:`An unexpected error occurred.`};return(0,i.jsxs)(`div`,{className:`min-h-screen bg-[#E3EBE8] flex items-center justify-center p-6`,children:[(0,i.jsx)(t,{title:`${e} — ${r}`}),(0,i.jsxs)(`div`,{className:`w-full max-w-md`,children:[(0,i.jsxs)(`div`,{className:`bg-white rounded-3xl border border-gray-100 shadow-sm overflow-hidden`,children:[(0,i.jsxs)(`div`,{className:`bg-[#3D4E4B] px-8 py-10 text-center`,children:[(0,i.jsx)(`div`,{className:`text-7xl font-black text-white/10 tracking-tighter leading-none select-none`,children:e}),(0,i.jsx)(`div`,{className:`mt-2 text-xl font-bold text-white tracking-tight`,children:r})]}),(0,i.jsxs)(`div`,{className:`px-8 py-8 text-center space-y-6`,children:[(0,i.jsx)(`p`,{className:`text-sm font-semibold text-gray-400 leading-relaxed`,children:o}),(0,i.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-3 justify-center`,children:[e===419?(0,i.jsxs)(`button`,{onClick:()=>window.location.reload(),className:`h-10 px-6 bg-[#3D4E4B] text-white text-sm font-bold tracking-tight rounded-xl hover:bg-[#2D3A38] transition-all flex items-center justify-center gap-2`,children:[(0,i.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,i.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15`})}),`Refresh Page`]}):(0,i.jsxs)(n,{href:`/dashboard`,className:`h-10 px-6 bg-[#3D4E4B] text-white text-sm font-bold tracking-tight rounded-xl hover:bg-[#2D3A38] transition-all flex items-center justify-center gap-2`,children:[(0,i.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,i.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6`})}),`Back to Dashboard`]}),(0,i.jsx)(`button`,{onClick:()=>window.history.back(),className:`h-10 px-6 bg-white border border-gray-100 text-gray-500 text-sm font-bold tracking-tight rounded-xl hover:bg-gray-50 transition-all`,children:`Go Back`})]})]})]}),(0,i.jsxs)(`p`,{className:`text-center text-xs font-bold text-gray-400 uppercase tracking-widest mt-6`,children:[`Error `,e]})]})]})}export{o as default};
|
||||
import{c as e,n as t,r as n,t as r}from"./app-BK5KCPMc.js";e();var i=r(),a={403:{title:`Access Denied`,description:`You don't have permission to access this resource.`},404:{title:`Page Not Found`,description:`The page you're looking for doesn't exist or has been moved.`},419:{title:`Session Expired`,description:`Your session has expired. Please refresh and try again.`},500:{title:`Server Error`,description:`Something went wrong on our end. Please try again later.`},503:{title:`Under Maintenance`,description:`The system is temporarily unavailable. Please check back soon.`}};function o({status:e}){let{title:r,description:o}=a[e]??{title:`Unexpected Error`,description:`An unexpected error occurred.`};return(0,i.jsxs)(`div`,{className:`min-h-screen bg-[#E3EBE8] flex items-center justify-center p-6`,children:[(0,i.jsx)(t,{title:`${e} — ${r}`}),(0,i.jsxs)(`div`,{className:`w-full max-w-md`,children:[(0,i.jsxs)(`div`,{className:`bg-white rounded-3xl border border-gray-100 shadow-sm overflow-hidden`,children:[(0,i.jsxs)(`div`,{className:`bg-[#3D4E4B] px-8 py-10 text-center`,children:[(0,i.jsx)(`div`,{className:`text-7xl font-black text-white/10 tracking-tighter leading-none select-none`,children:e}),(0,i.jsx)(`div`,{className:`mt-2 text-xl font-bold text-white tracking-tight`,children:r})]}),(0,i.jsxs)(`div`,{className:`px-8 py-8 text-center space-y-6`,children:[(0,i.jsx)(`p`,{className:`text-sm font-semibold text-gray-400 leading-relaxed`,children:o}),(0,i.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-3 justify-center`,children:[e===419?(0,i.jsxs)(`button`,{onClick:()=>window.location.reload(),className:`h-10 px-6 bg-[#3D4E4B] text-white text-sm font-bold tracking-tight rounded-xl hover:bg-[#2D3A38] transition-all flex items-center justify-center gap-2`,children:[(0,i.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,i.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15`})}),`Refresh Page`]}):(0,i.jsxs)(n,{href:`/dashboard`,className:`h-10 px-6 bg-[#3D4E4B] text-white text-sm font-bold tracking-tight rounded-xl hover:bg-[#2D3A38] transition-all flex items-center justify-center gap-2`,children:[(0,i.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,i.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6`})}),`Back to Dashboard`]}),(0,i.jsx)(`button`,{onClick:()=>window.history.back(),className:`h-10 px-6 bg-white border border-gray-100 text-gray-500 text-sm font-bold tracking-tight rounded-xl hover:bg-gray-50 transition-all`,children:`Go Back`})]})]})]}),(0,i.jsxs)(`p`,{className:`text-center text-xs font-bold text-gray-400 uppercase tracking-widest mt-6`,children:[`Error `,e]})]})]})}export{o as default};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{a as e,c as t,n,r,t as i}from"./app-DqWc0bf2.js";import{t as a}from"./GuestLayout-CRv8xuaB.js";t();var o=i();function s({status:t}){let{data:i,setData:s,post:c,processing:l,errors:u}=e({email:``});return(0,o.jsxs)(a,{children:[(0,o.jsx)(n,{title:`Forgot password`}),(0,o.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,o.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Forgot password?`}),(0,o.jsx)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium`,children:`Enter your email and we'll send a reset link.`})]}),t&&(0,o.jsx)(`div`,{className:`mb-6 px-4 py-3 rounded-xl bg-emerald-50 border border-emerald-100 text-sm font-semibold text-emerald-700 anim-fade`,children:t}),(0,o.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c(route(`password.email`))},className:`anim-up`,style:{animationDelay:`0.1s`},children:[(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`label`,{htmlFor:`email`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Email address`}),(0,o.jsx)(`input`,{id:`email`,type:`email`,autoComplete:`email`,autoFocus:!0,value:i.email,onChange:e=>s(`email`,e.target.value),placeholder:`you@company.com`,className:`auth-input${u.email?` !border-red-300 !bg-red-50/50`:``}`}),u.email&&(0,o.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:u.email})]}),(0,o.jsx)(`button`,{type:`submit`,disabled:l,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:l?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,o.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,o.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Sending…`]}):`Send reset link`})]}),(0,o.jsx)(`p`,{className:`mt-7 text-center text-sm text-gray-400 font-medium anim-fade`,style:{animationDelay:`0.18s`},children:(0,o.jsx)(r,{href:route(`login`),className:`text-[#3D4E4B] font-semibold hover:text-[#D4A017] transition-colors duration-200`,children:`← Back to sign in`})})]})}export{s as default};
|
||||
import{a as e,c as t,n,r,t as i}from"./app-BK5KCPMc.js";import{t as a}from"./GuestLayout-CgPUg7Kz.js";t();var o=i();function s({status:t}){let{data:i,setData:s,post:c,processing:l,errors:u}=e({email:``});return(0,o.jsxs)(a,{children:[(0,o.jsx)(n,{title:`Forgot password`}),(0,o.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,o.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Forgot password?`}),(0,o.jsx)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium`,children:`Enter your email and we'll send a reset link.`})]}),t&&(0,o.jsx)(`div`,{className:`mb-6 px-4 py-3 rounded-xl bg-emerald-50 border border-emerald-100 text-sm font-semibold text-emerald-700 anim-fade`,children:t}),(0,o.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c(route(`password.email`))},className:`anim-up`,style:{animationDelay:`0.1s`},children:[(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`label`,{htmlFor:`email`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Email address`}),(0,o.jsx)(`input`,{id:`email`,type:`email`,autoComplete:`email`,autoFocus:!0,value:i.email,onChange:e=>s(`email`,e.target.value),placeholder:`you@company.com`,className:`auth-input${u.email?` !border-red-300 !bg-red-50/50`:``}`}),u.email&&(0,o.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:u.email})]}),(0,o.jsx)(`button`,{type:`submit`,disabled:l,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:l?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,o.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,o.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Sending…`]}):`Send reset link`})]}),(0,o.jsx)(`p`,{className:`mt-7 text-center text-sm text-gray-400 font-medium anim-fade`,style:{animationDelay:`0.18s`},children:(0,o.jsx)(r,{href:route(`login`),className:`text-[#3D4E4B] font-semibold hover:text-[#D4A017] transition-colors duration-200`,children:`← Back to sign in`})})]})}export{s as default};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as e,o as t,r as n,t as r}from"./app-DqWc0bf2.js";e();var i=r();function a({children:e}){let{system_settings:r}=t().props,a=r?.app_name||`biiproject kit v2`,o=r?.app_logo,s=r?.app_logo_text||`BK`;return(0,i.jsxs)(`div`,{className:`min-h-screen flex font-sans`,children:[(0,i.jsxs)(`div`,{className:`hidden lg:flex lg:w-[44%] bg-[#3D4E4B] flex-col justify-between p-14 relative overflow-hidden shrink-0`,children:[(0,i.jsxs)(`svg`,{className:`absolute inset-0 w-full h-full pointer-events-none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,i.jsx)(`defs`,{children:(0,i.jsx)(`pattern`,{id:`dots`,x:`0`,y:`0`,width:`28`,height:`28`,patternUnits:`userSpaceOnUse`,children:(0,i.jsx)(`circle`,{cx:`1.5`,cy:`1.5`,r:`1.5`,fill:`white`,fillOpacity:`0.07`})})}),(0,i.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#dots)`})]}),(0,i.jsx)(`div`,{className:`absolute -bottom-40 -right-40 w-[480px] h-[480px] rounded-full border border-white/[0.06] pointer-events-none`}),(0,i.jsx)(`div`,{className:`absolute -bottom-64 -right-64 w-[700px] h-[700px] rounded-full border border-white/[0.04] pointer-events-none`}),(0,i.jsx)(`div`,{className:`absolute top-[-60px] left-[-60px] w-[300px] h-[300px] rounded-full border border-white/[0.04] pointer-events-none`}),(0,i.jsx)(`div`,{className:`relative z-10 anim-fade`,children:(0,i.jsxs)(n,{href:`/`,className:`inline-flex items-center gap-3 group`,children:[(0,i.jsx)(`div`,{className:`w-10 h-10 rounded-[0.75rem] flex items-center justify-center overflow-hidden text-sm font-bold text-white shrink-0 ${o?`bg-white/10`:`bg-[#D4A017]`}`,children:o?(0,i.jsx)(`img`,{src:o,alt:a,className:`w-full h-full object-contain`}):s}),(0,i.jsx)(`span`,{className:`text-white font-bold text-base tracking-tight`,children:a})]})}),(0,i.jsxs)(`div`,{className:`relative z-10 anim-up`,style:{animationDelay:`0.1s`},children:[(0,i.jsx)(`p`,{className:`text-[#D4A017] text-xs font-bold uppercase tracking-[0.18em] mb-5`,children:`Enterprise Platform`}),(0,i.jsxs)(`h2`,{className:`text-white text-[2rem] font-bold leading-[1.2] tracking-tight`,children:[`Manage your`,(0,i.jsx)(`br`,{}),`organization`,(0,i.jsx)(`br`,{}),`with precision.`]}),(0,i.jsx)(`p`,{className:`mt-5 text-[#E3EBE8]/45 text-sm leading-relaxed max-w-xs`,children:`Access control, user management, and system configuration — unified in one secure interface.`}),(0,i.jsx)(`div`,{className:`mt-9 flex flex-col gap-3`,children:[`Role-based access control`,`Real-time audit logs`,`Multi-level permissions`].map(e=>(0,i.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,i.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-[#D4A017] shrink-0`}),(0,i.jsx)(`span`,{className:`text-[#E3EBE8]/55 text-sm font-medium`,children:e})]},e))})]}),(0,i.jsx)(`div`,{className:`relative z-10 anim-fade`,style:{animationDelay:`0.2s`},children:(0,i.jsxs)(`p`,{className:`text-[#E3EBE8]/25 text-xs`,children:[`© `,new Date().getFullYear(),` `,a,`. All rights reserved.`]})})]}),(0,i.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center bg-white px-8 py-12 min-h-screen`,children:[(0,i.jsxs)(`div`,{className:`lg:hidden mb-10 flex items-center gap-3 anim-down`,children:[(0,i.jsx)(`div`,{className:`w-9 h-9 rounded-[0.6rem] flex items-center justify-center text-sm font-bold overflow-hidden ${o?``:`bg-[#3D4E4B] text-white`}`,children:o?(0,i.jsx)(`img`,{src:o,alt:a,className:`w-full h-full object-contain`}):s}),(0,i.jsx)(`span`,{className:`text-[#3D4E4B] font-bold text-base tracking-tight`,children:a})]}),(0,i.jsx)(`div`,{className:`w-full max-w-[360px]`,children:e}),(0,i.jsx)(`div`,{className:`mt-10 anim-fade`,style:{animationDelay:`0.35s`},children:(0,i.jsxs)(n,{href:`/`,className:`inline-flex items-center gap-1.5 text-xs font-semibold text-gray-300 hover:text-[#3D4E4B] transition-colors duration-200 tracking-tight`,children:[(0,i.jsx)(`svg`,{className:`w-3.5 h-3.5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,i.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M10 19l-7-7m0 0l7-7m-7 7h18`})}),`Back to home`]})})]})]})}export{a as t};
|
||||
import{c as e,o as t,r as n,t as r}from"./app-BK5KCPMc.js";e();var i=r();function a({children:e}){let{system_settings:r}=t().props,a=r?.app_name||`biiproject kit v2`,o=r?.app_logo,s=r?.app_logo_text||`BK`;return(0,i.jsxs)(`div`,{className:`min-h-screen flex font-sans`,children:[(0,i.jsxs)(`div`,{className:`hidden lg:flex lg:w-[44%] bg-[#3D4E4B] flex-col justify-between p-14 relative overflow-hidden shrink-0`,children:[(0,i.jsxs)(`svg`,{className:`absolute inset-0 w-full h-full pointer-events-none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,i.jsx)(`defs`,{children:(0,i.jsx)(`pattern`,{id:`dots`,x:`0`,y:`0`,width:`28`,height:`28`,patternUnits:`userSpaceOnUse`,children:(0,i.jsx)(`circle`,{cx:`1.5`,cy:`1.5`,r:`1.5`,fill:`white`,fillOpacity:`0.07`})})}),(0,i.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#dots)`})]}),(0,i.jsx)(`div`,{className:`absolute -bottom-40 -right-40 w-[480px] h-[480px] rounded-full border border-white/[0.06] pointer-events-none`}),(0,i.jsx)(`div`,{className:`absolute -bottom-64 -right-64 w-[700px] h-[700px] rounded-full border border-white/[0.04] pointer-events-none`}),(0,i.jsx)(`div`,{className:`absolute top-[-60px] left-[-60px] w-[300px] h-[300px] rounded-full border border-white/[0.04] pointer-events-none`}),(0,i.jsx)(`div`,{className:`relative z-10 anim-fade`,children:(0,i.jsxs)(n,{href:`/`,className:`inline-flex items-center gap-3 group`,children:[(0,i.jsx)(`div`,{className:`w-10 h-10 rounded-[0.75rem] flex items-center justify-center overflow-hidden text-sm font-bold text-white shrink-0 ${o?`bg-white/10`:`bg-[#D4A017]`}`,children:o?(0,i.jsx)(`img`,{src:o,alt:a,className:`w-full h-full object-contain`}):s}),(0,i.jsx)(`span`,{className:`text-white font-bold text-base tracking-tight`,children:a})]})}),(0,i.jsxs)(`div`,{className:`relative z-10 anim-up`,style:{animationDelay:`0.1s`},children:[(0,i.jsx)(`p`,{className:`text-[#D4A017] text-xs font-bold uppercase tracking-[0.18em] mb-5`,children:`Enterprise Platform`}),(0,i.jsxs)(`h2`,{className:`text-white text-[2rem] font-bold leading-[1.2] tracking-tight`,children:[`Manage your`,(0,i.jsx)(`br`,{}),`organization`,(0,i.jsx)(`br`,{}),`with precision.`]}),(0,i.jsx)(`p`,{className:`mt-5 text-[#E3EBE8]/45 text-sm leading-relaxed max-w-xs`,children:`Access control, user management, and system configuration — unified in one secure interface.`}),(0,i.jsx)(`div`,{className:`mt-9 flex flex-col gap-3`,children:[`Role-based access control`,`Real-time audit logs`,`Multi-level permissions`].map(e=>(0,i.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,i.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-[#D4A017] shrink-0`}),(0,i.jsx)(`span`,{className:`text-[#E3EBE8]/55 text-sm font-medium`,children:e})]},e))})]}),(0,i.jsx)(`div`,{className:`relative z-10 anim-fade`,style:{animationDelay:`0.2s`},children:(0,i.jsxs)(`p`,{className:`text-[#E3EBE8]/25 text-xs`,children:[`© `,new Date().getFullYear(),` `,a,`. All rights reserved.`]})})]}),(0,i.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center bg-white px-8 py-12 min-h-screen`,children:[(0,i.jsxs)(`div`,{className:`lg:hidden mb-10 flex items-center gap-3 anim-down`,children:[(0,i.jsx)(`div`,{className:`w-9 h-9 rounded-[0.6rem] flex items-center justify-center text-sm font-bold overflow-hidden ${o?``:`bg-[#3D4E4B] text-white`}`,children:o?(0,i.jsx)(`img`,{src:o,alt:a,className:`w-full h-full object-contain`}):s}),(0,i.jsx)(`span`,{className:`text-[#3D4E4B] font-bold text-base tracking-tight`,children:a})]}),(0,i.jsx)(`div`,{className:`w-full max-w-[360px]`,children:e}),(0,i.jsx)(`div`,{className:`mt-10 anim-fade`,style:{animationDelay:`0.35s`},children:(0,i.jsxs)(n,{href:`/`,className:`inline-flex items-center gap-1.5 text-xs font-semibold text-gray-300 hover:text-[#3D4E4B] transition-colors duration-200 tracking-tight`,children:[(0,i.jsx)(`svg`,{className:`w-3.5 h-3.5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,i.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M10 19l-7-7m0 0l7-7m-7 7h18`})}),`Back to home`]})})]})]})}export{a as t};
|
||||
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
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
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
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{d as e,s as t}from"./app-DqWc0bf2.js";var n=e(t(),1);function r({children:e}){return(0,n.createPortal)(e,document.body)}export{r as t};
|
||||
import{d as e,s as t}from"./app-BK5KCPMc.js";var n=e(t(),1);function r({children:e}){return(0,n.createPortal)(e,document.body)}export{r as t};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{t as e}from"./app-DqWc0bf2.js";var t=e();function n({className:e=``,disabled:n,children:r,...i}){return(0,t.jsx)(`button`,{...i,className:`inline-flex items-center rounded-md border border-transparent bg-gray-800 px-4 py-2 text-xs font-bold tracking-tight text-white transition duration-150 ease-in-out hover:bg-gray-700 focus:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 active:bg-gray-900 ${n&&`opacity-25`} `+e,disabled:n,children:r})}export{n as t};
|
||||
import{t as e}from"./app-BK5KCPMc.js";var t=e();function n({className:e=``,disabled:n,children:r,...i}){return(0,t.jsx)(`button`,{...i,className:`inline-flex items-center rounded-md border border-transparent bg-gray-800 px-4 py-2 text-xs font-bold tracking-tight text-white transition duration-150 ease-in-out hover:bg-gray-700 focus:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 active:bg-gray-900 ${n&&`opacity-25`} `+e,disabled:n,children:r})}export{n as t};
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{a as e,c as t,n,t as r}from"./app-DqWc0bf2.js";import{t as i}from"./GuestLayout-CRv8xuaB.js";t();var a=r();function o({token:t,email:r}){let{data:o,setData:s,post:c,processing:l,errors:u,reset:d}=e({token:t,email:r,password:``,password_confirmation:``});return(0,a.jsxs)(i,{children:[(0,a.jsx)(n,{title:`Reset password`}),(0,a.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,a.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Set new password`}),(0,a.jsxs)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium`,children:[`Choose a strong password for `,(0,a.jsx)(`span`,{className:`text-[#3D4E4B] font-semibold`,children:r}),`.`]})]}),(0,a.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c(route(`password.store`),{onFinish:()=>d(`password`,`password_confirmation`)})},className:`space-y-4 anim-up`,style:{animationDelay:`0.1s`},children:[(0,a.jsx)(`input`,{type:`hidden`,value:o.email}),(0,a.jsx)(`input`,{type:`hidden`,value:o.token}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`label`,{htmlFor:`password`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`New password`}),(0,a.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`new-password`,autoFocus:!0,value:o.password,onChange:e=>s(`password`,e.target.value),placeholder:`Min. 8 characters`,className:`auth-input${u.password?` !border-red-300 !bg-red-50/50`:``}`}),u.password&&(0,a.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:u.password})]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`label`,{htmlFor:`password_confirmation`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Confirm new password`}),(0,a.jsx)(`input`,{id:`password_confirmation`,type:`password`,autoComplete:`new-password`,value:o.password_confirmation,onChange:e=>s(`password_confirmation`,e.target.value),placeholder:`••••••••`,className:`auth-input${u.password_confirmation?` !border-red-300 !bg-red-50/50`:``}`}),u.password_confirmation&&(0,a.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:u.password_confirmation})]}),(0,a.jsx)(`button`,{type:`submit`,disabled:l,className:`mt-2 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:l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,a.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,a.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Saving…`]}):`Reset password`})]})]})}export{o as default};
|
||||
import{a as e,c as t,n,t as r}from"./app-BK5KCPMc.js";import{t as i}from"./GuestLayout-CgPUg7Kz.js";t();var a=r();function o({token:t,email:r}){let{data:o,setData:s,post:c,processing:l,errors:u,reset:d}=e({token:t,email:r,password:``,password_confirmation:``});return(0,a.jsxs)(i,{children:[(0,a.jsx)(n,{title:`Reset password`}),(0,a.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,a.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Set new password`}),(0,a.jsxs)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium`,children:[`Choose a strong password for `,(0,a.jsx)(`span`,{className:`text-[#3D4E4B] font-semibold`,children:r}),`.`]})]}),(0,a.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c(route(`password.store`),{onFinish:()=>d(`password`,`password_confirmation`)})},className:`space-y-4 anim-up`,style:{animationDelay:`0.1s`},children:[(0,a.jsx)(`input`,{type:`hidden`,value:o.email}),(0,a.jsx)(`input`,{type:`hidden`,value:o.token}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`label`,{htmlFor:`password`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`New password`}),(0,a.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`new-password`,autoFocus:!0,value:o.password,onChange:e=>s(`password`,e.target.value),placeholder:`Min. 8 characters`,className:`auth-input${u.password?` !border-red-300 !bg-red-50/50`:``}`}),u.password&&(0,a.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:u.password})]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`label`,{htmlFor:`password_confirmation`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Confirm new password`}),(0,a.jsx)(`input`,{id:`password_confirmation`,type:`password`,autoComplete:`new-password`,value:o.password_confirmation,onChange:e=>s(`password_confirmation`,e.target.value),placeholder:`••••••••`,className:`auth-input${u.password_confirmation?` !border-red-300 !bg-red-50/50`:``}`}),u.password_confirmation&&(0,a.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:u.password_confirmation})]}),(0,a.jsx)(`button`,{type:`submit`,disabled:l,className:`mt-2 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:l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,a.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,a.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Saving…`]}):`Reset password`})]})]})}export{o as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{c as e,d as t,t as n}from"./app-DqWc0bf2.js";var r=n();function i({message:e,className:t=``,...n}){return e?(0,r.jsx)(`p`,{...n,className:`text-sm text-red-600 `+t,children:e}):null}function a({value:e,className:t=``,children:n,...i}){return(0,r.jsx)(`label`,{...i,className:`block text-sm font-medium text-gray-700 `+t,children:e||n})}var o=t(e(),1),s=Object.defineProperty,c=(e,t,n)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l=(e,t,n)=>(c(e,typeof t==`symbol`?t:t+``,n),n),u=new class{constructor(){l(this,`current`,this.detect()),l(this,`handoffState`,`pending`),l(this,`currentId`,0)}set(e){this.current!==e&&(this.handoffState=`pending`,this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===`server`}get isClient(){return this.current===`client`}detect(){return typeof window>`u`||typeof document>`u`?`server`:`client`}handoff(){this.handoffState===`pending`&&(this.handoffState=`complete`)}get isHandoffComplete(){return this.handoffState===`complete`}};function d(e){typeof queueMicrotask==`function`?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function f(){let e=[],t={addEventListener(e,n,r,i){return e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...e){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...e))},setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return d(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=f();return e(t),this.add(()=>t.dispose())},add(t){return e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function p(){let[e]=(0,o.useState)(f);return(0,o.useEffect)(()=>()=>e.dispose(),[e]),e}var m=(e,t)=>{u.isServer?(0,o.useEffect)(e,t):(0,o.useLayoutEffect)(e,t)};function h(e){let t=(0,o.useRef)(e);return m(()=>{t.current=e},[e]),t}var g=function(e){let t=h(e);return o.useCallback((...e)=>t.current(...e),[t])};function _(...e){return Array.from(new Set(e.flatMap(e=>typeof e==`string`?e.split(` `):[]))).filter(Boolean).join(` `)}function v(e,t,...n){if(e in t){let r=t[e];return typeof r==`function`?r(...n):r}let r=Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(`, `)}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,v),r}var y=(e=>(e[e.None=0]=`None`,e[e.RenderStrategy=1]=`RenderStrategy`,e[e.Static=2]=`Static`,e))(y||{}),b=(e=>(e[e.Unmount=0]=`Unmount`,e[e.Hidden=1]=`Hidden`,e))(b||{});function x(){let e=ee();return(0,o.useCallback)(t=>S({mergeRefs:e,...t}),[e])}function S({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:o,mergeRefs:s}){s??=w;let c=T(t,e);if(a)return C(c,n,r,o,s);let l=i??0;if(l&2){let{static:e=!1,...t}=c;if(e)return C(t,n,r,o,s)}if(l&1){let{unmount:e=!0,...t}=c;return v(+!e,{0(){return null},1(){return C({...t,hidden:!0,style:{display:`none`}},n,r,o,s)}})}return C(c,n,r,o,s)}function C(e,t={},n,r,i){let{as:a=n,children:s,refName:c=`ref`,...l}=O(e,[`unmount`,`static`]),u=e.ref===void 0?{}:{[c]:e.ref},d=typeof s==`function`?s(t):s;d=A(d),`className`in l&&l.className&&typeof l.className==`function`&&(l.className=l.className(t)),l[`aria-labelledby`]&&l[`aria-labelledby`]===l.id&&(l[`aria-labelledby`]=void 0);let f={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))typeof i==`boolean`&&(e=!0),i===!0&&n.push(r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e){f[`data-headlessui-state`]=n.join(` `);for(let e of n)f[`data-${e}`]=``}}if(j(a)&&(Object.keys(D(l)).length>0||Object.keys(D(f)).length>0))if(!(0,o.isValidElement)(d)||Array.isArray(d)&&d.length>1||M(d)){if(Object.keys(D(l)).length>0)throw Error([`Passing props on "Fragment"!`,``,`The current component <${r} /> is rendering a "Fragment".`,`However we need to passthrough the following props:`,Object.keys(D(l)).concat(Object.keys(D(f))).map(e=>` - ${e}`).join(`
|
||||
import{c as e,d as t,t as n}from"./app-BK5KCPMc.js";var r=n();function i({message:e,className:t=``,...n}){return e?(0,r.jsx)(`p`,{...n,className:`text-sm text-red-600 `+t,children:e}):null}function a({value:e,className:t=``,children:n,...i}){return(0,r.jsx)(`label`,{...i,className:`block text-sm font-medium text-gray-700 `+t,children:e||n})}var o=t(e(),1),s=Object.defineProperty,c=(e,t,n)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l=(e,t,n)=>(c(e,typeof t==`symbol`?t:t+``,n),n),u=new class{constructor(){l(this,`current`,this.detect()),l(this,`handoffState`,`pending`),l(this,`currentId`,0)}set(e){this.current!==e&&(this.handoffState=`pending`,this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===`server`}get isClient(){return this.current===`client`}detect(){return typeof window>`u`||typeof document>`u`?`server`:`client`}handoff(){this.handoffState===`pending`&&(this.handoffState=`complete`)}get isHandoffComplete(){return this.handoffState===`complete`}};function d(e){typeof queueMicrotask==`function`?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function f(){let e=[],t={addEventListener(e,n,r,i){return e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...e){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...e))},setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return d(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=f();return e(t),this.add(()=>t.dispose())},add(t){return e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function p(){let[e]=(0,o.useState)(f);return(0,o.useEffect)(()=>()=>e.dispose(),[e]),e}var m=(e,t)=>{u.isServer?(0,o.useEffect)(e,t):(0,o.useLayoutEffect)(e,t)};function h(e){let t=(0,o.useRef)(e);return m(()=>{t.current=e},[e]),t}var g=function(e){let t=h(e);return o.useCallback((...e)=>t.current(...e),[t])};function _(...e){return Array.from(new Set(e.flatMap(e=>typeof e==`string`?e.split(` `):[]))).filter(Boolean).join(` `)}function v(e,t,...n){if(e in t){let r=t[e];return typeof r==`function`?r(...n):r}let r=Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(`, `)}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,v),r}var y=(e=>(e[e.None=0]=`None`,e[e.RenderStrategy=1]=`RenderStrategy`,e[e.Static=2]=`Static`,e))(y||{}),b=(e=>(e[e.Unmount=0]=`Unmount`,e[e.Hidden=1]=`Hidden`,e))(b||{});function x(){let e=ee();return(0,o.useCallback)(t=>S({mergeRefs:e,...t}),[e])}function S({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:o,mergeRefs:s}){s??=w;let c=T(t,e);if(a)return C(c,n,r,o,s);let l=i??0;if(l&2){let{static:e=!1,...t}=c;if(e)return C(t,n,r,o,s)}if(l&1){let{unmount:e=!0,...t}=c;return v(+!e,{0(){return null},1(){return C({...t,hidden:!0,style:{display:`none`}},n,r,o,s)}})}return C(c,n,r,o,s)}function C(e,t={},n,r,i){let{as:a=n,children:s,refName:c=`ref`,...l}=O(e,[`unmount`,`static`]),u=e.ref===void 0?{}:{[c]:e.ref},d=typeof s==`function`?s(t):s;d=A(d),`className`in l&&l.className&&typeof l.className==`function`&&(l.className=l.className(t)),l[`aria-labelledby`]&&l[`aria-labelledby`]===l.id&&(l[`aria-labelledby`]=void 0);let f={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))typeof i==`boolean`&&(e=!0),i===!0&&n.push(r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e){f[`data-headlessui-state`]=n.join(` `);for(let e of n)f[`data-${e}`]=``}}if(j(a)&&(Object.keys(D(l)).length>0||Object.keys(D(f)).length>0))if(!(0,o.isValidElement)(d)||Array.isArray(d)&&d.length>1||M(d)){if(Object.keys(D(l)).length>0)throw Error([`Passing props on "Fragment"!`,``,`The current component <${r} /> is rendering a "Fragment".`,`However we need to passthrough the following props:`,Object.keys(D(l)).concat(Object.keys(D(f))).map(e=>` - ${e}`).join(`
|
||||
`),``,`You can apply a few solutions:`,['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',`Render a single element as the child so that we can forward the props onto that element.`].map(e=>` - ${e}`).join(`
|
||||
`)].join(`
|
||||
`))}else{let e=d.props?.className,t=typeof e==`function`?(...t)=>_(e(...t),l.className):_(e,l.className),n=t?{className:t}:{},r=T(d.props,D(O(l,[`ref`])));for(let e in f)e in r&&delete f[e];return(0,o.cloneElement)(d,Object.assign({},r,f,u,{ref:i(k(d),u.ref)},n))}return(0,o.createElement)(a,Object.assign({},O(l,[`ref`]),!j(a)&&u,!j(a)&&f),d)}function ee(){let e=(0,o.useRef)([]),t=(0,o.useCallback)(t=>{for(let n of e.current)n!=null&&(typeof n==`function`?n(t):n.current=t)},[]);return(...n)=>{if(!n.every(e=>e==null))return e.current=n,t}}function w(...e){return e.every(e=>e==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n==`function`?n(t):n.current=t)}}function T(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith(`on`)&&typeof r[e]==`function`?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t[`aria-disabled`])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>(e?.preventDefault)?.call(e)]);for(let e in n)Object.assign(t,{[e](t,...r){let i=n[e];for(let e of i){if((t instanceof Event||t?.nativeEvent instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function E(e){return Object.assign((0,o.forwardRef)(e),{displayName:e.displayName??e.name})}function D(e){let t=Object.assign({},e);for(let e in t)t[e]===void 0&&delete t[e];return t}function O(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function k(e){return`18.3.1`.split(`.`)[0]>=`19`?e.props.ref:e.ref}function A(e){if(e!=null&&e.$$typeof===Symbol.for(`react.lazy`)){let t=e._payload;if(t!=null&&t.status===`fulfilled`)return A(t.value)}return e}function j(e){return e===o.Fragment||e===Symbol.for(`react.fragment`)}function M(e){return j(e.type)}var N=Symbol();function P(e,t=!0){return Object.assign(e,{[N]:t})}function F(...e){let t=(0,o.useRef)(e);(0,o.useEffect)(()=>{t.current=e},[e]);let n=g(e=>{for(let n of t.current)n!=null&&(typeof n==`function`?n(e):n.current=e)});return e.every(e=>e==null||e?.[N])?void 0:n}function I(e=0){let[t,n]=(0,o.useState)(e);return{flags:t,setFlag:(0,o.useCallback)(e=>n(e),[]),addFlag:(0,o.useCallback)(e=>n(t=>t|e),[]),hasFlag:(0,o.useCallback)(e=>(t&e)===e,[t]),removeFlag:(0,o.useCallback)(e=>n(t=>t&~e),[]),toggleFlag:(0,o.useCallback)(e=>n(t=>t^e),[])}}typeof process<`u`&&typeof globalThis<`u`&&typeof Element<`u`&&(process==null?void 0:{})?.NODE_ENV===`test`&&(Element==null?void 0:Element.prototype)?.getAnimations===void 0&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.",``,`Example usage:`,"```js",`import { mockAnimationsApi } from 'jsdom-testing-mocks'`,`mockAnimationsApi()`,"```"].join(`
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{a as e,c as t,d as n,t as r}from"./app-DqWc0bf2.js";import{C as i,S as a,n as o,t as s}from"./TextInput-B5ybuGTV.js";import{t as c}from"./PrimaryButton-DFjJ1sTT.js";var l=n(t(),1),u=r();function d({className:t=``}){let n=(0,l.useRef)(),r=(0,l.useRef)(),{data:d,setData:f,errors:p,put:m,reset:h,processing:g,recentlySuccessful:_}=e({current_password:``,password:``,password_confirmation:``});return(0,u.jsxs)(`section`,{className:t,children:[(0,u.jsxs)(`header`,{children:[(0,u.jsx)(`h2`,{className:`text-lg font-medium text-gray-900`,children:`Update Password`}),(0,u.jsx)(`p`,{className:`mt-1 text-sm text-gray-600`,children:`Ensure your account is using a long, random password to stay secure.`})]}),(0,u.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),m(route(`password.update`),{preserveScroll:!0,onSuccess:()=>h(),onError:e=>{e.password&&(h(`password`,`password_confirmation`),n.current.focus()),e.current_password&&(h(`current_password`),r.current.focus())}})},className:`mt-6 space-y-6`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(a,{htmlFor:`current_password`,value:`Current Password`}),(0,u.jsx)(s,{id:`current_password`,ref:r,value:d.current_password,onChange:e=>f(`current_password`,e.target.value),type:`password`,className:`mt-1 block w-full`,autoComplete:`current-password`}),(0,u.jsx)(i,{message:p.current_password,className:`mt-2`})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(a,{htmlFor:`password`,value:`New Password`}),(0,u.jsx)(s,{id:`password`,ref:n,value:d.password,onChange:e=>f(`password`,e.target.value),type:`password`,className:`mt-1 block w-full`,autoComplete:`new-password`}),(0,u.jsx)(i,{message:p.password,className:`mt-2`})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(a,{htmlFor:`password_confirmation`,value:`Confirm Password`}),(0,u.jsx)(s,{id:`password_confirmation`,value:d.password_confirmation,onChange:e=>f(`password_confirmation`,e.target.value),type:`password`,className:`mt-1 block w-full`,autoComplete:`new-password`}),(0,u.jsx)(i,{message:p.password_confirmation,className:`mt-2`})]}),(0,u.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,u.jsx)(c,{disabled:g,children:`Save`}),(0,u.jsx)(o,{show:_,enter:`transition ease-in-out`,enterFrom:`opacity-0`,leave:`transition ease-in-out`,leaveTo:`opacity-0`,children:(0,u.jsx)(`p`,{className:`text-sm text-gray-600`,children:`Saved.`})})]})]})]})}export{d as default};
|
||||
import{a as e,c as t,d as n,t as r}from"./app-BK5KCPMc.js";import{C as i,S as a,n as o,t as s}from"./TextInput-BnQizTbW.js";import{t as c}from"./PrimaryButton-2i3vnLMz.js";var l=n(t(),1),u=r();function d({className:t=``}){let n=(0,l.useRef)(),r=(0,l.useRef)(),{data:d,setData:f,errors:p,put:m,reset:h,processing:g,recentlySuccessful:_}=e({current_password:``,password:``,password_confirmation:``});return(0,u.jsxs)(`section`,{className:t,children:[(0,u.jsxs)(`header`,{children:[(0,u.jsx)(`h2`,{className:`text-lg font-medium text-gray-900`,children:`Update Password`}),(0,u.jsx)(`p`,{className:`mt-1 text-sm text-gray-600`,children:`Ensure your account is using a long, random password to stay secure.`})]}),(0,u.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),m(route(`password.update`),{preserveScroll:!0,onSuccess:()=>h(),onError:e=>{e.password&&(h(`password`,`password_confirmation`),n.current.focus()),e.current_password&&(h(`current_password`),r.current.focus())}})},className:`mt-6 space-y-6`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(a,{htmlFor:`current_password`,value:`Current Password`}),(0,u.jsx)(s,{id:`current_password`,ref:r,value:d.current_password,onChange:e=>f(`current_password`,e.target.value),type:`password`,className:`mt-1 block w-full`,autoComplete:`current-password`}),(0,u.jsx)(i,{message:p.current_password,className:`mt-2`})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(a,{htmlFor:`password`,value:`New Password`}),(0,u.jsx)(s,{id:`password`,ref:n,value:d.password,onChange:e=>f(`password`,e.target.value),type:`password`,className:`mt-1 block w-full`,autoComplete:`new-password`}),(0,u.jsx)(i,{message:p.password,className:`mt-2`})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(a,{htmlFor:`password_confirmation`,value:`Confirm Password`}),(0,u.jsx)(s,{id:`password_confirmation`,value:d.password_confirmation,onChange:e=>f(`password_confirmation`,e.target.value),type:`password`,className:`mt-1 block w-full`,autoComplete:`new-password`}),(0,u.jsx)(i,{message:p.password_confirmation,className:`mt-2`})]}),(0,u.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,u.jsx)(c,{disabled:g,children:`Save`}),(0,u.jsx)(o,{show:_,enter:`transition ease-in-out`,enterFrom:`opacity-0`,leave:`transition ease-in-out`,leaveTo:`opacity-0`,children:(0,u.jsx)(`p`,{className:`text-sm text-gray-600`,children:`Saved.`})})]})]})]})}export{d as default};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{a as e,o as t,r as n,t as r}from"./app-DqWc0bf2.js";import{C as i,S as a,n as o,t as s}from"./TextInput-B5ybuGTV.js";import{t as c}from"./PrimaryButton-DFjJ1sTT.js";var l=r();function u({mustVerifyEmail:r,status:u,className:d=``}){let f=t().props.auth.user,{data:p,setData:m,patch:h,errors:g,processing:_,recentlySuccessful:v}=e({name:f.name,email:f.email});return(0,l.jsxs)(`section`,{className:d,children:[(0,l.jsxs)(`header`,{children:[(0,l.jsx)(`h2`,{className:`text-lg font-medium text-gray-900`,children:`Profile Information`}),(0,l.jsx)(`p`,{className:`mt-1 text-sm text-gray-600`,children:`Update your account's profile information and email address.`})]}),(0,l.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),h(route(`profile.update`))},className:`mt-6 space-y-6`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(a,{htmlFor:`name`,value:`Name`}),(0,l.jsx)(s,{id:`name`,className:`mt-1 block w-full`,value:p.name,onChange:e=>m(`name`,e.target.value),required:!0,isFocused:!0,autoComplete:`name`}),(0,l.jsx)(i,{className:`mt-2`,message:g.name})]}),(0,l.jsxs)(`div`,{children:[(0,l.jsx)(a,{htmlFor:`email`,value:`Email`}),(0,l.jsx)(s,{id:`email`,type:`email`,className:`mt-1 block w-full`,value:p.email,onChange:e=>m(`email`,e.target.value),required:!0,autoComplete:`username`}),(0,l.jsx)(i,{className:`mt-2`,message:g.email})]}),r&&f.email_verified_at===null&&(0,l.jsxs)(`div`,{children:[(0,l.jsxs)(`p`,{className:`mt-2 text-sm text-gray-800`,children:[`Your email address is unverified.`,(0,l.jsx)(n,{href:route(`verification.send`),method:`post`,as:`button`,className:`rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2`,children:`Click here to re-send the verification email.`})]}),u===`verification-link-sent`&&(0,l.jsx)(`div`,{className:`mt-2 text-sm font-medium text-green-600`,children:`A new verification link has been sent to your email address.`})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,l.jsx)(c,{disabled:_,children:`Save`}),(0,l.jsx)(o,{show:v,enter:`transition ease-in-out`,enterFrom:`opacity-0`,leave:`transition ease-in-out`,leaveTo:`opacity-0`,children:(0,l.jsx)(`p`,{className:`text-sm text-gray-600`,children:`Saved.`})})]})]})]})}export{u as default};
|
||||
import{a as e,o as t,r as n,t as r}from"./app-BK5KCPMc.js";import{C as i,S as a,n as o,t as s}from"./TextInput-BnQizTbW.js";import{t as c}from"./PrimaryButton-2i3vnLMz.js";var l=r();function u({mustVerifyEmail:r,status:u,className:d=``}){let f=t().props.auth.user,{data:p,setData:m,patch:h,errors:g,processing:_,recentlySuccessful:v}=e({name:f.name,email:f.email});return(0,l.jsxs)(`section`,{className:d,children:[(0,l.jsxs)(`header`,{children:[(0,l.jsx)(`h2`,{className:`text-lg font-medium text-gray-900`,children:`Profile Information`}),(0,l.jsx)(`p`,{className:`mt-1 text-sm text-gray-600`,children:`Update your account's profile information and email address.`})]}),(0,l.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),h(route(`profile.update`))},className:`mt-6 space-y-6`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(a,{htmlFor:`name`,value:`Name`}),(0,l.jsx)(s,{id:`name`,className:`mt-1 block w-full`,value:p.name,onChange:e=>m(`name`,e.target.value),required:!0,isFocused:!0,autoComplete:`name`}),(0,l.jsx)(i,{className:`mt-2`,message:g.name})]}),(0,l.jsxs)(`div`,{children:[(0,l.jsx)(a,{htmlFor:`email`,value:`Email`}),(0,l.jsx)(s,{id:`email`,type:`email`,className:`mt-1 block w-full`,value:p.email,onChange:e=>m(`email`,e.target.value),required:!0,autoComplete:`username`}),(0,l.jsx)(i,{className:`mt-2`,message:g.email})]}),r&&f.email_verified_at===null&&(0,l.jsxs)(`div`,{children:[(0,l.jsxs)(`p`,{className:`mt-2 text-sm text-gray-800`,children:[`Your email address is unverified.`,(0,l.jsx)(n,{href:route(`verification.send`),method:`post`,as:`button`,className:`rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2`,children:`Click here to re-send the verification email.`})]}),u===`verification-link-sent`&&(0,l.jsx)(`div`,{className:`mt-2 text-sm font-medium text-green-600`,children:`A new verification link has been sent to your email address.`})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,l.jsx)(c,{disabled:_,children:`Save`}),(0,l.jsx)(o,{show:v,enter:`transition ease-in-out`,enterFrom:`opacity-0`,leave:`transition ease-in-out`,leaveTo:`opacity-0`,children:(0,l.jsx)(`p`,{className:`text-sm text-gray-600`,children:`Saved.`})})]})]})]})}export{u as default};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{a as e,c as t,n,r,t as i}from"./app-DqWc0bf2.js";import{t as a}from"./GuestLayout-CRv8xuaB.js";t();var o=i();function s({status:t}){let{post:i,processing:s}=e({});return(0,o.jsxs)(a,{children:[(0,o.jsx)(n,{title:`Verify email`}),(0,o.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,o.jsx)(`div`,{className:`w-12 h-12 bg-[#3D4E4B]/5 rounded-2xl flex items-center justify-center mb-6`,children:(0,o.jsx)(`svg`,{className:`w-5 h-5 text-[#3D4E4B]`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,o.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z`})})}),(0,o.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Check your email`}),(0,o.jsx)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium leading-relaxed`,children:`We sent a verification link to your email address. Click the link to activate your account.`})]}),t===`verification-link-sent`&&(0,o.jsx)(`div`,{className:`mb-6 px-4 py-3 rounded-xl bg-emerald-50 border border-emerald-100 text-sm font-semibold text-emerald-700 anim-fade`,children:`A new verification link has been sent to your email.`}),(0,o.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),i(route(`verification.send`))},className:`anim-up`,style:{animationDelay:`0.1s`},children:(0,o.jsx)(`button`,{type:`submit`,disabled:s,className:`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:s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,o.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,o.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Sending…`]}):`Resend verification email`})}),(0,o.jsx)(`div`,{className:`mt-5 text-center anim-fade`,style:{animationDelay:`0.18s`},children:(0,o.jsx)(r,{href:route(`logout`),method:`post`,as:`button`,className:`text-sm font-semibold text-gray-400 hover:text-[#3D4E4B] transition-colors duration-200`,children:`Sign out`})})]})}export{s as default};
|
||||
import{a as e,c as t,n,r,t as i}from"./app-BK5KCPMc.js";import{t as a}from"./GuestLayout-CgPUg7Kz.js";t();var o=i();function s({status:t}){let{post:i,processing:s}=e({});return(0,o.jsxs)(a,{children:[(0,o.jsx)(n,{title:`Verify email`}),(0,o.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,o.jsx)(`div`,{className:`w-12 h-12 bg-[#3D4E4B]/5 rounded-2xl flex items-center justify-center mb-6`,children:(0,o.jsx)(`svg`,{className:`w-5 h-5 text-[#3D4E4B]`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,o.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z`})})}),(0,o.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Check your email`}),(0,o.jsx)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium leading-relaxed`,children:`We sent a verification link to your email address. Click the link to activate your account.`})]}),t===`verification-link-sent`&&(0,o.jsx)(`div`,{className:`mb-6 px-4 py-3 rounded-xl bg-emerald-50 border border-emerald-100 text-sm font-semibold text-emerald-700 anim-fade`,children:`A new verification link has been sent to your email.`}),(0,o.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),i(route(`verification.send`))},className:`anim-up`,style:{animationDelay:`0.1s`},children:(0,o.jsx)(`button`,{type:`submit`,disabled:s,className:`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:s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,o.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,o.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Sending…`]}):`Resend verification email`})}),(0,o.jsx)(`div`,{className:`mt-5 text-center anim-fade`,style:{animationDelay:`0.18s`},children:(0,o.jsx)(r,{href:route(`logout`),method:`post`,as:`button`,className:`text-sm font-semibold text-gray-400 hover:text-[#3D4E4B] transition-colors duration-200`,children:`Sign out`})})]})}export{s as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{c as e,n as t,t as n}from"./app-DqWc0bf2.js";e();var r=n();function i({auth:e}){return(0,r.jsxs)(`div`,{className:`min-h-screen bg-[#E3EBE8] text-[#3D4E4B] font-sans`,children:[(0,r.jsx)(t,{title:`Xxx`}),(0,r.jsxs)(`div`,{className:`max-w-7xl mx-auto px-6 py-12`,children:[(0,r.jsx)(`h1`,{className:`text-3xl font-bold mb-8`,children:`Xxx Page`}),(0,r.jsx)(`div`,{className:`bg-white rounded-lg shadow-sm p-6`,children:(0,r.jsx)(`p`,{children:`This is the new xxx page content.`})})]})]})}export{i as default};
|
||||
import{c as e,n as t,t as n}from"./app-BK5KCPMc.js";e();var r=n();function i({auth:e}){return(0,r.jsxs)(`div`,{className:`min-h-screen bg-[#E3EBE8] text-[#3D4E4B] font-sans`,children:[(0,r.jsx)(t,{title:`Xxx`}),(0,r.jsxs)(`div`,{className:`max-w-7xl mx-auto px-6 py-12`,children:[(0,r.jsx)(`h1`,{className:`text-3xl font-bold mb-8`,children:`Xxx Page`}),(0,r.jsx)(`div`,{className:`bg-white rounded-lg shadow-sm p-6`,children:(0,r.jsx)(`p`,{children:`This is the new xxx page content.`})})]})]})}export{i as default};
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
import{d as e,u as t}from"./app-DqWc0bf2.js";var n=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.Sweetalert2=r())})(e,(function(){function e(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function t(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function n(t,n){return t.get(e(t,n))}function r(e,n,r){t(e,n),n.set(e,r)}function i(t,n,r){return t.set(e(t,n),r),r}let a={},o=()=>{a.previousActiveElement instanceof HTMLElement?(a.previousActiveElement.focus(),a.previousActiveElement=null):document.body&&document.body.focus()},s=e=>new Promise(t=>{if(!e)return t();let n=window.scrollX,r=window.scrollY;a.restoreFocusTimeout=setTimeout(()=>{o(),t()},100),window.scrollTo(n,r)}),ee=`swal2-`,c=`container.shown.height-auto.iosfix.popup.modal.no-backdrop.no-transition.toast.toast-shown.show.hide.close.title.html-container.actions.confirm.deny.cancel.footer.icon.icon-content.image.input.file.range.select.radio.checkbox.label.textarea.inputerror.input-label.validation-message.progress-steps.active-progress-step.progress-step.progress-step-line.loader.loading.styled.top.top-start.top-end.top-left.top-right.center.center-start.center-end.center-left.center-right.bottom.bottom-start.bottom-end.bottom-left.bottom-right.grow-row.grow-column.grow-fullscreen.rtl.timer-progress-bar.timer-progress-bar-container.scrollbar-measure.icon-success.icon-warning.icon-info.icon-question.icon-error.draggable.dragging`.split(`.`).reduce((e,t)=>(e[t]=ee+t,e),{}),l=[`success`,`warning`,`info`,`question`,`error`].reduce((e,t)=>(e[t]=ee+t,e),{}),te=`SweetAlert2:`,ne=e=>e.charAt(0).toUpperCase()+e.slice(1),u=e=>{console.warn(`${te} ${typeof e==`object`?e.join(` `):e}`)},d=e=>{console.error(`${te} ${e}`)},re=[],ie=e=>{re.includes(e)||(re.push(e),u(e))},ae=(e,t=null)=>{ie(`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:``}`)},oe=e=>typeof e==`function`?e():e,se=e=>e&&typeof e.toPromise==`function`,f=e=>se(e)?e.toPromise():Promise.resolve(e),ce=e=>e&&Promise.resolve(e)===e,le=()=>navigator.userAgent.includes(`Firefox`),p=()=>document.body.querySelector(`.${c.container}`),m=e=>{let t=p();return t?t.querySelector(e):null},h=e=>m(`.${e}`),g=()=>h(c.popup),_=()=>h(c.icon),ue=()=>h(c[`icon-content`]),de=()=>h(c.title),fe=()=>h(c[`html-container`]),pe=()=>h(c.image),me=()=>h(c[`progress-steps`]),he=()=>h(c[`validation-message`]),v=()=>m(`.${c.actions} .${c.confirm}`),y=()=>m(`.${c.actions} .${c.cancel}`),b=()=>m(`.${c.actions} .${c.deny}`),ge=()=>h(c[`input-label`]),x=()=>m(`.${c.loader}`),S=()=>h(c.actions),_e=()=>h(c.footer),ve=()=>h(c[`timer-progress-bar`]),ye=()=>h(c.close),be=()=>{let e=g();if(!e)return[];let t=e.querySelectorAll(`[tabindex]:not([tabindex="-1"]):not([tabindex="0"])`),n=Array.from(t).sort((e,t)=>{let n=parseInt(e.getAttribute(`tabindex`)||`0`),r=parseInt(t.getAttribute(`tabindex`)||`0`);return n>r?1:n<r?-1:0}),r=e.querySelectorAll(`
|
||||
import{d as e,u as t}from"./app-BK5KCPMc.js";var n=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.Sweetalert2=r())})(e,(function(){function e(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function t(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function n(t,n){return t.get(e(t,n))}function r(e,n,r){t(e,n),n.set(e,r)}function i(t,n,r){return t.set(e(t,n),r),r}let a={},o=()=>{a.previousActiveElement instanceof HTMLElement?(a.previousActiveElement.focus(),a.previousActiveElement=null):document.body&&document.body.focus()},s=e=>new Promise(t=>{if(!e)return t();let n=window.scrollX,r=window.scrollY;a.restoreFocusTimeout=setTimeout(()=>{o(),t()},100),window.scrollTo(n,r)}),ee=`swal2-`,c=`container.shown.height-auto.iosfix.popup.modal.no-backdrop.no-transition.toast.toast-shown.show.hide.close.title.html-container.actions.confirm.deny.cancel.footer.icon.icon-content.image.input.file.range.select.radio.checkbox.label.textarea.inputerror.input-label.validation-message.progress-steps.active-progress-step.progress-step.progress-step-line.loader.loading.styled.top.top-start.top-end.top-left.top-right.center.center-start.center-end.center-left.center-right.bottom.bottom-start.bottom-end.bottom-left.bottom-right.grow-row.grow-column.grow-fullscreen.rtl.timer-progress-bar.timer-progress-bar-container.scrollbar-measure.icon-success.icon-warning.icon-info.icon-question.icon-error.draggable.dragging`.split(`.`).reduce((e,t)=>(e[t]=ee+t,e),{}),l=[`success`,`warning`,`info`,`question`,`error`].reduce((e,t)=>(e[t]=ee+t,e),{}),te=`SweetAlert2:`,ne=e=>e.charAt(0).toUpperCase()+e.slice(1),u=e=>{console.warn(`${te} ${typeof e==`object`?e.join(` `):e}`)},d=e=>{console.error(`${te} ${e}`)},re=[],ie=e=>{re.includes(e)||(re.push(e),u(e))},ae=(e,t=null)=>{ie(`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:``}`)},oe=e=>typeof e==`function`?e():e,se=e=>e&&typeof e.toPromise==`function`,f=e=>se(e)?e.toPromise():Promise.resolve(e),ce=e=>e&&Promise.resolve(e)===e,le=()=>navigator.userAgent.includes(`Firefox`),p=()=>document.body.querySelector(`.${c.container}`),m=e=>{let t=p();return t?t.querySelector(e):null},h=e=>m(`.${e}`),g=()=>h(c.popup),_=()=>h(c.icon),ue=()=>h(c[`icon-content`]),de=()=>h(c.title),fe=()=>h(c[`html-container`]),pe=()=>h(c.image),me=()=>h(c[`progress-steps`]),he=()=>h(c[`validation-message`]),v=()=>m(`.${c.actions} .${c.confirm}`),y=()=>m(`.${c.actions} .${c.cancel}`),b=()=>m(`.${c.actions} .${c.deny}`),ge=()=>h(c[`input-label`]),x=()=>m(`.${c.loader}`),S=()=>h(c.actions),_e=()=>h(c.footer),ve=()=>h(c[`timer-progress-bar`]),ye=()=>h(c.close),be=()=>{let e=g();if(!e)return[];let t=e.querySelectorAll(`[tabindex]:not([tabindex="-1"]):not([tabindex="0"])`),n=Array.from(t).sort((e,t)=>{let n=parseInt(e.getAttribute(`tabindex`)||`0`),r=parseInt(t.getAttribute(`tabindex`)||`0`);return n>r?1:n<r?-1:0}),r=e.querySelectorAll(`
|
||||
a[href],
|
||||
area[href],
|
||||
input:not([disabled]),
|
||||
+87
-87
@@ -1,41 +1,41 @@
|
||||
{
|
||||
"_AuthenticatedLayout-BmwijjRz.js": {
|
||||
"file": "assets/AuthenticatedLayout-BmwijjRz.js",
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js": {
|
||||
"file": "assets/AuthenticatedLayout-BjuyW-Hp.js",
|
||||
"name": "AuthenticatedLayout",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_Can-3RHznHg6.js": {
|
||||
"file": "assets/Can-3RHznHg6.js",
|
||||
"_Can-DkptxH2j.js": {
|
||||
"file": "assets/Can-DkptxH2j.js",
|
||||
"name": "Can",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_GuestLayout-CRv8xuaB.js": {
|
||||
"file": "assets/GuestLayout-CRv8xuaB.js",
|
||||
"_GuestLayout-CgPUg7Kz.js": {
|
||||
"file": "assets/GuestLayout-CgPUg7Kz.js",
|
||||
"name": "GuestLayout",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_Portal-DmZ4v-Fi.js": {
|
||||
"file": "assets/Portal-DmZ4v-Fi.js",
|
||||
"_Portal-C0c8udmH.js": {
|
||||
"file": "assets/Portal-C0c8udmH.js",
|
||||
"name": "Portal",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_PrimaryButton-DFjJ1sTT.js": {
|
||||
"file": "assets/PrimaryButton-DFjJ1sTT.js",
|
||||
"_PrimaryButton-2i3vnLMz.js": {
|
||||
"file": "assets/PrimaryButton-2i3vnLMz.js",
|
||||
"name": "PrimaryButton",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_TextInput-B5ybuGTV.js": {
|
||||
"file": "assets/TextInput-B5ybuGTV.js",
|
||||
"_TextInput-BnQizTbW.js": {
|
||||
"file": "assets/TextInput-BnQizTbW.js",
|
||||
"name": "TextInput",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
@@ -45,8 +45,8 @@
|
||||
"file": "assets/filepond-plugin-file-validate-type-CEtEkCs1.css",
|
||||
"src": "_filepond-plugin-file-validate-type-CEtEkCs1.css"
|
||||
},
|
||||
"_filepond-plugin-file-validate-type-CGrYUz4w.js": {
|
||||
"file": "assets/filepond-plugin-file-validate-type-CGrYUz4w.js",
|
||||
"_filepond-plugin-file-validate-type-tybTRj_0.js": {
|
||||
"file": "assets/filepond-plugin-file-validate-type-tybTRj_0.js",
|
||||
"name": "filepond-plugin-file-validate-type",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
@@ -55,19 +55,15 @@
|
||||
"assets/filepond-plugin-file-validate-type-CEtEkCs1.css"
|
||||
]
|
||||
},
|
||||
"_lodash-B3e-Jfxa.js": {
|
||||
"file": "assets/lodash-B3e-Jfxa.js",
|
||||
"_lodash-BXsCgLz3.js": {
|
||||
"file": "assets/lodash-BXsCgLz3.js",
|
||||
"name": "lodash",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_swal-DtpL8WXZ.css": {
|
||||
"file": "assets/swal-DtpL8WXZ.css",
|
||||
"src": "_swal-DtpL8WXZ.css"
|
||||
},
|
||||
"_swal-OIXtGkLz.js": {
|
||||
"file": "assets/swal-OIXtGkLz.js",
|
||||
"_swal-D8hRpOIh.js": {
|
||||
"file": "assets/swal-D8hRpOIh.js",
|
||||
"name": "swal",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
@@ -76,100 +72,104 @@
|
||||
"assets/swal-DtpL8WXZ.css"
|
||||
]
|
||||
},
|
||||
"_swal-DtpL8WXZ.css": {
|
||||
"file": "assets/swal-DtpL8WXZ.css",
|
||||
"src": "_swal-DtpL8WXZ.css"
|
||||
},
|
||||
"resources/js/Pages/ActivityLogs/Index.tsx": {
|
||||
"file": "assets/Index-iZXHCTiZ.js",
|
||||
"file": "assets/Index-DQODC9UE.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/ActivityLogs/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_lodash-B3e-Jfxa.js",
|
||||
"_Portal-DmZ4v-Fi.js",
|
||||
"_AuthenticatedLayout-BmwijjRz.js"
|
||||
"_lodash-BXsCgLz3.js",
|
||||
"_Portal-C0c8udmH.js",
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/ConfirmPassword.tsx": {
|
||||
"file": "assets/ConfirmPassword-C6-0ZP0v.js",
|
||||
"file": "assets/ConfirmPassword-DBNbpA9Y.js",
|
||||
"name": "ConfirmPassword",
|
||||
"src": "resources/js/Pages/Auth/ConfirmPassword.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CRv8xuaB.js"
|
||||
"_GuestLayout-CgPUg7Kz.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/ForgotPassword.tsx": {
|
||||
"file": "assets/ForgotPassword-5RyZU73F.js",
|
||||
"file": "assets/ForgotPassword-BGsGiFYN.js",
|
||||
"name": "ForgotPassword",
|
||||
"src": "resources/js/Pages/Auth/ForgotPassword.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CRv8xuaB.js"
|
||||
"_GuestLayout-CgPUg7Kz.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/Login.tsx": {
|
||||
"file": "assets/Login-BHcXBwht.js",
|
||||
"file": "assets/Login-qxXrNDeD.js",
|
||||
"name": "Login",
|
||||
"src": "resources/js/Pages/Auth/Login.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CRv8xuaB.js"
|
||||
"_GuestLayout-CgPUg7Kz.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/Register.tsx": {
|
||||
"file": "assets/Register-DMrOVXux.js",
|
||||
"file": "assets/Register-B7hpuNim.js",
|
||||
"name": "Register",
|
||||
"src": "resources/js/Pages/Auth/Register.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CRv8xuaB.js"
|
||||
"_GuestLayout-CgPUg7Kz.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/ResetPassword.tsx": {
|
||||
"file": "assets/ResetPassword-O4FY4xAn.js",
|
||||
"file": "assets/ResetPassword-Cp8_si20.js",
|
||||
"name": "ResetPassword",
|
||||
"src": "resources/js/Pages/Auth/ResetPassword.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CRv8xuaB.js"
|
||||
"_GuestLayout-CgPUg7Kz.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/VerifyEmail.tsx": {
|
||||
"file": "assets/VerifyEmail-CQjgYeZc.js",
|
||||
"file": "assets/VerifyEmail-BkreAOfA.js",
|
||||
"name": "VerifyEmail",
|
||||
"src": "resources/js/Pages/Auth/VerifyEmail.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CRv8xuaB.js"
|
||||
"_GuestLayout-CgPUg7Kz.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Dashboard.tsx": {
|
||||
"file": "assets/Dashboard-P03Nnp04.js",
|
||||
"file": "assets/Dashboard-BWFrXJia.js",
|
||||
"name": "Dashboard",
|
||||
"src": "resources/js/Pages/Dashboard.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_AuthenticatedLayout-BmwijjRz.js"
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Docs/Index.tsx": {
|
||||
"file": "assets/Index-QcFkapyT.js",
|
||||
"file": "assets/Index-BYUmRpDS.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/Docs/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_AuthenticatedLayout-BmwijjRz.js"
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Errors/Error.tsx": {
|
||||
"file": "assets/Error-adgn1zjE.js",
|
||||
"file": "assets/Error-CmUynFQU.js",
|
||||
"name": "Error",
|
||||
"src": "resources/js/Pages/Errors/Error.tsx",
|
||||
"isDynamicEntry": true,
|
||||
@@ -178,144 +178,144 @@
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Notifications/Index.tsx": {
|
||||
"file": "assets/Index-BtF9hYGF.js",
|
||||
"file": "assets/Index-DcNFR6n1.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/Notifications/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_swal-OIXtGkLz.js",
|
||||
"_AuthenticatedLayout-BmwijjRz.js"
|
||||
"_swal-D8hRpOIh.js",
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Profile/Edit.tsx": {
|
||||
"file": "assets/Edit-CcDyi3If.js",
|
||||
"file": "assets/Edit-CqP9KoA8.js",
|
||||
"name": "Edit",
|
||||
"src": "resources/js/Pages/Profile/Edit.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_filepond-plugin-file-validate-type-CGrYUz4w.js",
|
||||
"_swal-OIXtGkLz.js",
|
||||
"_AuthenticatedLayout-BmwijjRz.js"
|
||||
"_filepond-plugin-file-validate-type-tybTRj_0.js",
|
||||
"_swal-D8hRpOIh.js",
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Profile/Partials/DeleteUserForm.tsx": {
|
||||
"file": "assets/DeleteUserForm-cLRB8o-m.js",
|
||||
"file": "assets/DeleteUserForm-DSLo5Ybm.js",
|
||||
"name": "DeleteUserForm",
|
||||
"src": "resources/js/Pages/Profile/Partials/DeleteUserForm.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_TextInput-B5ybuGTV.js"
|
||||
"_TextInput-BnQizTbW.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Profile/Partials/UpdatePasswordForm.tsx": {
|
||||
"file": "assets/UpdatePasswordForm-XKh9sdaV.js",
|
||||
"file": "assets/UpdatePasswordForm-CoUiuw4Q.js",
|
||||
"name": "UpdatePasswordForm",
|
||||
"src": "resources/js/Pages/Profile/Partials/UpdatePasswordForm.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_TextInput-B5ybuGTV.js",
|
||||
"_PrimaryButton-DFjJ1sTT.js"
|
||||
"_TextInput-BnQizTbW.js",
|
||||
"_PrimaryButton-2i3vnLMz.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Profile/Partials/UpdateProfileInformationForm.tsx": {
|
||||
"file": "assets/UpdateProfileInformationForm-CnFhZVxg.js",
|
||||
"file": "assets/UpdateProfileInformationForm-DPfGMj-q.js",
|
||||
"name": "UpdateProfileInformationForm",
|
||||
"src": "resources/js/Pages/Profile/Partials/UpdateProfileInformationForm.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_TextInput-B5ybuGTV.js",
|
||||
"_PrimaryButton-DFjJ1sTT.js"
|
||||
"_TextInput-BnQizTbW.js",
|
||||
"_PrimaryButton-2i3vnLMz.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Roles/Index.tsx": {
|
||||
"file": "assets/Index-B2AGKzoM.js",
|
||||
"file": "assets/Index-DFR_vfBx.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/Roles/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_swal-OIXtGkLz.js",
|
||||
"_Can-3RHznHg6.js",
|
||||
"_Portal-DmZ4v-Fi.js",
|
||||
"_AuthenticatedLayout-BmwijjRz.js"
|
||||
"_swal-D8hRpOIh.js",
|
||||
"_Can-DkptxH2j.js",
|
||||
"_Portal-C0c8udmH.js",
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Settings/Index.tsx": {
|
||||
"file": "assets/Index-BILhoXMj.js",
|
||||
"file": "assets/Index-db0jqw8f.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/Settings/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_filepond-plugin-file-validate-type-CGrYUz4w.js",
|
||||
"_swal-OIXtGkLz.js",
|
||||
"_AuthenticatedLayout-BmwijjRz.js"
|
||||
"_filepond-plugin-file-validate-type-tybTRj_0.js",
|
||||
"_swal-D8hRpOIh.js",
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/SystemSettings/Index.tsx": {
|
||||
"file": "assets/Index-DqQOlVxj.js",
|
||||
"file": "assets/Index-Cx7Ouq_R.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/SystemSettings/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_filepond-plugin-file-validate-type-CGrYUz4w.js",
|
||||
"_swal-OIXtGkLz.js",
|
||||
"_AuthenticatedLayout-BmwijjRz.js"
|
||||
"_filepond-plugin-file-validate-type-tybTRj_0.js",
|
||||
"_swal-D8hRpOIh.js",
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/TwoFactor/Challenge.tsx": {
|
||||
"file": "assets/Challenge-BgN5E6DZ.js",
|
||||
"file": "assets/Challenge-BcvFwzFZ.js",
|
||||
"name": "Challenge",
|
||||
"src": "resources/js/Pages/TwoFactor/Challenge.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_swal-OIXtGkLz.js"
|
||||
"_swal-D8hRpOIh.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/TwoFactor/Setup.tsx": {
|
||||
"file": "assets/Setup-D4vFfX8y.js",
|
||||
"file": "assets/Setup-D7-GiQxF.js",
|
||||
"name": "Setup",
|
||||
"src": "resources/js/Pages/TwoFactor/Setup.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_swal-OIXtGkLz.js",
|
||||
"_AuthenticatedLayout-BmwijjRz.js"
|
||||
"_swal-D8hRpOIh.js",
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Users/Index.tsx": {
|
||||
"file": "assets/Index-nX1vMAVr.js",
|
||||
"file": "assets/Index-nOX76BwE.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/Users/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_lodash-B3e-Jfxa.js",
|
||||
"_swal-OIXtGkLz.js",
|
||||
"_Can-3RHznHg6.js",
|
||||
"_Portal-DmZ4v-Fi.js",
|
||||
"_AuthenticatedLayout-BmwijjRz.js"
|
||||
"_lodash-BXsCgLz3.js",
|
||||
"_swal-D8hRpOIh.js",
|
||||
"_Can-DkptxH2j.js",
|
||||
"_Portal-C0c8udmH.js",
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Users/Show.tsx": {
|
||||
"file": "assets/Show-DH84ZS1k.js",
|
||||
"file": "assets/Show-BhGooyPq.js",
|
||||
"name": "Show",
|
||||
"src": "resources/js/Pages/Users/Show.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_AuthenticatedLayout-BmwijjRz.js"
|
||||
"_AuthenticatedLayout-BjuyW-Hp.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Welcome.tsx": {
|
||||
"file": "assets/Welcome-B35TdKry.js",
|
||||
"file": "assets/Welcome-B4dAuF6T.js",
|
||||
"name": "Welcome",
|
||||
"src": "resources/js/Pages/Welcome.tsx",
|
||||
"isDynamicEntry": true,
|
||||
@@ -324,7 +324,7 @@
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Xxx.tsx": {
|
||||
"file": "assets/Xxx-KLIpAvoP.js",
|
||||
"file": "assets/Xxx-j7qS3EYb.js",
|
||||
"name": "Xxx",
|
||||
"src": "resources/js/Pages/Xxx.tsx",
|
||||
"isDynamicEntry": true,
|
||||
@@ -333,7 +333,7 @@
|
||||
]
|
||||
},
|
||||
"resources/js/app.tsx": {
|
||||
"file": "assets/app-DqWc0bf2.js",
|
||||
"file": "assets/app-BK5KCPMc.js",
|
||||
"name": "app",
|
||||
"src": "resources/js/app.tsx",
|
||||
"isEntry": true,
|
||||
|
||||
@@ -17,6 +17,10 @@ registerPlugin(FilePondPluginImagePreview, FilePondPluginFileValidateType);
|
||||
interface SettingsProps extends PageProps {
|
||||
mustVerifyEmail: boolean;
|
||||
status?: string;
|
||||
twoFactorSettings: {
|
||||
totp_allowed: boolean;
|
||||
email_allowed: boolean;
|
||||
};
|
||||
twoFactor: {
|
||||
enabled: boolean;
|
||||
qr_code: string | null;
|
||||
@@ -66,15 +70,28 @@ function getSettingsTabFromHash(): SettingsTab {
|
||||
return SETTINGS_TABS.includes(hash) ? hash : 'profile';
|
||||
}
|
||||
|
||||
export default function SettingsIndex({ twoFactor }: SettingsProps) {
|
||||
export default function SettingsIndex({ twoFactor, twoFactorSettings }: SettingsProps) {
|
||||
const { user } = usePage<PageProps>().props.auth;
|
||||
const [activeTab, setActiveTab] = useState<SettingsTab>(getSettingsTabFromHash);
|
||||
const [activeTab, setActiveTab] = useState<SettingsTab>(() => {
|
||||
const hash = getSettingsTabFromHash();
|
||||
if (hash === '2fa' && !(twoFactorSettings.totp_allowed || twoFactorSettings.email_allowed)) {
|
||||
return 'profile';
|
||||
}
|
||||
return hash;
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
const onHashChange = () => setActiveTab(getSettingsTabFromHash());
|
||||
const onHashChange = () => {
|
||||
const hash = getSettingsTabFromHash();
|
||||
if (hash === '2fa' && !(twoFactorSettings.totp_allowed || twoFactorSettings.email_allowed)) {
|
||||
setActiveTab('profile');
|
||||
} else {
|
||||
setActiveTab(hash);
|
||||
}
|
||||
};
|
||||
window.addEventListener('hashchange', onHashChange);
|
||||
return () => window.removeEventListener('hashchange', onHashChange);
|
||||
}, []);
|
||||
}, [twoFactorSettings]);
|
||||
|
||||
const switchTab = (tab: SettingsTab) => {
|
||||
window.location.hash = tab;
|
||||
@@ -260,11 +277,13 @@ export default function SettingsIndex({ twoFactor }: SettingsProps) {
|
||||
Security & Password
|
||||
{activeTab === 'security' && <span className="absolute bottom-0 left-0 w-full h-0.5 bg-[#D4A017] rounded-t-full" />}
|
||||
</button>
|
||||
<button type="button" onClick={() => switchTab('2fa')}
|
||||
className={`relative pb-3 px-1 mr-8 text-sm font-bold tracking-tight transition-colors ${activeTab === '2fa' ? 'text-[#3D4E4B]' : 'text-gray-400 hover:text-[#3D4E4B]'}`}>
|
||||
Two-Factor Auth
|
||||
{activeTab === '2fa' && <span className="absolute bottom-0 left-0 w-full h-0.5 bg-[#D4A017] rounded-t-full" />}
|
||||
</button>
|
||||
{(twoFactorSettings.totp_allowed || twoFactorSettings.email_allowed) && (
|
||||
<button type="button" onClick={() => switchTab('2fa')}
|
||||
className={`relative pb-3 px-1 mr-8 text-sm font-bold tracking-tight transition-colors ${activeTab === '2fa' ? 'text-[#3D4E4B]' : 'text-gray-400 hover:text-[#3D4E4B]'}`}>
|
||||
Two-Factor Auth
|
||||
{activeTab === '2fa' && <span className="absolute bottom-0 left-0 w-full h-0.5 bg-[#D4A017] rounded-t-full" />}
|
||||
</button>
|
||||
)}
|
||||
<button type="button" onClick={() => switchTab('danger')}
|
||||
className={`relative pb-3 px-1 text-sm font-bold tracking-tight transition-colors ${activeTab === 'danger' ? 'text-red-600' : 'text-gray-400 hover:text-red-600'}`}>
|
||||
Danger Zone
|
||||
@@ -380,136 +399,140 @@ export default function SettingsIndex({ twoFactor }: SettingsProps) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!twoFactor.enabled ? (
|
||||
<SectionCard title="Setup Authenticator App" description="Scan QR code dengan Google Authenticator, Authy, atau TOTP app lainnya">
|
||||
<div className="flex flex-col md:flex-row gap-10 items-center md:items-start">
|
||||
<div className="shrink-0">
|
||||
<div className="p-4 bg-white border-2 border-gray-100 rounded-2xl inline-block shadow-sm">
|
||||
{twoFactor.qr_code && <img src={twoFactor.qr_code} alt="2FA QR Code" className="w-44 h-44" />}
|
||||
{twoFactorSettings.totp_allowed && (
|
||||
!twoFactor.enabled ? (
|
||||
<SectionCard title="Setup Authenticator App" description="Scan QR code dengan Google Authenticator, Authy, atau TOTP app lainnya">
|
||||
<div className="flex flex-col md:flex-row gap-10 items-center md:items-start">
|
||||
<div className="shrink-0">
|
||||
<div className="p-4 bg-white border-2 border-gray-100 rounded-2xl inline-block shadow-sm">
|
||||
{twoFactor.qr_code && <img src={twoFactor.qr_code} alt="2FA QR Code" className="w-44 h-44" />}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-1 space-y-6">
|
||||
<div className="space-y-3">
|
||||
{[
|
||||
'Install aplikasi authenticator (Google Authenticator, Authy, 1Password)',
|
||||
'Scan QR code atau masukkan manual key di bawah',
|
||||
'Masukkan kode 6 digit dari aplikasi untuk mengaktifkan',
|
||||
].map((step, i) => (
|
||||
<div key={i} className="flex items-start gap-3">
|
||||
<div className="w-6 h-6 rounded-full bg-[#3D4E4B] text-white text-[10px] font-black flex items-center justify-center shrink-0 mt-0.5">{i + 1}</div>
|
||||
<p className="text-xs font-medium text-gray-500 leading-relaxed pt-0.5">{step}</p>
|
||||
<div className="flex-1 space-y-6">
|
||||
<div className="space-y-3">
|
||||
{[
|
||||
'Install aplikasi authenticator (Google Authenticator, Authy, 1Password)',
|
||||
'Scan QR code atau masukkan manual key di bawah',
|
||||
'Masukkan kode 6 digit dari aplikasi untuk mengaktifkan',
|
||||
].map((step, i) => (
|
||||
<div key={i} className="flex items-start gap-3">
|
||||
<div className="w-6 h-6 rounded-full bg-[#3D4E4B] text-white text-[10px] font-black flex items-center justify-center shrink-0 mt-0.5">{i + 1}</div>
|
||||
<p className="text-xs font-medium text-gray-500 leading-relaxed pt-0.5">{step}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-xs font-semibold text-gray-400 mb-1.5">Manual Key</label>
|
||||
<div className="flex items-center gap-2">
|
||||
<code className="flex-1 text-xs font-mono bg-gray-50 border border-gray-100 rounded-xl px-4 py-3 text-[#3D4E4B] tracking-wider">
|
||||
{twoFactor.secret}
|
||||
</code>
|
||||
<button onClick={copySecret} type="button"
|
||||
className="shrink-0 h-11 px-4 border border-gray-200 rounded-xl text-xs font-bold text-gray-500 hover:bg-gray-50 transition-all">
|
||||
{copiedSecret ? '✓ Copied' : 'Copy'}
|
||||
</button>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-xs font-semibold text-gray-400 mb-1.5">Manual Key</label>
|
||||
<div className="flex items-center gap-2">
|
||||
<code className="flex-1 text-xs font-mono bg-gray-50 border border-gray-100 rounded-xl px-4 py-3 text-[#3D4E4B] tracking-wider">
|
||||
{twoFactor.secret}
|
||||
</code>
|
||||
<button onClick={copySecret} type="button"
|
||||
className="shrink-0 h-11 px-4 border border-gray-200 rounded-xl text-xs font-bold text-gray-500 hover:bg-gray-50 transition-all">
|
||||
{copiedSecret ? '✓ Copied' : 'Copy'}
|
||||
</div>
|
||||
<form onSubmit={handleEnable2FA} className="space-y-3">
|
||||
<div>
|
||||
<label className="block text-xs font-semibold text-gray-400 mb-1.5">Verification Code *</label>
|
||||
<input type="text" inputMode="numeric" maxLength={6}
|
||||
value={twoFactorForm.data.code}
|
||||
onChange={e => twoFactorForm.setData('code', e.target.value)}
|
||||
className="input-field w-full text-center tracking-[0.5em] font-bold text-lg"
|
||||
placeholder="000000" />
|
||||
{twoFactorForm.errors.code && <p className="text-xs text-red-500 font-semibold mt-1">{twoFactorForm.errors.code}</p>}
|
||||
</div>
|
||||
<button type="submit" disabled={twoFactorForm.processing || twoFactorForm.data.code.length < 6}
|
||||
className="w-full h-11 bg-[#3D4E4B] text-white text-xs font-bold rounded-xl hover:bg-[#2D3A38] transition-all disabled:opacity-60">
|
||||
{twoFactorForm.processing ? 'Verifying...' : 'Enable Two-Factor Authentication'}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<form onSubmit={handleEnable2FA} className="space-y-3">
|
||||
<div>
|
||||
<label className="block text-xs font-semibold text-gray-400 mb-1.5">Verification Code *</label>
|
||||
<input type="text" inputMode="numeric" maxLength={6}
|
||||
value={twoFactorForm.data.code}
|
||||
onChange={e => twoFactorForm.setData('code', e.target.value)}
|
||||
className="input-field w-full text-center tracking-[0.5em] font-bold text-lg"
|
||||
placeholder="000000" />
|
||||
{twoFactorForm.errors.code && <p className="text-xs text-red-500 font-semibold mt-1">{twoFactorForm.errors.code}</p>}
|
||||
</div>
|
||||
<button type="submit" disabled={twoFactorForm.processing || twoFactorForm.data.code.length < 6}
|
||||
className="w-full h-11 bg-[#3D4E4B] text-white text-xs font-bold rounded-xl hover:bg-[#2D3A38] transition-all disabled:opacity-60">
|
||||
{twoFactorForm.processing ? 'Verifying...' : 'Enable Two-Factor Authentication'}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</SectionCard>
|
||||
) : (
|
||||
<div className="space-y-4">
|
||||
<div className="bg-white rounded-2xl border border-emerald-100 shadow-sm p-6 flex items-center gap-4">
|
||||
<div className="w-12 h-12 rounded-xl bg-emerald-50 flex items-center justify-center shrink-0">
|
||||
<svg className="w-6 h-6 text-emerald-600" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.5}>
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
||||
</svg>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="text-sm font-bold text-[#3D4E4B]">Two-Factor Authentication Aktif</div>
|
||||
<div className="text-xs text-gray-400 font-medium mt-0.5">Akun Anda dilindungi dengan TOTP authentication.</div>
|
||||
</div>
|
||||
<button onClick={handleDisable2FA} type="button"
|
||||
className="h-9 px-5 text-xs font-bold text-red-500 border border-red-200 rounded-xl hover:bg-red-50 transition-all">
|
||||
Disable 2FA
|
||||
</button>
|
||||
</div>
|
||||
<SectionCard title="Recovery Codes" description="Simpan kode ini dengan aman — gunakan jika kehilangan akses ke authenticator">
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<button onClick={() => setShowCodes(!showCodes)} type="button"
|
||||
className="h-8 px-4 text-xs font-bold text-[#3D4E4B] border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
{showCodes ? 'Hide' : 'Show Codes'}
|
||||
</button>
|
||||
<button onClick={handleRegenerate} type="button"
|
||||
className="h-8 px-4 text-xs font-bold text-[#D4A017] border border-amber-200 rounded-lg hover:bg-amber-50 transition-all">
|
||||
Regenerate
|
||||
</button>
|
||||
</div>
|
||||
{showCodes && twoFactor.recovery_codes.length > 0 && (
|
||||
<div>
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
{twoFactor.recovery_codes.map((code, i) => (
|
||||
<code key={i} className="px-4 py-2.5 bg-gray-50 border border-gray-100 rounded-xl text-xs font-mono text-[#3D4E4B] tracking-wider text-center">
|
||||
{code}
|
||||
</code>
|
||||
))}
|
||||
</div>
|
||||
<p className="text-[11px] text-amber-600 font-semibold mt-3">⚠ Setiap kode hanya bisa digunakan sekali.</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</SectionCard>
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-4">
|
||||
<div className="bg-white rounded-2xl border border-emerald-100 shadow-sm p-6 flex items-center gap-4">
|
||||
<div className="w-12 h-12 rounded-xl bg-emerald-50 flex items-center justify-center shrink-0">
|
||||
<svg className="w-6 h-6 text-emerald-600" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.5}>
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
||||
</svg>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="text-sm font-bold text-[#3D4E4B]">Two-Factor Authentication Aktif</div>
|
||||
<div className="text-xs text-gray-400 font-medium mt-0.5">Akun Anda dilindungi dengan TOTP authentication.</div>
|
||||
</div>
|
||||
<button onClick={handleDisable2FA} type="button"
|
||||
className="h-9 px-5 text-xs font-bold text-red-500 border border-red-200 rounded-xl hover:bg-red-50 transition-all">
|
||||
Disable 2FA
|
||||
</button>
|
||||
</div>
|
||||
<SectionCard title="Recovery Codes" description="Simpan kode ini dengan aman — gunakan jika kehilangan akses ke authenticator">
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<button onClick={() => setShowCodes(!showCodes)} type="button"
|
||||
className="h-8 px-4 text-xs font-bold text-[#3D4E4B] border border-gray-200 rounded-lg hover:bg-gray-50 transition-all">
|
||||
{showCodes ? 'Hide' : 'Show Codes'}
|
||||
</button>
|
||||
<button onClick={handleRegenerate} type="button"
|
||||
className="h-8 px-4 text-xs font-bold text-[#D4A017] border border-amber-200 rounded-lg hover:bg-amber-50 transition-all">
|
||||
Regenerate
|
||||
</button>
|
||||
</div>
|
||||
{showCodes && twoFactor.recovery_codes.length > 0 && (
|
||||
<div>
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
{twoFactor.recovery_codes.map((code, i) => (
|
||||
<code key={i} className="px-4 py-2.5 bg-gray-50 border border-gray-100 rounded-xl text-xs font-mono text-[#3D4E4B] tracking-wider text-center">
|
||||
{code}
|
||||
</code>
|
||||
))}
|
||||
</div>
|
||||
<p className="text-[11px] text-amber-600 font-semibold mt-3">⚠ Setiap kode hanya bisa digunakan sekali.</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</SectionCard>
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
|
||||
{/* Email 2FA Setup */}
|
||||
<div className="bg-white rounded-2xl border border-gray-100 shadow-sm p-6 flex items-center gap-4">
|
||||
<div className="w-12 h-12 rounded-xl bg-blue-50 flex items-center justify-center shrink-0">
|
||||
<svg className="w-6 h-6 text-[#D4A017]" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.5}>
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
|
||||
</svg>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="text-sm font-bold text-[#3D4E4B]">Two-Factor Authentication via Email</div>
|
||||
<div className="text-xs text-gray-400 font-medium mt-0.5">
|
||||
{twoFactor.email_enabled
|
||||
? 'Email 2FA is active. Every login attempt will require an OTP code sent to your email.'
|
||||
: 'Receive a 6-digit OTP code in your email to secure your login sessions.'}
|
||||
{twoFactorSettings.email_allowed && (
|
||||
<div className="bg-white rounded-2xl border border-gray-100 shadow-sm p-6 flex items-center gap-4">
|
||||
<div className="w-12 h-12 rounded-xl bg-blue-50 flex items-center justify-center shrink-0">
|
||||
<svg className="w-6 h-6 text-[#D4A017]" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.5}>
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
|
||||
</svg>
|
||||
</div>
|
||||
{!twoFactor.smtp_configured && (
|
||||
<div className="flex items-center gap-1.5 mt-2 text-[11px] font-bold text-amber-600 bg-amber-50 px-2.5 py-1 rounded-lg w-fit border border-amber-200">
|
||||
<span className="text-sm">⚠</span>
|
||||
<span>SMTP Mail Server is not configured. Setup required.</span>
|
||||
<div className="flex-1">
|
||||
<div className="text-sm font-bold text-[#3D4E4B]">Two-Factor Authentication via Email</div>
|
||||
<div className="text-xs text-gray-400 font-medium mt-0.5">
|
||||
{twoFactor.email_enabled
|
||||
? 'Email 2FA is active. Every login attempt will require an OTP code sent to your email.'
|
||||
: 'Receive a 6-digit OTP code in your email to secure your login sessions.'}
|
||||
</div>
|
||||
{!twoFactor.smtp_configured && (
|
||||
<div className="flex items-center gap-1.5 mt-2 text-[11px] font-bold text-amber-600 bg-amber-50 px-2.5 py-1 rounded-lg w-fit border border-amber-200">
|
||||
<span className="text-sm">⚠</span>
|
||||
<span>SMTP Mail Server is not configured. Setup required.</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{twoFactor.email_enabled ? (
|
||||
<button onClick={() => handleToggleEmail2FA(false)} type="button"
|
||||
className="h-9 px-5 text-xs font-bold text-red-500 border border-red-200 rounded-xl hover:bg-red-50 transition-all">
|
||||
Disable Email 2FA
|
||||
</button>
|
||||
) : (
|
||||
<button onClick={() => handleToggleEmail2FA(true)} type="button"
|
||||
className="h-9 px-5 text-xs font-bold text-[#3D4E4B] border border-gray-200 rounded-xl hover:bg-gray-50 transition-all">
|
||||
Enable Email 2FA
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{twoFactor.email_enabled ? (
|
||||
<button onClick={() => handleToggleEmail2FA(false)} type="button"
|
||||
className="h-9 px-5 text-xs font-bold text-red-500 border border-red-200 rounded-xl hover:bg-red-50 transition-all">
|
||||
Disable Email 2FA
|
||||
</button>
|
||||
) : (
|
||||
<button onClick={() => handleToggleEmail2FA(true)} type="button"
|
||||
className="h-9 px-5 text-xs font-bold text-[#3D4E4B] border border-gray-200 rounded-xl hover:bg-gray-50 transition-all">
|
||||
Enable Email 2FA
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -126,6 +126,8 @@ export default function SystemSettings({ settings }: SystemSettingsProps) {
|
||||
password_require_symbols: settings.password_require_symbols === '1' || settings.password_require_symbols === true,
|
||||
password_require_numbers: settings.password_require_numbers === '1' || settings.password_require_numbers === true,
|
||||
password_require_mixed_case: settings.password_require_mixed_case === '1' || settings.password_require_mixed_case === true,
|
||||
two_factor_totp_enabled: settings.two_factor_totp_enabled === '1' || settings.two_factor_totp_enabled === true,
|
||||
two_factor_email_enabled: settings.two_factor_email_enabled === '1' || settings.two_factor_email_enabled === true,
|
||||
oauth_google_enabled: settings.oauth_google_enabled === '1' || settings.oauth_google_enabled === true,
|
||||
oauth_google_client_id: settings.oauth_google_client_id || '',
|
||||
oauth_google_client_secret: settings.oauth_google_client_secret || '',
|
||||
@@ -237,41 +239,52 @@ export default function SystemSettings({ settings }: SystemSettingsProps) {
|
||||
)}
|
||||
|
||||
{activeTab === 'security' && (
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8 anim-fade">
|
||||
<SectionCard title="Password Standards" description="Complexity requirements for user access" delay="0.1s">
|
||||
<div className="space-y-2">
|
||||
<ToggleItem label="Require Symbols" description="Include special characters (!@#$)" checked={data.settings.password_require_symbols} onChange={v => handleChange('password_require_symbols', v)} />
|
||||
<ToggleItem label="Require Numbers" description="Include numerical digits (0-9)" checked={data.settings.password_require_numbers} onChange={v => handleChange('password_require_numbers', v)} />
|
||||
<ToggleItem label="Require Mixed Case" description="Force Uppercase and Lowercase letters" checked={data.settings.password_require_mixed_case} onChange={v => handleChange('password_require_mixed_case', v)} />
|
||||
<div className="flex items-center justify-between py-4 mt-2 border-t border-gray-50">
|
||||
<span className="text-sm font-bold text-[#3D4E4B]">Minimum Length</span>
|
||||
<input type="number" value={data.settings.password_minimum_length} onChange={e => handleChange('password_minimum_length', parseInt(e.target.value))} className="w-16 h-10 input-field text-center px-2 text-[#D4A017] font-bold" />
|
||||
</div>
|
||||
</div>
|
||||
</SectionCard>
|
||||
|
||||
<SectionCard title="OAuth Providers" description="Third-party authentication protocols" delay="0.15s">
|
||||
<div className="space-y-6">
|
||||
{['google', 'github'].map(prov => (
|
||||
<div key={prov} className="p-6 rounded-2xl bg-gray-50/50 border border-gray-100">
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<div className="text-sm font-bold text-[#3D4E4B] tracking-tight capitalize flex items-center gap-2">
|
||||
<span className={`w-2 h-2 rounded-full ${data.settings[`oauth_${prov}_enabled` as keyof typeof data.settings] ? 'bg-green-500' : 'bg-gray-300'}`} />
|
||||
{prov} Login
|
||||
</div>
|
||||
<label className="relative inline-flex items-center cursor-pointer scale-90">
|
||||
<input type="checkbox" className="sr-only peer" checked={data.settings[`oauth_${prov}_enabled` as keyof typeof data.settings]} onChange={e => handleChange(`oauth_${prov}_enabled`, e.target.checked)} />
|
||||
<div className="w-10 h-5 bg-gray-300 rounded-full peer peer-checked:bg-[#D4A017] after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-400 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:after:translate-x-full border border-gray-200"></div>
|
||||
</label>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<InputField label="Client ID" value={data.settings[`oauth_${prov}_client_id` as keyof typeof data.settings]} onChange={(v:any) => handleChange(`oauth_${prov}_client_id`, v)} placeholder={`Enter ${prov} Client ID`} />
|
||||
<InputField label="Client Secret" type="password" value={data.settings[`oauth_${prov}_client_secret` as keyof typeof data.settings]} onChange={(v:any) => handleChange(`oauth_${prov}_client_secret`, v)} placeholder="••••••••" />
|
||||
</div>
|
||||
<div className="space-y-8 anim-fade">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||
<SectionCard title="Password Standards" description="Complexity requirements for user access" delay="0.1s">
|
||||
<div className="space-y-2">
|
||||
<ToggleItem label="Require Symbols" description="Include special characters (!@#$)" checked={data.settings.password_require_symbols} onChange={v => handleChange('password_require_symbols', v)} />
|
||||
<ToggleItem label="Require Numbers" description="Include numerical digits (0-9)" checked={data.settings.password_require_numbers} onChange={v => handleChange('password_require_numbers', v)} />
|
||||
<ToggleItem label="Require Mixed Case" description="Force Uppercase and Lowercase letters" checked={data.settings.password_require_mixed_case} onChange={v => handleChange('password_require_mixed_case', v)} />
|
||||
<div className="flex items-center justify-between py-4 mt-2 border-t border-gray-50">
|
||||
<span className="text-sm font-bold text-[#3D4E4B]">Minimum Length</span>
|
||||
<input type="number" value={data.settings.password_minimum_length} onChange={e => handleChange('password_minimum_length', parseInt(e.target.value))} className="w-16 h-10 input-field text-center px-2 text-[#D4A017] font-bold" />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</SectionCard>
|
||||
</div>
|
||||
</SectionCard>
|
||||
|
||||
<SectionCard title="Two-Factor Authentication (2FA)" description="Configure globally available 2FA options for users" delay="0.12s">
|
||||
<div className="space-y-2">
|
||||
<ToggleItem label="Google Authenticator (TOTP)" description="Allow users to use Authenticator Apps (Google, Authy, etc.)" checked={data.settings.two_factor_totp_enabled} onChange={v => handleChange('two_factor_totp_enabled', v)} />
|
||||
<ToggleItem label="Email 2FA" description="Allow users to receive 6-digit OTP codes via email (requires SMTP configuration)" checked={data.settings.two_factor_email_enabled} onChange={v => handleChange('two_factor_email_enabled', v)} />
|
||||
</div>
|
||||
</SectionCard>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||
<SectionCard title="OAuth Providers" description="Third-party authentication protocols" delay="0.15s">
|
||||
<div className="space-y-6">
|
||||
{['google', 'github'].map(prov => (
|
||||
<div key={prov} className="p-6 rounded-2xl bg-gray-50/50 border border-gray-100">
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<div className="text-sm font-bold text-[#3D4E4B] tracking-tight capitalize flex items-center gap-2">
|
||||
<span className={`w-2 h-2 rounded-full ${data.settings[`oauth_${prov}_enabled` as keyof typeof data.settings] ? 'bg-green-500' : 'bg-gray-300'}`} />
|
||||
{prov} Login
|
||||
</div>
|
||||
<label className="relative inline-flex items-center cursor-pointer scale-90">
|
||||
<input type="checkbox" className="sr-only peer" checked={data.settings[`oauth_${prov}_enabled` as keyof typeof data.settings]} onChange={e => handleChange(`oauth_${prov}_enabled`, e.target.checked)} />
|
||||
<div className="w-10 h-5 bg-gray-300 rounded-full peer peer-checked:bg-[#D4A017] after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-400 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:after:translate-x-full border border-gray-200"></div>
|
||||
</label>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<InputField label="Client ID" value={data.settings[`oauth_${prov}_client_id` as keyof typeof data.settings]} onChange={(v:any) => handleChange(`oauth_${prov}_client_id`, v)} placeholder={`Enter ${prov} Client ID`} />
|
||||
<InputField label="Client Secret" type="password" value={data.settings[`oauth_${prov}_client_secret` as keyof typeof data.settings]} onChange={(v:any) => handleChange(`oauth_${prov}_client_secret`, v)} placeholder="••••••••" />
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</SectionCard>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user