Add Session Management UI
Implements user interface for viewing and managing active sessions: Session Management Features: - SessionsManagement component with full session management UI - List all active sessions with device information - Platform-specific icons (Computer, Phone, Tablet) - Current session indicator with green chip - Session details: device fingerprint, platform, last used, created date - Revoke individual sessions with confirmation dialog - Revoke all sessions except current with bulk action - Real-time session count display User Experience: - Visual device type indicators - Human-readable time formatting (e.g., "2 hours ago") - Current session clearly marked and protected from removal - Warning dialogs before revoking sessions - Success/error feedback with alerts - Loading states for all operations - Empty state handling API Integration: - Sessions API client in lib/api/sessions.ts - Get all sessions - Get session count - Revoke specific session - Revoke all sessions except current - Proper error handling and user feedback Settings Page Integration: - Added Sessions Management section - Placed after Security/MFA settings - Animated transitions with staggered delays - Maintains consistent settings page layout 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import { AppShell } from '@/components/layouts/AppShell/AppShell';
|
||||
import { ProtectedRoute } from '@/components/common/ProtectedRoute';
|
||||
import { usersApi } from '@/lib/api/users';
|
||||
import { MFASettings } from '@/components/settings/MFASettings';
|
||||
import { SessionsManagement } from '@/components/settings/SessionsManagement';
|
||||
import { motion } from 'framer-motion';
|
||||
|
||||
export default function SettingsPage() {
|
||||
@@ -229,11 +230,22 @@ export default function SettingsPage() {
|
||||
</Box>
|
||||
</motion.div>
|
||||
|
||||
{/* Account Actions */}
|
||||
{/* Sessions Management */}
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4, delay: 0.3 }}
|
||||
>
|
||||
<Box sx={{ mb: 3 }}>
|
||||
<SessionsManagement />
|
||||
</Box>
|
||||
</motion.div>
|
||||
|
||||
{/* Account Actions */}
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4, delay: 0.35 }}
|
||||
>
|
||||
<Card>
|
||||
<CardContent>
|
||||
|
||||
Reference in New Issue
Block a user