redesign to material standards and clean up some sylings
This commit is contained in:
@@ -7,8 +7,16 @@
|
||||
xmlns:local="clr-namespace:Server_Dashboard"
|
||||
x:Name="Login"
|
||||
mc:Ignorable="d"
|
||||
Title="Server Dashboard" Height="700" Width="500" WindowStyle="None" ResizeMode="NoResize" Background="Transparent" AllowsTransparency="True" local:CloseProperty.Value="True">
|
||||
<Border Style="{StaticResource LoginViewBorder}">
|
||||
Title="Server Dashboard" Height="700" Width="500" WindowStyle="None" Background="Transparent" ResizeMode="CanResize" local:CloseProperty.Value="True">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="0" ResizeBorderThickness="0"/>
|
||||
</WindowChrome.WindowChrome>
|
||||
<Window.DataContext>
|
||||
<local:LoginViewModel/>
|
||||
</Window.DataContext>
|
||||
|
||||
<!--#region Login forms main container-->
|
||||
<Border Background="{StaticResource BackgroundSurface_00dp}">
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
@@ -17,20 +25,27 @@
|
||||
<RowDefinition Height="80"/>
|
||||
<RowDefinition Height="80"/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height=".4*"/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="80"/>
|
||||
<RowDefinition Height=".2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseDown">
|
||||
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<Grid Grid.Row="0">
|
||||
|
||||
<!--#region Custom title bar-->
|
||||
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="270" ShadowDepth="0" BlurRadius="5"/>
|
||||
</Grid.Effect>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="40"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Column="0"/>
|
||||
<Button Grid.Column="2" Style="{StaticResource CloseButton}" Content="✕">
|
||||
<Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
@@ -38,37 +53,255 @@
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Border Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" BorderBrush="#35bEb6" BorderThickness="0 1 0 1">
|
||||
<StackPanel VerticalAlignment="Center" Margin="0 0 0 5">
|
||||
<TextBlock Text="Server Dashboard" Style="{StaticResource LoginGreeter}"/>
|
||||
<TextBlock Text="Login" Style="{StaticResource LoginGreeter}"/>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Greeting text-->
|
||||
<Border
|
||||
Height="100"
|
||||
BorderBrush="{StaticResource DeepPurple_400}"
|
||||
BorderThickness="0 2 0 2"
|
||||
Background="{StaticResource BackgroundSurface_00dp}"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Grid.ColumnSpan="2"
|
||||
>
|
||||
<StackPanel
|
||||
VerticalAlignment="Center"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock
|
||||
Text="Server Dashboard"
|
||||
FontSize="30"
|
||||
HorizontalAlignment="Center"
|
||||
>
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.64"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Text="Login"
|
||||
FontSize="30"
|
||||
HorizontalAlignment="Center"
|
||||
>
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.64"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="2" Style="{StaticResource LoginFormsBorder}">
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Username form-->
|
||||
<Border
|
||||
CornerRadius="4"
|
||||
Margin="0 10 0 10"
|
||||
Width="350"
|
||||
Height="60"
|
||||
Background="{StaticResource BackgroundSurface_01dp}"
|
||||
Grid.Row="2"
|
||||
Grid.ColumnSpan="2"
|
||||
>
|
||||
<Border.Effect>
|
||||
<DropShadowEffect
|
||||
Direction="0"
|
||||
ShadowDepth="0"
|
||||
BlurRadius="5"
|
||||
/>
|
||||
</Border.Effect>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Column="0" Height="30" Source="Assets/Images/userlogin.png"/>
|
||||
<TextBlock Text="Username" Style="{StaticResource LoginFormTooltip}" Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False"/>
|
||||
<TextBox Text="{Binding Username}" x:Name="UserName" Background="Transparent" Grid.Column="1" Style="{StaticResource LoginFormInput}"/>
|
||||
<Image
|
||||
Grid.Column="0"
|
||||
Height="30"
|
||||
Source="Assets/Images/userlogin.png"
|
||||
/>
|
||||
<TextBox
|
||||
Text="{Binding Username}"
|
||||
x:Name="UserName"
|
||||
Grid.Column="1"
|
||||
Margin="0 0 5 0"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="Username"
|
||||
Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
>
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</Border>
|
||||
<!--Background="#1B1C20"-->
|
||||
<Border Grid.Row="3" Style="{StaticResource LoginFormsBorder}">
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Password form-->
|
||||
<Border
|
||||
Margin="0 10 0 10"
|
||||
Background="{StaticResource BackgroundSurface_01dp}"
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="2"
|
||||
Width="350"
|
||||
CornerRadius="4"
|
||||
Padding="0 0 5 0"
|
||||
>
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5"/>
|
||||
</Border.Effect>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Column="0" Height="30" Source="Assets/Images/userpasswd.png"/>
|
||||
<TextBlock Visibility="{Binding ElementName=Password, Path=(local:HasTextProperty.Value), Converter={StaticResource UserNameVisibillity}}" x:Name="PasswordHint" Text="Password" Style="{StaticResource LoginFormTooltip}" Grid.Column="1" IsHitTestVisible="False"/>
|
||||
<PasswordBox local:MonitorPasswordProperty.Value="True" Grid.Column="1" x:Name="Password" Style="{StaticResource LoginFormPassword}"/>
|
||||
<PasswordBox
|
||||
Width="290"
|
||||
Height="60"
|
||||
local:MonitorPasswordProperty.Value="True"
|
||||
Grid.Column="1"
|
||||
x:Name="Password"
|
||||
>
|
||||
<PasswordBox.InputBindings>
|
||||
<KeyBinding
|
||||
Key="Return"
|
||||
Command="{Binding LoginCommand}"
|
||||
CommandParameter="{Binding ElementName=Login}"
|
||||
/>
|
||||
</PasswordBox.InputBindings>
|
||||
</PasswordBox>
|
||||
<TextBlock
|
||||
Visibility="{Binding ElementName=Password, Path=(local:HasTextProperty.Value), Converter={StaticResource UserNameVisibillity}}" x:Name="PasswordHint"
|
||||
Text="Password"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
>
|
||||
<TextBlock.InputBindings>
|
||||
<KeyBinding
|
||||
Key="Return"
|
||||
Command="{Binding LoginCommand}"
|
||||
CommandParameter="{Binding ElementName=Login}"
|
||||
/>
|
||||
</TextBlock.InputBindings>
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Button Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=Login}" Grid.Row="4" Style="{StaticResource LoginFormButton}" Content="Login" Cursor="Hand"/>
|
||||
<TextBlock Style="{StaticResource ErrorMessage}" Text="{Binding ErrorText}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="5"/>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Login button-->
|
||||
<Button
|
||||
Height="60"
|
||||
Width="350"
|
||||
Command="{Binding LoginCommand}"
|
||||
CommandParameter="{Binding ElementName=Login}"
|
||||
Grid.Row="4"
|
||||
Content="LOGIN"
|
||||
Grid.ColumnSpan="2"
|
||||
/>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Error text-->
|
||||
<TextBlock
|
||||
Text="{Binding ErrorText}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Foreground="{StaticResource ErrorRed}"
|
||||
FontSize="14"
|
||||
/>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Remember me and Password forgotten link-->
|
||||
<Grid Grid.Row="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox
|
||||
IsChecked="{Binding RememberUser}"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="75 0 0 0"
|
||||
/>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Text="Remember me?"
|
||||
FontSize="14"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10 0 0 0"
|
||||
>
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.64"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Grid.Column="3"
|
||||
FontSize="14"
|
||||
Margin="0 0 75 0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
>
|
||||
<!--Send recovery Email to user, probably replace with a button-->
|
||||
<Hyperlink
|
||||
NavigateUri="https://example.com"
|
||||
local:HyperlinkExtensions.IsExternal="True"
|
||||
>
|
||||
Forgot password
|
||||
</Hyperlink>
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.64"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Link to register form-->
|
||||
<Grid Grid.Row="7">
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Center"
|
||||
>
|
||||
<TextBlock
|
||||
Text="Don't have an account?"
|
||||
FontSize="16"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
>
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.64"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<Button
|
||||
Command="{Binding RegisterCommand}"
|
||||
Content="REGISTER"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="12"
|
||||
Height="30"
|
||||
Width="80"
|
||||
Margin="10 0 0 0"
|
||||
/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<!--#endregion-->
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
<!--#endregion-->
|
||||
|
||||
</Window>
|
||||
Reference in New Issue
Block a user