feat: normalize email addresses to lowercase in user registration and profile updates

- Updated user registration and profile update handlers to convert email addresses to lowercase before saving to the database.
- Added integration tests to verify login functionality after email changes, ensuring case insensitivity.
- Introduced a new Account page to replace the Security page, consolidating user account management features.
- Removed the old Security page and updated routing in the Settings layout.
- Enhanced the SystemStatus component to provide user feedback on update availability.
- Added password change functionality in the Account page, allowing users to update their passwords securely.
This commit is contained in:
Wikid82
2025-11-21 13:04:49 -05:00
parent 4d1f92d909
commit a00dea5419
13 changed files with 622 additions and 397 deletions

View File

@@ -1,20 +1,33 @@
import React from 'react';
import React, { useState, useEffect } from 'react';
import { useQuery } from '@tanstack/react-query';
import { checkUpdates } from '../api/system';
import { ExternalLink, CheckCircle, AlertCircle } from 'lucide-react';
const SystemStatus: React.FC = () => {
const [showUpToDate, setShowUpToDate] = useState(true);
const { data: updateInfo, isLoading } = useQuery({
queryKey: ['system-updates'],
queryFn: checkUpdates,
staleTime: 1000 * 60 * 60, // 1 hour
});
useEffect(() => {
if (updateInfo && !updateInfo.available) {
const timer = setTimeout(() => {
setShowUpToDate(false);
}, 5000); // Hide after 5 seconds
return () => clearTimeout(timer);
} else {
setShowUpToDate(true);
}
}, [updateInfo]);
if (isLoading) return null;
if (!updateInfo?.available) {
if (!showUpToDate) return null;
return (
<div className="flex items-center text-sm text-green-500">
<div className="flex items-center text-sm text-green-500 transition-opacity duration-500">
<CheckCircle className="w-4 h-4 mr-1" />
<span className="hidden sm:inline">Up to date</span>
</div>