first-login.blade.php 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <!DOCTYPE html>
  2. <html lang="it">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Primo Accesso - Leezard.cloud</title>
  7. {{-- Favicon --}}
  8. <link rel="icon" type="image/png" href="{{asset('favicon-96x96.png')}}" sizes="96x96" />
  9. <link rel="icon" type="image/svg+xml" href="{{asset('favicon.svg')}}" />
  10. <link rel="shortcut icon" href="{{asset('favicon.ico')}}"/>
  11. <link rel="shortcut icon" href="{{asset('favicon-light.ico')}}" media="(prefers-color-scheme: light)"/>
  12. <link rel="shortcut icon" href="{{asset('favicon-dark.ico')}}" media="(prefers-color-scheme: dark)"/>
  13. <link rel="apple-touch-icon" sizes="180x180" href="{{asset('apple-touch-icon.png')}}" />
  14. <link rel="manifest" href="{{asset('site.webmanifest')}}" />
  15. {{-- end Favicon --}}
  16. <!-- Bootstrap CSS -->
  17. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
  18. <!-- Font Awesome -->
  19. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
  20. <link rel="stylesheet" href="/css/style.css">
  21. <link rel="stylesheet" href="/css/new_style.css">
  22. <style>
  23. body {
  24. /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  25. min-height: 100vh;
  26. /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
  27. }
  28. .first-login-container {
  29. padding: 2rem 0;
  30. min-height: 100vh;
  31. display: flex;
  32. align-items: center;
  33. }
  34. .card {
  35. box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  36. border: none;
  37. border-radius: 15px;
  38. overflow: hidden;
  39. }
  40. .card-header {
  41. background: linear-gradient(135deg, var(--color-blu) 0%, var(--color-blu) 100%);
  42. color: white;
  43. border: none;
  44. padding: 2rem;
  45. text-align: center;
  46. }
  47. .card-header h3 {
  48. margin: 0;
  49. font-weight: 300;
  50. }
  51. .text-primary {
  52. color: var(--color-blu) !important;
  53. }
  54. .btn-primary {
  55. background-color: var(--color-blu);
  56. border-color: var(--color-blu);
  57. padding: 12px 30px;
  58. font-weight: 600;
  59. }
  60. .btn-primary:hover {
  61. background-color: var(--color-blu);
  62. border-color: var(--color-blu);
  63. }
  64. .form-control:focus {
  65. border-color: var(--color-blu);
  66. box-shadow: 0 0 0 0.2rem rgba(12, 97, 151, 0.25);
  67. }
  68. .alert-warning {
  69. background-color: rgba(255, 193, 7, 0.1);
  70. border-color: #ffc107;
  71. color: #856404;
  72. }
  73. .section-header {
  74. border-bottom: 2px solid #f8f9fa;
  75. padding-bottom: 0.5rem;
  76. margin-bottom: 1.5rem;
  77. }
  78. .logout-link {
  79. position: absolute;
  80. top: 20px;
  81. right: 20px;
  82. /* color: white; */
  83. text-decoration: none;
  84. /* background: rgba(255,255,255,0.2); */
  85. /* padding: 8px 15px; */
  86. /* border-radius: 5px; */
  87. /* transition: background 0.3s; */
  88. }
  89. /* .logout-link:hover { */
  90. /* background: rgba(255,255,255,0.3); */
  91. /* color: white; */
  92. /* text-decoration: none; */
  93. /* } */
  94. </style>
  95. </head>
  96. <body>
  97. <a href="/logout" class="logout-link btn btn-primary">
  98. <i class="fas fa-sign-out-alt"></i> Esci
  99. </a>
  100. <div class="login--box d-flex flex-column min-vh-100 justify-content-center align-items-center">
  101. <div class="card--ui mt-5" style="max-width: 600px; width: 100%">
  102. <img src="{{env('LOGO', '')}}" alt="" class="img-fluid" id="login--logo" style="max-width:340px; width: 100%; margin: auto; display: block; margin-bottom: 30px;">
  103. <h4 class="form--title text-center mb-3">Completa il tuo Profilo</h4>
  104. <p class="text-center mb-4">Primo accesso - Configurazione obbligatoria</p>
  105. {{-- Welcome Message --}}
  106. <div class="alert alert-warning mb-4">
  107. <h6><i class="fas fa-exclamation-triangle"></i> <strong>Primo Accesso</strong></h6>
  108. <p class="mb-2">Per motivi di sicurezza, devi <strong>impostare una nuova password</strong> prima di accedere alla piattaforma.</p>
  109. <p class="mb-0">I tuoi dati sono già stati configurati dall'amministratore.</p>
  110. </div>
  111. {{-- Success/Error Messages --}}
  112. @if (session('success'))
  113. <div class="alert alert-success alert-dismissible fade show" role="alert">
  114. <i class="fas fa-check-circle"></i> {{ session('success') }}
  115. <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
  116. </div>
  117. @endif
  118. <form method="POST" action="{{ route('first-login.complete') }}">
  119. @csrf
  120. {{-- <div class="section-header">
  121. <h6 class="text-primary mb-0">
  122. <i class="fas fa-lock"></i> Imposta la Tua Password
  123. </h6>
  124. </div> --}}
  125. {{-- <div class="alert alert-info mb-3">
  126. <i class="fas fa-info-circle"></i>
  127. <strong>Cambia Password:</strong> Sostituisci la password temporanea con una tua password sicura.
  128. </div> --}}
  129. <div class="row mb-4">
  130. <div class="col-md-6">
  131. <div class="form--item input-group">
  132. <label for="password">Nuova Password <span class="text-danger">*</span></label>
  133. <input type="password" class="form-control @error('password') is-invalid @enderror" id="password" name="password" placeholder="Inserisci una password sicura" required>
  134. <span class="input-group-text" id="basic-addon2"><i class="ico--ui lock"></i></span>
  135. </div>
  136. <small class="form-text text-muted">
  137. <i class="fas fa-key"></i> Minimo 6 caratteri
  138. </small>
  139. @error('password')
  140. <div class="invalid-feedback">{{ $message }}</div>
  141. @enderror
  142. </div>
  143. <div class="col-md-6">
  144. <div class="form--item input-group">
  145. <label for="password_confirmation">Conferma password <span class="text-danger">*</span></label>
  146. <input type="password" class="form-control @error('password_confirmation') is-invalid @enderror" id="password_confirmation" name="password_confirmation" placeholder="Ripeti la password" required>
  147. <span class="input-group-text" id="basic-addon2"><i class="ico--ui lock"></i></span>
  148. </div>
  149. @error('password_confirmation')
  150. <div class="invalid-feedback">{{ $message }}</div>
  151. @enderror
  152. </div>
  153. </div>
  154. {{-- Action Buttons --}}
  155. <div class="d-grid gap-2 d-md-block text-center">
  156. <button type="submit" class="btn btn-primary">
  157. {{-- <i class="fas fa-key"></i> --}}
  158. Imposta password e accedi
  159. </button>
  160. </div>
  161. <div class="text-center mt-3">
  162. <small class="text-muted">
  163. <i class="fas fa-shield-alt"></i>
  164. Dopo aver impostato la password, riceverai un'email di conferma dell'attivazione.
  165. </small>
  166. </div>
  167. </form>
  168. </div>
  169. </div>
  170. <!-- Bootstrap JS -->
  171. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
  172. <script>
  173. // Password strength indicator
  174. document.getElementById('password').addEventListener('input', function() {
  175. const password = this.value;
  176. const strength = document.getElementById('password-strength');
  177. if (password.length >= 8) {
  178. this.classList.remove('is-invalid');
  179. this.classList.add('is-valid');
  180. } else {
  181. this.classList.remove('is-valid');
  182. }
  183. });
  184. // Password confirmation check
  185. document.getElementById('password_confirmation').addEventListener('input', function() {
  186. const password = document.getElementById('password').value;
  187. const confirmation = this.value;
  188. if (password === confirmation && confirmation.length >= 8) {
  189. this.classList.remove('is-invalid');
  190. this.classList.add('is-valid');
  191. } else {
  192. this.classList.remove('is-valid');
  193. }
  194. });
  195. </script>
  196. </body>
  197. </html>