UI Refinments Auth Improvments

This commit is contained in:
Christopher
2026-01-22 12:23:15 -08:00
parent 812a986d0f
commit 3c904997fa
3 changed files with 50 additions and 13 deletions
+24 -5
View File
@@ -10,6 +10,7 @@ export default function LoginPage() {
const [mode, setMode] = useState<'login' | 'register'>('login');
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
const [handle, setHandle] = useState('');
const [displayName, setDisplayName] = useState('');
const [error, setError] = useState('');
@@ -18,6 +19,12 @@ export default function LoginPage() {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setError('');
if (mode === 'register' && password !== confirmPassword) {
setError('Passwords do not match');
return;
}
setLoading(true);
try {
@@ -198,13 +205,25 @@ export default function LoginPage() {
required
minLength={8}
/>
{mode === 'register' && (
<p style={{ fontSize: '12px', color: 'var(--foreground-tertiary)', marginTop: '4px' }}>
Minimum 8 characters
</p>
)}
</div>
{mode === 'register' && (
<div style={{ marginBottom: '24px' }}>
<label style={{ display: 'block', marginBottom: '6px', fontSize: '14px', fontWeight: 500 }}>
Confirm Password
</label>
<input
type="password"
className="input"
value={confirmPassword}
onChange={(e) => setConfirmPassword(e.target.value)}
placeholder="••••••••"
required
minLength={8}
/>
</div>
)}
<button
type="submit"
className="btn btn-primary btn-lg"
+25 -7
View File
@@ -315,13 +315,31 @@ export default function MigrationPage() {
<label style={{ fontSize: '13px', color: 'var(--foreground-tertiary)', display: 'block', marginBottom: '6px' }}>
Export file
</label>
<input
type="file"
accept=".json"
onChange={(e) => setImportFile(e.target.files?.[0] || null)}
className="input"
style={{ padding: '8px' }}
/>
<div style={{ position: 'relative' }}>
<input
type="file"
id="import-file-input"
accept=".json"
onChange={(e) => setImportFile(e.target.files?.[0] || null)}
style={{ display: 'none' }}
/>
<label
htmlFor="import-file-input"
className="input"
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
cursor: 'pointer',
color: importFile ? 'var(--foreground)' : 'var(--foreground-tertiary)'
}}
>
<span>{importFile ? importFile.name : 'Select export file...'}</span>
<span className="btn btn-ghost btn-sm" style={{ pointerEvents: 'none' }}>
Browse
</span>
</label>
</div>
</div>
<div style={{ marginBottom: '20px' }}>
+1 -1
View File
@@ -53,7 +53,7 @@ export default function SettingsPage() {
Security
</div>
<div style={{ color: 'var(--foreground-secondary)', fontSize: '14px' }}>
Change password, manage sessions
Change password
</div>
</Link>