Sostituito frontend angular new con frontend angular. Sostituito frontend angular con frontend angular old
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
<div class="flex flex-col h-full text-white animate-fade-in">
|
||||
<!-- Header -->
|
||||
<header class="mb-6 flex items-center flex-shrink-0">
|
||||
<button (click)="close.emit()" class="p-2 rounded-full hover:bg-slate-700 mr-3">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" />
|
||||
</svg>
|
||||
</button>
|
||||
<div>
|
||||
<h1 class="text-3xl font-bold">Modifica Profilo</h1>
|
||||
<p class="text-slate-400 mt-1">Aggiorna i tuoi dati personali.</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Form -->
|
||||
<main class="flex-grow overflow-y-auto pr-2 -mr-2">
|
||||
<form (submit)="$event.preventDefault(); saveChanges()" class="space-y-6">
|
||||
<!-- Nome -->
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-medium text-slate-300 mb-2">Nome</label>
|
||||
<input type="text" id="name" name="name"
|
||||
[value]="name()"
|
||||
(input)="onNameInput($event)"
|
||||
required
|
||||
class="w-full bg-slate-800 border border-slate-600 rounded-md py-2 px-3 text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500">
|
||||
</div>
|
||||
|
||||
<!-- Email -->
|
||||
<div>
|
||||
<label for="email" class="block text-sm font-medium text-slate-300 mb-2">Email</label>
|
||||
<input type="email" id="email" name="email"
|
||||
[value]="email()"
|
||||
(input)="onEmailInput($event)"
|
||||
required
|
||||
class="w-full bg-slate-800 border border-slate-600 rounded-md py-2 px-3 text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500">
|
||||
</div>
|
||||
|
||||
<div class="border-t border-slate-700 pt-6">
|
||||
<h3 class="text-lg font-semibold text-cyan-400">Cambia Password</h3>
|
||||
<p class="text-sm text-slate-400 mb-4">Lascia vuoto per non modificare la password attuale.</p>
|
||||
|
||||
<!-- Nuova Password -->
|
||||
<div>
|
||||
<label for="password" class="block text-sm font-medium text-slate-300 mb-2">Nuova Password</label>
|
||||
<input type="password" id="password" name="password"
|
||||
[value]="password()"
|
||||
(input)="onPasswordInput($event)"
|
||||
placeholder="Minimo 6 caratteri"
|
||||
class="w-full bg-slate-800 border border-slate-600 rounded-md py-2 px-3 text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500">
|
||||
</div>
|
||||
|
||||
<!-- Conferma Password -->
|
||||
<div class="mt-4">
|
||||
<label for="confirmPassword" class="block text-sm font-medium text-slate-300 mb-2">Conferma Nuova Password</label>
|
||||
<input type="password" id="confirmPassword" name="confirmPassword"
|
||||
[value]="confirmPassword()"
|
||||
(input)="onConfirmPasswordInput($event)"
|
||||
class="w-full bg-slate-800 border rounded-md py-2 px-3 text-white placeholder-slate-400 focus:outline-none focus:ring-2"
|
||||
[class.border-slate-600]="password().length === 0 || passwordsMatch()"
|
||||
[class.border-red-500]="password().length > 0 && !passwordsMatch()"
|
||||
[class.focus:ring-cyan-500]="password().length === 0 || passwordsMatch()"
|
||||
[class.focus:ring-red-500]="password().length > 0 && !passwordsMatch()">
|
||||
@if(password().length > 0 && !passwordsMatch()) {
|
||||
<p class="mt-2 text-sm text-red-400">Le password non coincidono.</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Buttons -->
|
||||
<div class="flex justify-end space-x-4 pt-4">
|
||||
<button type="button" (click)="close.emit()" class="px-6 py-2 rounded-md bg-slate-600 hover:bg-slate-500 text-white font-semibold transition-colors">Annulla</button>
|
||||
<button type="submit"
|
||||
[disabled]="!isFormValid()"
|
||||
[class]="'px-6 py-2 rounded-md font-semibold transition-colors ' + (isFormValid() ? 'bg-cyan-500 hover:bg-cyan-600 text-white' : 'bg-slate-700 text-slate-500 cursor-not-allowed')">
|
||||
Salva Modifiche
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
Reference in New Issue
Block a user