fix some issues and optimized login

This commit is contained in:
Rene Schwarz
2021-08-05 20:45:40 +02:00
parent 2f7482080e
commit 0b5bf2e3d3
36 changed files with 484 additions and 77 deletions

View File

@@ -5,6 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:Server_Dashboard"
xmlns:loading="clr-namespace:Server_Dashboard.Controls"
x:Name="Login"
mc:Ignorable="d"
Title="Server Dashboard" Height="700" Width="500" WindowStyle="None" Background="Transparent" ResizeMode="CanResize" local:CloseProperty.Value="True">
@@ -21,13 +22,14 @@
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="*"/>
<RowDefinition Height="70"/>
<RowDefinition Height="80"/>
<RowDefinition Height="80"/>
<RowDefinition Height="80"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="80"/>
<RowDefinition Height=".2*"/>
<RowDefinition Height=".3*"/>
</Grid.RowDefinitions>
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown">
@@ -63,8 +65,9 @@
Background="{StaticResource BackgroundSurface_00dp}"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
VerticalAlignment="Bottom"
Grid.ColumnSpan="2"
Margin="0 0 0 10"
>
<StackPanel
VerticalAlignment="Center"
@@ -90,6 +93,9 @@
</TextBlock>
</StackPanel>
</Border>
<UserControl Grid.Row="2" Visibility="{Binding Loading}">
<loading:LoadingIndicator/>
</UserControl>
<!--#endregion-->
<!--#region Username form-->
@@ -99,7 +105,7 @@
Width="350"
Height="60"
Background="{StaticResource BackgroundSurface_01dp}"
Grid.Row="2"
Grid.Row="3"
Grid.ColumnSpan="2"
>
<Border.Effect>
@@ -145,7 +151,7 @@
<Border
Margin="0 10 0 10"
Background="{StaticResource BackgroundSurface_01dp}"
Grid.Row="3"
Grid.Row="4"
Grid.ColumnSpan="2"
Width="350"
CornerRadius="4"
@@ -204,7 +210,7 @@
Width="350"
Command="{Binding LoginCommand}"
CommandParameter="{Binding ElementName=Login}"
Grid.Row="4"
Grid.Row="5"
Content="LOGIN"
Grid.ColumnSpan="2"
/>
@@ -215,7 +221,7 @@
Text="{Binding ErrorText}"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Grid.Row="5"
Grid.Row="6"
Grid.Column="1"
Foreground="{StaticResource ErrorRed}"
FontSize="14"
@@ -223,7 +229,7 @@
<!--#endregion-->
<!--#region Remember me and Password forgotten link-->
<Grid Grid.Row="6">
<Grid Grid.Row="7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
@@ -271,7 +277,7 @@
<!--#endregion-->
<!--#region Link to register form-->
<Grid Grid.Row="7">
<Grid Grid.Row="8">
<StackPanel
Orientation="Horizontal"
HorizontalAlignment="Center"