Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

98 lines
4.1KB

  1. <div class="auth-page-container">
  2. <div class="auth-card">
  3. <div class="auth-header">
  4. <div class="logo">AIT</div>
  5. <h1 class="auth-title">Connectez-vous à votre espace</h1>
  6. <p class="auth-subtitle">Entrez vos identifiants pour continuer.</p>
  7. </div>
  8. <div class="auth-content">
  9. <form [formGroup]="loginForm" (ngSubmit)="login()" class="auth-form">
  10. <!-- Email Field -->
  11. <div class="form-field">
  12. <label for="email" class="form-label">Email</label>
  13. <div class="input-wrapper">
  14. <input
  15. id="email"
  16. type="email"
  17. formControlName="username"
  18. class="form-input"
  19. placeholder="votre.email@exemple.com"
  20. [class.error]="loginForm.get('username')?.invalid && loginForm.get('username')?.touched"
  21. >
  22. <svg class="input-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  23. <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
  24. <polyline points="22,6 12,13 2,6"></polyline>
  25. </svg>
  26. </div>
  27. <span class="error-message" *ngIf="loginForm.get('username')?.invalid && loginForm.get('username')?.touched">
  28. Veuillez entrer une adresse email valide.
  29. </span>
  30. </div>
  31. <!-- Password Field -->
  32. <div class="form-field">
  33. <label for="password" class="form-label">Mot de passe</label>
  34. <div class="input-wrapper">
  35. <input
  36. id="password"
  37. [type]="showPassword ? 'text' : 'password'"
  38. formControlName="password"
  39. class="form-input"
  40. placeholder="••••••••"
  41. [class.error]="loginForm.get('password')?.invalid && loginForm.get('password')?.touched"
  42. >
  43. <svg class="input-icon clickable"
  44. (click)="togglePasswordVisibility()"
  45. xmlns="http://www.w3.org/2000/svg"
  46. width="20"
  47. height="20"
  48. viewBox="0 0 24 24"
  49. fill="none"
  50. stroke="currentColor"
  51. stroke-width="2"
  52. stroke-linecap="round"
  53. stroke-linejoin="round">
  54. <path *ngIf="!showPassword" d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
  55. <circle *ngIf="!showPassword" cx="12" cy="12" r="3"></circle>
  56. <path *ngIf="showPassword" d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path>
  57. <line *ngIf="showPassword" x1="1" y1="1" x2="23" y2="23"></line>
  58. </svg>
  59. </div>
  60. <span class="error-message" *ngIf="loginForm.get('password')?.hasError('required') && loginForm.get('password')?.touched">
  61. Le mot de passe est requis.
  62. </span>
  63. <span class="error-message" *ngIf="loginForm.get('password')?.hasError('minlength') && loginForm.get('password')?.touched">
  64. Le mot de passe doit contenir au moins 6 caractères.
  65. </span>
  66. </div>
  67. <!-- Form Options -->
  68. <div class="form-options">
  69. <label class="checkbox-wrapper">
  70. <input type="checkbox" formControlName="rememberMe">
  71. <span class="checkbox-label">Se souvenir de moi</span>
  72. </label>
  73. <a href="/reset/request" class="forgot-password-link">Mot de passe oublié ?</a>
  74. </div>
  75. <!-- Submit Button -->
  76. <button
  77. type="submit"
  78. [disabled]="loginForm.invalid"
  79. class="auth-btn"
  80. >
  81. <span>Se connecter</span>
  82. </button>
  83. </form>
  84. </div>
  85. <!-- Footer -->
  86. <div class="auth-footer">
  87. <p>Vous n'avez pas de compte ? <a href="/register" class="register-link">S'inscrire</a></p>
  88. </div>
  89. </div>
  90. </div>