Redesign Wino Account login and registration dialogs (#835)

Add hero illustrations using XAML-native vector graphics (shield+lock
for login, person+plus badge for registration). Improve visual design
with gradient backgrounds, icon badges on benefit cards, and refined
spacing/corner radii. Add Enter key handling so pressing Enter in an
input field moves focus to the next field, and pressing Enter on the
last field triggers the primary action (login/register).

https://claude.ai/code/session_011B1M6UVeo4yUX3zNHBxQ2P

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Burak Kaan Köse
2026-03-17 16:08:04 +01:00
committed by GitHub
parent ea204fef21
commit 4a94dfb10c
4 changed files with 466 additions and 61 deletions
@@ -1,6 +1,8 @@
using System;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Input;
using Windows.System;
using Wino.Core.Domain;
using Wino.Core.Domain.Entities.Shared;
using Wino.Core.Domain.Interfaces;
@@ -33,6 +35,25 @@ public sealed partial class WinoAccountRegistrationDialog : ContentDialog
var deferral = args.GetDeferral();
try
{
await PerformRegistrationAsync();
}
finally
{
deferral.Complete();
}
}
private async System.Threading.Tasks.Task PerformRegistrationAsync()
{
var validationError = ValidateInput();
if (!string.IsNullOrWhiteSpace(validationError))
{
ShowError(validationError);
return;
}
try
{
SetBusyState(true);
@@ -47,13 +68,11 @@ public sealed partial class WinoAccountRegistrationDialog : ContentDialog
}
Result = result.Account;
args.Cancel = false;
Hide();
}
finally
{
SetBusyState(false);
deferral.Complete();
}
}
@@ -77,6 +96,33 @@ public sealed partial class WinoAccountRegistrationDialog : ContentDialog
return string.Empty;
}
private void EmailTextBox_KeyDown(object sender, KeyRoutedEventArgs e)
{
if (e.Key == VirtualKey.Enter)
{
PasswordBox.Focus(FocusState.Programmatic);
e.Handled = true;
}
}
private void PasswordBox_KeyDown(object sender, KeyRoutedEventArgs e)
{
if (e.Key == VirtualKey.Enter)
{
ConfirmPasswordBox.Focus(FocusState.Programmatic);
e.Handled = true;
}
}
private async void ConfirmPasswordBox_KeyDown(object sender, KeyRoutedEventArgs e)
{
if (e.Key == VirtualKey.Enter)
{
e.Handled = true;
await PerformRegistrationAsync();
}
}
private void InputChanged(TextBox sender, TextBoxTextChangingEventArgs args) => HideError();
private void InputChanged(object sender, RoutedEventArgs e) => HideError();