UNPKG

fullstack-form-app-sinclqir

Version:

Application de gestion des utilisateurs avec authentification JWT - Frontend React + Backend Python FastAPI

266 lines (228 loc) 4.72 kB
.users-list { display: flex; flex-direction: column; gap: 1.5rem; } .users-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; } .users-title-section { display: flex; align-items: center; gap: 0.5rem; } .users-icon { width: 1.5rem; height: 1.5rem; color: #16a34a; } .users-title { margin: 0; font-size: 1.875rem; font-weight: 700; color: #1f2937; } .users-count-badge { padding: 0.25rem 0.75rem; background: white; border: 1px solid #d1d5db; border-radius: 0.375rem; font-size: 0.875rem; color: #374151; font-weight: 500; } .users-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } .user-card { background: white; border-radius: 0.75rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); border: 1px solid #e5e7eb; transition: all 0.2s ease; overflow: hidden; } .user-card:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); } .user-card-header { padding: 1.5rem 1.5rem 0.75rem; border-bottom: 1px solid #f3f4f6; } .user-header-content { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; } .user-name { margin: 0; font-size: 1.125rem; font-weight: 600; color: #1f2937; } .role-badge { padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; } .role-badge.admin { background: #1f2937; color: white; } .role-badge.user { background: #f3f4f6; color: #374151; } .user-card-content { padding: 0.75rem 1.5rem 1.5rem; } .user-details { display: flex; flex-direction: column; gap: 0.75rem; } .user-detail-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: #6b7280; } .detail-icon { width: 0.75rem; height: 0.75rem; flex-shrink: 0; } .detail-separator { height: 1px; background: #f3f4f6; margin: 0.75rem 0; } .detail-date { font-size: 0.75rem; color: #9ca3af; margin: 0; } .user-card-footer { padding: 0 1.5rem 1.5rem; } .delete-btn { width: 100%; padding: 0.5rem 1rem; background: #ef4444; color: white; border: none; border-radius: 0.375rem; font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; } .delete-btn:hover:not(:disabled) { background: #dc2626; transform: translateY(-1px); } .delete-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; } .no-users-card { background: white; border-radius: 0.75rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); border: 1px solid #e5e7eb; } .no-users-content { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; text-align: center; } .no-users-icon { width: 3rem; height: 3rem; color: #9ca3af; margin-bottom: 1rem; } .no-users-text { margin: 0; color: #6b7280; font-size: 1rem; } .loading-container { background: white; border-radius: 0.75rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); border: 1px solid #e5e7eb; padding: 2rem; text-align: center; } .loading-text { margin: 0; color: #6b7280; font-size: 0.875rem; } .error-container { background: white; border-radius: 0.75rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); border: 1px solid #e5e7eb; padding: 2rem; } .error-message { background: #fef2f2; color: #dc2626; padding: 1rem; border-radius: 0.5rem; margin-bottom: 1rem; border-left: 4px solid #dc2626; font-size: 0.875rem; } .retry-btn { background: #16a34a; color: white; border: none; padding: 0.5rem 1rem; border-radius: 0.375rem; cursor: pointer; font-size: 0.875rem; font-weight: 500; transition: all 0.2s ease; } .retry-btn:hover { background: #15803d; transform: translateY(-1px); } /* Responsive */ @media (max-width: 768px) { .users-title { font-size: 1.5rem; } .users-grid { grid-template-columns: 1fr; gap: 1rem; } .user-header-content { flex-direction: column; align-items: flex-start; gap: 0.5rem; } .users-header { flex-direction: column; align-items: flex-start; } }