fix: change login field from email to username type
Browser validates type=email and rejects plain usernames like 'admin'. Changed to type=text with Username label to match the generated credentials.
This commit is contained in:
@@ -67,14 +67,14 @@ export default function App() {
|
|||||||
<div className="bg-gray-900/50 border border-gray-800 rounded-xl p-8">
|
<div className="bg-gray-900/50 border border-gray-800 rounded-xl p-8">
|
||||||
<form onSubmit={handleLogin} className="space-y-4">
|
<form onSubmit={handleLogin} className="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm text-gray-400 mb-1.5">Email</label>
|
<label className="block text-sm text-gray-400 mb-1.5">Username</label>
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="text"
|
||||||
value={email}
|
value={email}
|
||||||
onChange={(e) => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
required
|
required
|
||||||
className="w-full bg-gray-900 border border-gray-700 text-white rounded-lg px-4 py-2.5 text-sm placeholder-gray-500 focus:outline-none focus:border-emerald-500 transition-colors"
|
className="w-full bg-gray-900 border border-gray-700 text-white rounded-lg px-4 py-2.5 text-sm placeholder-gray-500 focus:outline-none focus:border-emerald-500 transition-colors"
|
||||||
placeholder="[email protected]"
|
placeholder="username"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -69,14 +69,14 @@ export default function App() {
|
|||||||
<div className="bg-gray-900/50 border border-gray-800 rounded-xl p-8">
|
<div className="bg-gray-900/50 border border-gray-800 rounded-xl p-8">
|
||||||
<form onSubmit={handleLogin} className="space-y-4">
|
<form onSubmit={handleLogin} className="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm text-gray-400 mb-1.5">Email</label>
|
<label className="block text-sm text-gray-400 mb-1.5">Username</label>
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="text"
|
||||||
value={email}
|
value={email}
|
||||||
onChange={(e) => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
required
|
required
|
||||||
className="w-full bg-gray-900 border border-gray-700 text-white rounded-lg px-4 py-2.5 text-sm placeholder-gray-500 focus:outline-none focus:border-blue-500 transition-colors"
|
className="w-full bg-gray-900 border border-gray-700 text-white rounded-lg px-4 py-2.5 text-sm placeholder-gray-500 focus:outline-none focus:border-blue-500 transition-colors"
|
||||||
placeholder="admin@example.com"
|
placeholder="admin"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user