mirror of
https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies.git
synced 2026-08-04 02:30:25 +00:00
c39660fc55
- Replace snackbar with interactive LoginAgainDialog when session cannot be recovered automatically on user-initiated actions - Show proxy warning hint in dialog when no proxy assigned to account or set as default - Pass allowInteractiveLogin: false from MAACRequestHandler to skip dialog in automated MAAC confirmations
67 lines
3.8 KiB
XML
67 lines
3.8 KiB
XML
<UserControl x:Class="NebulaAuth.View.Dialogs.LoginAgainDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:other="clr-namespace:NebulaAuth.ViewModel.Other"
|
|
xmlns:model="clr-namespace:NebulaAuth.Model"
|
|
xmlns:nebulaAuth="clr-namespace:NebulaAuth"
|
|
mc:Ignorable="d"
|
|
TextElement.Foreground="{DynamicResource BaseContentBrush}"
|
|
d:DataContext="{d:DesignInstance other:LoginAgainVM}"
|
|
Background="{DynamicResource WindowBackground}">
|
|
|
|
<Grid MinHeight="140" MinWidth="350">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<nebulaAuth:DialogHeader IconKind="Login"
|
|
Title="{Tr LoginAgainDialog.Title}"
|
|
CloseParameter="{StaticResource False}" />
|
|
<Grid Grid.Row="1" Margin="12">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<nebulaAuth:HintBox Grid.Row="0"
|
|
Margin="10,10,10,0"
|
|
Severity="Warning"
|
|
FontSize="14"
|
|
Visibility="{Binding ShowNoProxyWarning, Converter={StaticResource BooleanToVisibilityConverter}}"
|
|
Text="{Tr LoginAgainDialog.NoProxyWarning}" />
|
|
<TextBox TabIndex="0" Grid.Row="1" Text="{Binding Password, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
materialDesign:TextFieldAssist.HasClearButton="True"
|
|
Padding="10"
|
|
FontSize="15"
|
|
Margin="10,10,10,0"
|
|
Style="{StaticResource MaterialDesignOutlinedTextBox}"
|
|
|
|
materialDesign:HintAssist.Hint="{Tr LoginAgainDialog.PasswordBox}"
|
|
materialDesign:HintAssist.IsFloating="False"
|
|
materialDesign:TextFieldAssist.LeadingIcon="Key"
|
|
materialDesign:TextFieldAssist.HasLeadingIcon="True" />
|
|
<CheckBox FontSize="15" Grid.Row="2" Margin="10,5,10,0"
|
|
IsEnabled="{Binding Source={x:Static model:PHandler.IsPasswordSet}}"
|
|
IsChecked="{Binding SavePassword}" Content="{Tr LoginAgainDialog.SaveEncryptedPassword}" />
|
|
<Grid Grid.Row="3" Margin="10,10,10,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Button IsDefault="True" IsEnabled="{Binding IsFormValid}" Margin="0,0,5,5"
|
|
Style="{StaticResource MaterialDesignOutlinedButton}"
|
|
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
|
|
CommandParameter="{StaticResource True}" Content="{Tr LoginAgainDialog.LoginButton}" />
|
|
<Button IsCancel="True" Grid.Column="1" Margin="5,0,0,5"
|
|
Style="{StaticResource MaterialDesignOutlinedButton}"
|
|
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
|
|
CommandParameter="{StaticResource False}" Content="{Tr LoginAgainDialog.CancelButton}" />
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl> |