fix: remove dark mode from all login UIs, redesign gacha login modal
- Stripped all dark: classes from hackathon, dimentorin, backoffice, and qrcampaign login pages — light mode only - Rewrote gacha login modal to match the unified clean design: clean typography, native inputs with eye toggle, proper spacing, removed old IMPHNEN logo header and Indonesian text Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
2cba806cd5
commit
7f5948724b
@@ -29,26 +29,26 @@ export default function LoginPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex justify-center items-center min-h-screen bg-gray-50 dark:bg-gray-950 p-4">
|
<div className="flex justify-center items-center min-h-screen bg-gray-50 p-4">
|
||||||
<div className="bg-white dark:bg-gray-900 w-full max-w-md p-8 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-700">
|
<div className="bg-white w-full max-w-md p-8 rounded-2xl shadow-lg border border-gray-200">
|
||||||
<div className="text-center mb-8">
|
<div className="text-center mb-8">
|
||||||
<h2 className="text-3xl font-bold text-gray-900 dark:text-white mb-2">
|
<h2 className="text-3xl font-bold text-gray-900 mb-2">
|
||||||
Welcome Back
|
Welcome Back
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-gray-600 dark:text-gray-400 font-sans">
|
<p className="text-gray-600 font-sans">
|
||||||
Sign in to IMPHNEN Backoffice
|
Sign in to IMPHNEN Backoffice
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{error && (
|
{error && (
|
||||||
<div className="mb-6 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg">
|
<div className="mb-6 p-3 bg-red-50 border border-red-200 rounded-lg">
|
||||||
<p className="text-red-600 dark:text-red-400 text-sm">{error}</p>
|
<p className="text-red-600 text-sm">{error}</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<form onSubmit={handleEmailLogin} className="space-y-4">
|
<form onSubmit={handleEmailLogin} className="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label htmlFor="email" className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label htmlFor="email" className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Email
|
Email
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@@ -58,14 +58,14 @@ export default function LoginPage() {
|
|||||||
onChange={(e) => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
placeholder="your@email.com"
|
placeholder="your@email.com"
|
||||||
disabled={loginMutation.isPending}
|
disabled={loginMutation.isPending}
|
||||||
className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed"
|
className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white text-gray-900 placeholder:text-gray-400 disabled:bg-gray-100 disabled:cursor-not-allowed"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center justify-between mb-1">
|
<div className="flex items-center justify-between mb-1">
|
||||||
<label htmlFor="password" className="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
<label htmlFor="password" className="block text-sm font-medium text-gray-700">
|
||||||
Password
|
Password
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -77,13 +77,13 @@ export default function LoginPage() {
|
|||||||
onChange={(e) => setPassword(e.target.value)}
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
placeholder="••••••••"
|
placeholder="••••••••"
|
||||||
disabled={loginMutation.isPending}
|
disabled={loginMutation.isPending}
|
||||||
className="w-full px-4 py-2.5 pr-12 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed"
|
className="w-full px-4 py-2.5 pr-12 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white text-gray-900 placeholder:text-gray-400 disabled:bg-gray-100 disabled:cursor-not-allowed"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setShowPassword(!showPassword)}
|
onClick={() => setShowPassword(!showPassword)}
|
||||||
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"
|
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700"
|
||||||
>
|
>
|
||||||
<Icon icon={showPassword ? 'mdi:eye-off' : 'mdi:eye'} className="text-xl" />
|
<Icon icon={showPassword ? 'mdi:eye-off' : 'mdi:eye'} className="text-xl" />
|
||||||
</button>
|
</button>
|
||||||
@@ -93,14 +93,14 @@ export default function LoginPage() {
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={loginMutation.isPending}
|
disabled={loginMutation.isPending}
|
||||||
className="w-full py-3 bg-primary-600 text-white rounded-lg font-semibold hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900 disabled:bg-gray-400 dark:disabled:bg-gray-600 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
className="w-full py-3 bg-primary-600 text-white rounded-lg font-semibold hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
||||||
>
|
>
|
||||||
{loginMutation.isPending ? 'Signing in...' : 'Sign in'}
|
{loginMutation.isPending ? 'Signing in...' : 'Sign in'}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div className="mt-6 text-center">
|
<div className="mt-6 text-center">
|
||||||
<p className="text-gray-500 dark:text-gray-500 text-xs">
|
<p className="text-gray-500 text-xs">
|
||||||
By signing in, you agree to our Terms of Service and Privacy Policy
|
By signing in, you agree to our Terms of Service and Privacy Policy
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -64,12 +64,12 @@ export default function LoginPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex justify-center items-center min-h-screen bg-gray-50 dark:bg-gray-950 p-4">
|
<div className="flex justify-center items-center min-h-screen bg-gray-50 p-4">
|
||||||
<div className="bg-white dark:bg-gray-900 w-full max-w-md p-8 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-700">
|
<div className="bg-white w-full max-w-md p-8 rounded-2xl shadow-lg border border-gray-200">
|
||||||
<div className="flex items-center justify-between mb-6">
|
<div className="flex items-center justify-between mb-6">
|
||||||
<button
|
<button
|
||||||
onClick={() => navigate('/')}
|
onClick={() => navigate('/')}
|
||||||
className="cursor-pointer text-primary-500 hover:text-primary-600 dark:text-primary-400 dark:hover:text-primary-300 text-base font-sans flex items-center"
|
className="cursor-pointer text-primary-500 hover:text-primary-600 text-base font-sans flex items-center"
|
||||||
>
|
>
|
||||||
<Icon icon="ic:baseline-chevron-left" width="24" height="24" />
|
<Icon icon="ic:baseline-chevron-left" width="24" height="24" />
|
||||||
Back to Homepage
|
Back to Homepage
|
||||||
@@ -77,23 +77,23 @@ export default function LoginPage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="text-center mb-8">
|
<div className="text-center mb-8">
|
||||||
<h2 className="text-3xl font-bold text-gray-900 dark:text-white mb-2">
|
<h2 className="text-3xl font-bold text-gray-900 mb-2">
|
||||||
Welcome Back
|
Welcome Back
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-gray-600 dark:text-gray-400 font-sans">
|
<p className="text-gray-600 font-sans">
|
||||||
Sign in to the mentoring platform
|
Sign in to the mentoring platform
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{error && (
|
{error && (
|
||||||
<div className="mb-6 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg">
|
<div className="mb-6 p-3 bg-red-50 border border-red-200 rounded-lg">
|
||||||
<p className="text-red-600 dark:text-red-400 text-sm">{error}</p>
|
<p className="text-red-600 text-sm">{error}</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<form onSubmit={handleEmailLogin} className="space-y-4">
|
<form onSubmit={handleEmailLogin} className="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label htmlFor="email" className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label htmlFor="email" className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Email
|
Email
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@@ -103,17 +103,17 @@ export default function LoginPage() {
|
|||||||
onChange={(e) => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
placeholder="your@email.com"
|
placeholder="your@email.com"
|
||||||
disabled={loginMutation.isPending}
|
disabled={loginMutation.isPending}
|
||||||
className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed"
|
className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white text-gray-900 placeholder:text-gray-400 disabled:bg-gray-100 disabled:cursor-not-allowed"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center justify-between mb-1">
|
<div className="flex items-center justify-between mb-1">
|
||||||
<label htmlFor="password" className="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
<label htmlFor="password" className="block text-sm font-medium text-gray-700">
|
||||||
Password
|
Password
|
||||||
</label>
|
</label>
|
||||||
<Link to="/auth/forgot-password" className="text-sm text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300">
|
<Link to="/auth/forgot-password" className="text-sm text-primary-600 hover:text-primary-700">
|
||||||
Forgot password?
|
Forgot password?
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,13 +125,13 @@ export default function LoginPage() {
|
|||||||
onChange={(e) => setPassword(e.target.value)}
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
placeholder="••••••••"
|
placeholder="••••••••"
|
||||||
disabled={loginMutation.isPending}
|
disabled={loginMutation.isPending}
|
||||||
className="w-full px-4 py-2.5 pr-12 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed"
|
className="w-full px-4 py-2.5 pr-12 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white text-gray-900 placeholder:text-gray-400 disabled:bg-gray-100 disabled:cursor-not-allowed"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setShowPassword(!showPassword)}
|
onClick={() => setShowPassword(!showPassword)}
|
||||||
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"
|
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700"
|
||||||
>
|
>
|
||||||
<Icon icon={showPassword ? 'mdi:eye-off' : 'mdi:eye'} className="text-xl" />
|
<Icon icon={showPassword ? 'mdi:eye-off' : 'mdi:eye'} className="text-xl" />
|
||||||
</button>
|
</button>
|
||||||
@@ -141,47 +141,47 @@ export default function LoginPage() {
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={loginMutation.isPending}
|
disabled={loginMutation.isPending}
|
||||||
className="w-full py-3 bg-primary-600 text-white rounded-lg font-semibold hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900 disabled:bg-gray-400 dark:disabled:bg-gray-600 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
className="w-full py-3 bg-primary-600 text-white rounded-lg font-semibold hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
||||||
>
|
>
|
||||||
{loginMutation.isPending ? 'Signing in...' : 'Sign in with Email'}
|
{loginMutation.isPending ? 'Signing in...' : 'Sign in with Email'}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div className="my-6 flex items-center">
|
<div className="my-6 flex items-center">
|
||||||
<div className="flex-1 border-t border-gray-300 dark:border-gray-600"></div>
|
<div className="flex-1 border-t border-gray-300"></div>
|
||||||
<span className="px-4 text-sm text-gray-500 dark:text-gray-400">OR</span>
|
<span className="px-4 text-sm text-gray-500">OR</span>
|
||||||
<div className="flex-1 border-t border-gray-300 dark:border-gray-600"></div>
|
<div className="flex-1 border-t border-gray-300"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={handleGithubLogin}
|
onClick={handleGithubLogin}
|
||||||
disabled={isGithubLoading}
|
disabled={isGithubLoading}
|
||||||
type="button"
|
type="button"
|
||||||
className="w-full py-3 flex items-center justify-center gap-2 bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg font-semibold text-gray-900 dark:text-white hover:bg-gray-200 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 dark:focus:ring-offset-gray-900 disabled:bg-gray-100 dark:disabled:bg-gray-800 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
className="w-full py-3 flex items-center justify-center gap-2 bg-gray-100 border border-gray-300 rounded-lg font-semibold text-gray-900 hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 disabled:bg-gray-100 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
||||||
>
|
>
|
||||||
<GithubOutlined className="text-xl" />
|
<GithubOutlined className="text-xl" />
|
||||||
<span>{isGithubLoading ? 'Connecting...' : 'Sign in with GitHub'}</span>
|
<span>{isGithubLoading ? 'Connecting...' : 'Sign in with GitHub'}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<p className="mt-3 text-xs text-center text-gray-500 dark:text-gray-500 font-sans">
|
<p className="mt-3 text-xs text-center text-gray-500 font-sans">
|
||||||
Make sure your GitHub email is{' '}
|
Make sure your GitHub email is{' '}
|
||||||
<a href="https://github.com/settings/emails" target="_blank" rel="noopener noreferrer" className="text-primary-600 dark:text-primary-400 hover:underline">
|
<a href="https://github.com/settings/emails" target="_blank" rel="noopener noreferrer" className="text-primary-600 hover:underline">
|
||||||
set to public
|
set to public
|
||||||
</a>{' '}
|
</a>{' '}
|
||||||
for GitHub sign in to work.
|
for GitHub sign in to work.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="mt-6 text-center">
|
<div className="mt-6 text-center">
|
||||||
<p className="text-gray-600 dark:text-gray-400 text-sm">
|
<p className="text-gray-600 text-sm">
|
||||||
Don't have an account?{' '}
|
Don't have an account?{' '}
|
||||||
<Link to="/auth/signup" className="text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 font-semibold">
|
<Link to="/auth/signup" className="text-primary-600 hover:text-primary-700 font-semibold">
|
||||||
Sign up
|
Sign up
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-6 text-center">
|
<div className="mt-6 text-center">
|
||||||
<p className="text-gray-500 dark:text-gray-500 text-xs">
|
<p className="text-gray-500 text-xs">
|
||||||
By signing in, you agree to our Terms of Service and Privacy Policy
|
By signing in, you agree to our Terms of Service and Privacy Policy
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Button } from '@imphnen-frontend-service/ui/atoms';
|
import { useState } from 'react';
|
||||||
import { Modal } from '@imphnen-frontend-service/ui/molecules';
|
import { Modal } from '@imphnen-frontend-service/ui/molecules';
|
||||||
import { ControlledInputField } from '@imphnen-frontend-service/ui/organisms';
|
|
||||||
import { useLogin } from '../../_hooks/use-login';
|
import { useLogin } from '../../_hooks/use-login';
|
||||||
import ModalFormVerifyEmail from './modal-form-verify-email';
|
import ModalFormVerifyEmail from './modal-form-verify-email';
|
||||||
|
import { Icon } from '@iconify/react';
|
||||||
|
|
||||||
interface IModalFormLogin {
|
interface IModalFormLogin {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
@@ -29,61 +29,101 @@ const ModalFormLogin = ({
|
|||||||
emailToVerify,
|
emailToVerify,
|
||||||
} = useLogin();
|
} = useLogin();
|
||||||
|
|
||||||
|
const [showPassword, setShowPassword] = useState(false);
|
||||||
|
|
||||||
|
const email = form.watch('email');
|
||||||
|
const password = form.watch('password');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Modal
|
<Modal
|
||||||
className="py-[45px] min-w-[400px] lg:min-w-[455px] px-7"
|
className="py-8 min-w-[400px] lg:min-w-[440px] px-8"
|
||||||
isOpen={isOpen && !showVerifyModal}
|
isOpen={isOpen && !showVerifyModal}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
>
|
>
|
||||||
<Modal.Header className="space-y-4">
|
<Modal.Header>
|
||||||
<img src="/logos/logo.svg" alt="" className="h-[70px] w-auto" />
|
<div className="text-center mb-6">
|
||||||
<h1 className="text-primary-500 text-p1 text-center font-semibold">
|
<h2 className="text-2xl font-bold text-gray-900 mb-1">
|
||||||
Login
|
Welcome Back
|
||||||
</h1>
|
</h2>
|
||||||
|
<p className="text-gray-600 text-sm">
|
||||||
|
Sign in to IMPHNEN Gacha
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Content>
|
<Modal.Content>
|
||||||
<form className="space-y-4" onSubmit={onSubmit}>
|
<form className="space-y-4" onSubmit={onSubmit}>
|
||||||
<ControlledInputField
|
<div>
|
||||||
control={form.control}
|
<label htmlFor="login-email" className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
label="Email"
|
Email
|
||||||
placeholder="Masukkan Email"
|
</label>
|
||||||
type="email"
|
<input
|
||||||
name="email"
|
id="login-email"
|
||||||
size="lg"
|
type="email"
|
||||||
className="w-full"
|
{...form.register('email')}
|
||||||
/>
|
placeholder="your@email.com"
|
||||||
<ControlledInputField
|
disabled={isLoading}
|
||||||
control={form.control}
|
className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white text-gray-900 placeholder:text-gray-400 disabled:bg-gray-100 disabled:cursor-not-allowed"
|
||||||
label="Password"
|
/>
|
||||||
placeholder="Masukkan Password"
|
{form.formState.errors.email && (
|
||||||
type="password"
|
<p className="text-red-500 text-xs mt-1">{form.formState.errors.email.message}</p>
|
||||||
name="password"
|
)}
|
||||||
size="lg"
|
</div>
|
||||||
className="w-full"
|
|
||||||
/>
|
<div>
|
||||||
<h1 className="text-end text-primary-500 text-xl font-medium">
|
<div className="flex items-center justify-between mb-1">
|
||||||
<Button variant="text" type="button" onClick={onForgotPassword}>
|
<label htmlFor="login-password" className="block text-sm font-medium text-gray-700">
|
||||||
Lupa Password?
|
Password
|
||||||
</Button>
|
</label>
|
||||||
</h1>
|
<button
|
||||||
<Button
|
type="button"
|
||||||
|
onClick={onForgotPassword}
|
||||||
|
className="text-sm text-primary-600 hover:text-primary-700 cursor-pointer"
|
||||||
|
>
|
||||||
|
Forgot password?
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div className="relative">
|
||||||
|
<input
|
||||||
|
id="login-password"
|
||||||
|
type={showPassword ? 'text' : 'password'}
|
||||||
|
{...form.register('password')}
|
||||||
|
placeholder="••••••••"
|
||||||
|
disabled={isLoading}
|
||||||
|
className="w-full px-4 py-2.5 pr-12 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white text-gray-900 placeholder:text-gray-400 disabled:bg-gray-100 disabled:cursor-not-allowed"
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => setShowPassword(!showPassword)}
|
||||||
|
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700"
|
||||||
|
>
|
||||||
|
<Icon icon={showPassword ? 'mdi:eye-off' : 'mdi:eye'} className="text-xl" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{form.formState.errors.password && (
|
||||||
|
<p className="text-red-500 text-xs mt-1">{form.formState.errors.password.message}</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
size="md"
|
disabled={isLoading || !email || !password}
|
||||||
className="w-full"
|
className="w-full py-3 bg-primary-600 text-white rounded-lg font-semibold hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
||||||
disabled={isLoading}
|
|
||||||
>
|
>
|
||||||
{isLoading ? 'Loading...' : 'Login'}
|
{isLoading ? 'Signing in...' : 'Sign in'}
|
||||||
</Button>
|
</button>
|
||||||
<div className="flex justify-center gap-2 pt-2.5 font-medium">
|
|
||||||
<p className="text-neutral-500">Belum punya akun?</p>
|
<div className="text-center pt-2">
|
||||||
<Button
|
<p className="text-gray-600 text-sm">
|
||||||
variant="text"
|
Don't have an account?{' '}
|
||||||
className="text-primary-500 hover:text-primary-600 m-0 p-0"
|
<button
|
||||||
onClick={() => setIsOpenRegisterModal(true)}
|
type="button"
|
||||||
>
|
className="text-primary-600 hover:text-primary-700 font-semibold cursor-pointer"
|
||||||
Daftar
|
onClick={() => setIsOpenRegisterModal(true)}
|
||||||
</Button>
|
>
|
||||||
|
Sign up
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</Modal.Content>
|
</Modal.Content>
|
||||||
|
|||||||
@@ -81,12 +81,12 @@ export default function LoginPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex justify-center items-center min-h-screen bg-gray-50 dark:bg-gray-950 p-4">
|
<div className="flex justify-center items-center min-h-screen bg-gray-50 p-4">
|
||||||
<div className="bg-white dark:bg-gray-900 w-full max-w-md p-8 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-700">
|
<div className="bg-white w-full max-w-md p-8 rounded-2xl shadow-lg border border-gray-200">
|
||||||
<div className="flex items-center justify-between mb-6">
|
<div className="flex items-center justify-between mb-6">
|
||||||
<button
|
<button
|
||||||
onClick={() => navigate('/')}
|
onClick={() => navigate('/')}
|
||||||
className="cursor-pointer text-primary-500 hover:text-primary-600 dark:text-primary-400 dark:hover:text-primary-300 text-base font-sans flex items-center"
|
className="cursor-pointer text-primary-500 hover:text-primary-600 text-base font-sans flex items-center"
|
||||||
>
|
>
|
||||||
<Icon icon="ic:baseline-chevron-left" width="24" height="24" />
|
<Icon icon="ic:baseline-chevron-left" width="24" height="24" />
|
||||||
Back to Homepage
|
Back to Homepage
|
||||||
@@ -95,17 +95,17 @@ export default function LoginPage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="text-center mb-8">
|
<div className="text-center mb-8">
|
||||||
<h2 className="text-3xl font-bold text-gray-900 dark:text-white mb-2">
|
<h2 className="text-3xl font-bold text-gray-900 mb-2">
|
||||||
Welcome Back
|
Welcome Back
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-gray-600 dark:text-gray-400 font-sans">
|
<p className="text-gray-600 font-sans">
|
||||||
Sign in to join or create your hackathon team
|
Sign in to join or create your hackathon team
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{error && (
|
{error && (
|
||||||
<div className="mb-6 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg">
|
<div className="mb-6 p-3 bg-red-50 border border-red-200 rounded-lg">
|
||||||
<p className="text-red-600 dark:text-red-400 text-sm">{error}</p>
|
<p className="text-red-600 text-sm">{error}</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ export default function LoginPage() {
|
|||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
htmlFor="email"
|
htmlFor="email"
|
||||||
className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"
|
className="block text-sm font-medium text-gray-700 mb-1"
|
||||||
>
|
>
|
||||||
Email
|
Email
|
||||||
</label>
|
</label>
|
||||||
@@ -124,7 +124,7 @@ export default function LoginPage() {
|
|||||||
onChange={(e) => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
placeholder="your@email.com"
|
placeholder="your@email.com"
|
||||||
disabled={loginMutation.isPending}
|
disabled={loginMutation.isPending}
|
||||||
className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed"
|
className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white text-gray-900 placeholder:text-gray-400 disabled:bg-gray-100 disabled:cursor-not-allowed"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -133,13 +133,13 @@ export default function LoginPage() {
|
|||||||
<div className="flex items-center justify-between mb-1">
|
<div className="flex items-center justify-between mb-1">
|
||||||
<label
|
<label
|
||||||
htmlFor="password"
|
htmlFor="password"
|
||||||
className="block text-sm font-medium text-gray-700 dark:text-gray-300"
|
className="block text-sm font-medium text-gray-700"
|
||||||
>
|
>
|
||||||
Password
|
Password
|
||||||
</label>
|
</label>
|
||||||
<Link
|
<Link
|
||||||
to="/auth/forgot-password"
|
to="/auth/forgot-password"
|
||||||
className="text-sm text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300"
|
className="text-sm text-primary-600 hover:text-primary-700"
|
||||||
>
|
>
|
||||||
Forgot password?
|
Forgot password?
|
||||||
</Link>
|
</Link>
|
||||||
@@ -152,13 +152,13 @@ export default function LoginPage() {
|
|||||||
onChange={(e) => setPassword(e.target.value)}
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
placeholder="••••••••"
|
placeholder="••••••••"
|
||||||
disabled={loginMutation.isPending}
|
disabled={loginMutation.isPending}
|
||||||
className="w-full px-4 py-2.5 pr-12 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed"
|
className="w-full px-4 py-2.5 pr-12 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white text-gray-900 placeholder:text-gray-400 disabled:bg-gray-100 disabled:cursor-not-allowed"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setShowPassword(!showPassword)}
|
onClick={() => setShowPassword(!showPassword)}
|
||||||
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"
|
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700"
|
||||||
>
|
>
|
||||||
<Icon icon={showPassword ? 'mdi:eye-off' : 'mdi:eye'} className="text-xl" />
|
<Icon icon={showPassword ? 'mdi:eye-off' : 'mdi:eye'} className="text-xl" />
|
||||||
</button>
|
</button>
|
||||||
@@ -168,25 +168,25 @@ export default function LoginPage() {
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={loginMutation.isPending}
|
disabled={loginMutation.isPending}
|
||||||
className="w-full py-3 bg-primary-600 text-white rounded-lg font-semibold hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900 disabled:bg-gray-400 dark:disabled:bg-gray-600 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
className="w-full py-3 bg-primary-600 text-white rounded-lg font-semibold hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
||||||
>
|
>
|
||||||
{loginMutation.isPending ? 'Signing in...' : 'Sign in with Email'}
|
{loginMutation.isPending ? 'Signing in...' : 'Sign in with Email'}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div className="my-6 flex items-center">
|
<div className="my-6 flex items-center">
|
||||||
<div className="flex-1 border-t border-gray-300 dark:border-gray-600"></div>
|
<div className="flex-1 border-t border-gray-300"></div>
|
||||||
<span className="px-4 text-sm text-gray-500 dark:text-gray-400">
|
<span className="px-4 text-sm text-gray-500">
|
||||||
OR
|
OR
|
||||||
</span>
|
</span>
|
||||||
<div className="flex-1 border-t border-gray-300 dark:border-gray-600"></div>
|
<div className="flex-1 border-t border-gray-300"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={handleGithubLogin}
|
onClick={handleGithubLogin}
|
||||||
disabled={isGithubLoading}
|
disabled={isGithubLoading}
|
||||||
type="button"
|
type="button"
|
||||||
className="w-full py-3 flex items-center justify-center gap-2 bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg font-semibold text-gray-900 dark:text-white hover:bg-gray-200 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 dark:focus:ring-offset-gray-900 disabled:bg-gray-100 dark:disabled:bg-gray-800 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
className="w-full py-3 flex items-center justify-center gap-2 bg-gray-100 border border-gray-300 rounded-lg font-semibold text-gray-900 hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 disabled:bg-gray-100 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
||||||
>
|
>
|
||||||
<GithubOutlined className="text-xl" />
|
<GithubOutlined className="text-xl" />
|
||||||
<span>
|
<span>
|
||||||
@@ -194,13 +194,13 @@ export default function LoginPage() {
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<p className="mt-3 text-xs text-center text-gray-500 dark:text-gray-500 font-sans">
|
<p className="mt-3 text-xs text-center text-gray-500 font-sans">
|
||||||
Make sure your GitHub email is{' '}
|
Make sure your GitHub email is{' '}
|
||||||
<a
|
<a
|
||||||
href="https://github.com/settings/emails"
|
href="https://github.com/settings/emails"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="text-primary-600 dark:text-primary-400 hover:underline"
|
className="text-primary-600 hover:underline"
|
||||||
>
|
>
|
||||||
set to public
|
set to public
|
||||||
</a>{' '}
|
</a>{' '}
|
||||||
@@ -208,11 +208,11 @@ export default function LoginPage() {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="mt-6 text-center">
|
<div className="mt-6 text-center">
|
||||||
<p className="text-gray-600 dark:text-gray-400 text-sm">
|
<p className="text-gray-600 text-sm">
|
||||||
Don't have an account?{' '}
|
Don't have an account?{' '}
|
||||||
<Link
|
<Link
|
||||||
to="/auth/signup"
|
to="/auth/signup"
|
||||||
className="text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 font-semibold"
|
className="text-primary-600 hover:text-primary-700 font-semibold"
|
||||||
>
|
>
|
||||||
Sign up
|
Sign up
|
||||||
</Link>
|
</Link>
|
||||||
@@ -220,7 +220,7 @@ export default function LoginPage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-6 text-center">
|
<div className="mt-6 text-center">
|
||||||
<p className="text-gray-500 dark:text-gray-500 text-xs">
|
<p className="text-gray-500 text-xs">
|
||||||
By signing in, you agree to our Terms of Service and Privacy Policy
|
By signing in, you agree to our Terms of Service and Privacy Policy
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -64,26 +64,26 @@ export default function LoginPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex justify-center items-center min-h-screen bg-gray-50 dark:bg-gray-950 p-4">
|
<div className="flex justify-center items-center min-h-screen bg-gray-50 p-4">
|
||||||
<div className="bg-white dark:bg-gray-900 w-full max-w-md p-8 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-700">
|
<div className="bg-white w-full max-w-md p-8 rounded-2xl shadow-lg border border-gray-200">
|
||||||
<div className="text-center mb-8">
|
<div className="text-center mb-8">
|
||||||
<h2 className="text-3xl font-bold text-gray-900 dark:text-white mb-2">
|
<h2 className="text-3xl font-bold text-gray-900 mb-2">
|
||||||
Welcome Back
|
Welcome Back
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-gray-600 dark:text-gray-400 font-sans">
|
<p className="text-gray-600 font-sans">
|
||||||
Sign in to QR Campaign Manager
|
Sign in to QR Campaign Manager
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{error && (
|
{error && (
|
||||||
<div className="mb-6 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg">
|
<div className="mb-6 p-3 bg-red-50 border border-red-200 rounded-lg">
|
||||||
<p className="text-red-600 dark:text-red-400 text-sm">{error}</p>
|
<p className="text-red-600 text-sm">{error}</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<form onSubmit={handleEmailLogin} className="space-y-4">
|
<form onSubmit={handleEmailLogin} className="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label htmlFor="email" className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label htmlFor="email" className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Email
|
Email
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@@ -93,17 +93,17 @@ export default function LoginPage() {
|
|||||||
onChange={(e) => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
placeholder="your@email.com"
|
placeholder="your@email.com"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
className="w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed"
|
className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white text-gray-900 placeholder:text-gray-400 disabled:bg-gray-100 disabled:cursor-not-allowed"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center justify-between mb-1">
|
<div className="flex items-center justify-between mb-1">
|
||||||
<label htmlFor="password" className="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
<label htmlFor="password" className="block text-sm font-medium text-gray-700">
|
||||||
Password
|
Password
|
||||||
</label>
|
</label>
|
||||||
<Link to="/auth/forgot-password" className="text-sm text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300">
|
<Link to="/auth/forgot-password" className="text-sm text-primary-600 hover:text-primary-700">
|
||||||
Forgot password?
|
Forgot password?
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
@@ -115,13 +115,13 @@ export default function LoginPage() {
|
|||||||
onChange={(e) => setPassword(e.target.value)}
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
placeholder="••••••••"
|
placeholder="••••••••"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
className="w-full px-4 py-2.5 pr-12 border border-gray-300 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500 disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:cursor-not-allowed"
|
className="w-full px-4 py-2.5 pr-12 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white text-gray-900 placeholder:text-gray-400 disabled:bg-gray-100 disabled:cursor-not-allowed"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setShowPassword(!showPassword)}
|
onClick={() => setShowPassword(!showPassword)}
|
||||||
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"
|
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700"
|
||||||
>
|
>
|
||||||
<Icon icon={showPassword ? 'mdi:eye-off' : 'mdi:eye'} className="text-xl" />
|
<Icon icon={showPassword ? 'mdi:eye-off' : 'mdi:eye'} className="text-xl" />
|
||||||
</button>
|
</button>
|
||||||
@@ -131,47 +131,47 @@ export default function LoginPage() {
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
className="w-full py-3 bg-primary-600 text-white rounded-lg font-semibold hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900 disabled:bg-gray-400 dark:disabled:bg-gray-600 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
className="w-full py-3 bg-primary-600 text-white rounded-lg font-semibold hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
||||||
>
|
>
|
||||||
{isSubmitting ? 'Signing in...' : 'Sign in with Email'}
|
{isSubmitting ? 'Signing in...' : 'Sign in with Email'}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div className="my-6 flex items-center">
|
<div className="my-6 flex items-center">
|
||||||
<div className="flex-1 border-t border-gray-300 dark:border-gray-600"></div>
|
<div className="flex-1 border-t border-gray-300"></div>
|
||||||
<span className="px-4 text-sm text-gray-500 dark:text-gray-400">OR</span>
|
<span className="px-4 text-sm text-gray-500">OR</span>
|
||||||
<div className="flex-1 border-t border-gray-300 dark:border-gray-600"></div>
|
<div className="flex-1 border-t border-gray-300"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={handleGithubLogin}
|
onClick={handleGithubLogin}
|
||||||
disabled={isGithubLoading}
|
disabled={isGithubLoading}
|
||||||
type="button"
|
type="button"
|
||||||
className="w-full py-3 flex items-center justify-center gap-2 bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg font-semibold text-gray-900 dark:text-white hover:bg-gray-200 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 dark:focus:ring-offset-gray-900 disabled:bg-gray-100 dark:disabled:bg-gray-800 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
className="w-full py-3 flex items-center justify-center gap-2 bg-gray-100 border border-gray-300 rounded-lg font-semibold text-gray-900 hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 disabled:bg-gray-100 disabled:cursor-not-allowed transition-colors cursor-pointer"
|
||||||
>
|
>
|
||||||
<GithubOutlined className="text-xl" />
|
<GithubOutlined className="text-xl" />
|
||||||
<span>{isGithubLoading ? 'Connecting...' : 'Sign in with GitHub'}</span>
|
<span>{isGithubLoading ? 'Connecting...' : 'Sign in with GitHub'}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<p className="mt-3 text-xs text-center text-gray-500 dark:text-gray-500 font-sans">
|
<p className="mt-3 text-xs text-center text-gray-500 font-sans">
|
||||||
Make sure your GitHub email is{' '}
|
Make sure your GitHub email is{' '}
|
||||||
<a href="https://github.com/settings/emails" target="_blank" rel="noopener noreferrer" className="text-primary-600 dark:text-primary-400 hover:underline">
|
<a href="https://github.com/settings/emails" target="_blank" rel="noopener noreferrer" className="text-primary-600 hover:underline">
|
||||||
set to public
|
set to public
|
||||||
</a>{' '}
|
</a>{' '}
|
||||||
for GitHub sign in to work.
|
for GitHub sign in to work.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="mt-6 text-center">
|
<div className="mt-6 text-center">
|
||||||
<p className="text-gray-600 dark:text-gray-400 text-sm">
|
<p className="text-gray-600 text-sm">
|
||||||
Don't have an account?{' '}
|
Don't have an account?{' '}
|
||||||
<Link to="/auth/signup" className="text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 font-semibold">
|
<Link to="/auth/signup" className="text-primary-600 hover:text-primary-700 font-semibold">
|
||||||
Sign up
|
Sign up
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-6 text-center">
|
<div className="mt-6 text-center">
|
||||||
<p className="text-gray-500 dark:text-gray-500 text-xs">
|
<p className="text-gray-500 text-xs">
|
||||||
By signing in, you agree to our Terms of Service and Privacy Policy
|
By signing in, you agree to our Terms of Service and Privacy Policy
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user