new ui and added another error window for wrong login

This commit is contained in:
Taarly 2025-06-30 16:32:06 +02:00
parent d29e6b8767
commit ad25e8c849
12 changed files with 458 additions and 237 deletions

View File

@ -5,9 +5,9 @@ namespace Project.Persistence;
public partial class SQLite public partial class SQLite
{ {
//filepath for home-pc: //filepath for home-pc:
private static string _dbPath = "C:/Users/Soi/Desktop/keywi.db"; //private static string _dbPath = "C:/Users/Soi/Desktop/keywi.db";
//filepath for work-laptop: //filepath for work-laptop:
//private static string _dbPath = "C:/Users/lowns/Desktop/keywi.db"; private static string _dbPath = "C:/Users/lowns/Desktop/keywi.db";
//KLASSENVARIABLEN ERSTELLEN //KLASSENVARIABLEN ERSTELLEN
//private static string loginname; //private static string loginname;

View File

@ -2,50 +2,74 @@
x:Class="Project.View.LoginPage" x:Class="Project.View.LoginPage"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid Background="SandyBrown">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> <UserControl.Styles>
<Style Selector="Button">
<Setter Property="Width" Value="200" />
<Setter Property="Height" Value="40" />
<Setter Property="CornerRadius" Value="20" />
<Setter Property="Margin" Value="0,8" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="#4CAF50" />
<Setter Property="Foreground" Value="White" />
</Style>
</UserControl.Styles>
<Grid>
<Grid.Background>
<LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
<GradientStop Color="White" Offset="0" />
<GradientStop Color="LightGray" Offset="1" />
</LinearGradientBrush>
</Grid.Background>
<Border
Background="White"
BoxShadow="0 4 8 0 #40000000"
CornerRadius="8"
Padding="20"
Width="400">
<StackPanel>
<Image <Image
Height="400" Height="150"
Margin="0,0,0,20"
Source="avares://Project.View/Images/keywi_logo_2.png" Source="avares://Project.View/Images/keywi_logo_2.png"
Width="400" /> Width="150" />
</StackPanel>
<StackPanel <TextBlock
FontSize="24"
FontWeight="Bold"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Orientation="Vertical" Margin="0,0,0,20"
VerticalAlignment="Center"> Text="Login-Page" />
<TextBlock>Your Login Name:</TextBlock>
<TextBlock Text="Username:" />
<TextBox <TextBox
TextWrapping="Wrap" TextWrapping="Wrap"
Watermark="Login-Name" Watermark="Your Username"
x:Name="LoginNameBox" /> x:Name="LoginNameBox" />
<TextBlock>Password:</TextBlock> <TextBlock Text="Password:" />
<TextBox <TextBox
PasswordChar="*" PasswordChar="•"
TextWrapping="Wrap" TextWrapping="Wrap"
Watermark="Password" Watermark="Enter password"
x:Name="LoginPasswordBox" /> x:Name="LoginPasswordBox" />
<Button
BorderBrush="Black" <Button Click="LoginButtonOnClick" Name="ConfirmButton">
BorderThickness="1" Login
Click="LoginButtonOnClick"
HorizontalAlignment="Center"
Margin="20"
Name="ConfirmButton">
LOGIN
</Button> </Button>
<Button <Button
BorderBrush="Black" Background="#FF9800"
BorderThickness="1"
Click="NewUserButtonOnClick" Click="NewUserButtonOnClick"
HorizontalAlignment="Center"
Margin="20"
Name="NewUserButton"> Name="NewUserButton">
Create New User New User
</Button> </Button>
</StackPanel> </StackPanel>
</Border>
</Grid> </Grid>
</UserControl> </UserControl>

View File

@ -25,7 +25,7 @@ public partial class LoginPage : UserControl
string? loginName = LoginNameBox.Text ?? string.Empty; string? loginName = LoginNameBox.Text ?? string.Empty;
string? loginPassword = LoginPasswordBox.Text ?? string.Empty; string? loginPassword = LoginPasswordBox.Text ?? string.Empty;
bool allowLogin = AppController.CompareLogin(loginName, loginPassword); bool allowLogin = AppController.CompareLogin(loginName, loginPassword);
var newPopUp = new PopUp(); var newPopUp = new LoginErrorPopUp();
if (allowLogin) if (allowLogin)
{ {
//show menuview //show menuview

View File

@ -0,0 +1,56 @@
<Window
SizeToContent="Height"
Title="WARNING"
Width="500"
WindowStartupLocation="CenterOwner"
x:Class="Project.View.LoginErrorPopUp"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Window.Styles>
<Style Selector="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="Gray" />
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="Margin" Value="0,5" />
</Style>
<Style Selector="Button">
<Setter Property="Width" Value="120" />
<Setter Property="Height" Value="40" />
<Setter Property="CornerRadius" Value="20" />
<Setter Property="Margin" Value="0,15,0,0" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="#4CAF50" />
<Setter Property="Foreground" Value="White" />
</Style>
</Window.Styles>
<Grid Background="#F5F5F5">
<Border
Background="White"
BoxShadow="0 4 8 0 #40000000"
CornerRadius="8"
Margin="15">
<ScrollViewer>
<StackPanel Margin="20" MaxWidth="450">
<TextBlock
FontSize="24"
FontWeight="Bold"
Margin="0,0,0,15"
Text="⚠️ Warning" />
<TextBlock Text="One or more entries are wrong or missing." />
<TextBlock Text="Your username and password do not match." />
<Button
Click="LoginError_Click"
Content="OK"
Margin="0,15,0,5" />
</StackPanel>
</ScrollViewer>
</Border>
</Grid>
</Window>

View File

@ -0,0 +1,22 @@
using System;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Media;
using Project.Controller;
using Project.Model;
using Project.Persistence;
namespace Project.View;
public partial class LoginErrorPopUp : Window
{
public LoginErrorPopUp()
{
InitializeComponent();
}
private void LoginError_Click(object? sender, RoutedEventArgs e)
{
Close();
}
}

View File

@ -2,103 +2,114 @@
x:Class="Project.View.MenuView" x:Class="Project.View.MenuView"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.Styles>
<Style Selector="TextBlock">
<Setter Property="FontSize" Value="16" />
<Setter Property="Margin" Value="0,10" />
</Style>
<Style Selector="TextBox">
<Setter Property="Height" Value="35" />
<Setter Property="Margin" Value="0,5,0,10" />
<Setter Property="CornerRadius" Value="4" />
<Setter Property="TextWrapping" Value="Wrap" />
</Style>
<Style Selector="Button.icon">
<Setter Property="Width" Value="35" />
<Setter Property="Height" Value="35" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="CornerRadius" Value="4" />
<Setter Property="Margin" Value="5,0" />
</Style>
</UserControl.Styles>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="200" /> <ColumnDefinition Width="250" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ScrollViewer <!-- left column -->
Grid.Column="0" <Border Background="#F5F5F5" BoxShadow="2 0 10 0 #20000000">
Margin="0,0,0,40" <Grid>
VerticalScrollBarVisibility="Auto"> <ScrollViewer Margin="0,0,0,60" VerticalScrollBarVisibility="Auto">
<StackPanel Margin="10" x:Name="entriesContainer" />
<StackPanel x:Name="entriesContainer">
</StackPanel>
</ScrollViewer> </ScrollViewer>
<Button <Button
Background="Red"
Content="-"
CornerRadius="22"
FontSize="24"
Foreground="White"
Height="45"
HorizontalAlignment="Center"
IsEnabled="False"
Margin="0,0,-50,20"
VerticalAlignment="Bottom"
Width="45"
x:Name="DeleteButton" />
<Button
Background="#4CAF50"
Click="NewEntryButton_OnClick" Click="NewEntryButton_OnClick"
Content="+" Content="+"
HorizontalAlignment="Left" CornerRadius="22"
Name="NewEntryButton" FontSize="24"
VerticalAlignment="Bottom" /> Foreground="White"
Height="45"
<Border Background="RosyBrown" Grid.Column="1"> HorizontalAlignment="Right"
<StackPanel Orientation="Horizontal" x:Name="ShowEntryDetails"> Margin="0,0,20,20"
VerticalAlignment="Bottom"
<StackPanel Margin="20,20,100,20" Orientation="Vertical"> Width="45"
<TextBlock x:Name="NewEntryButton" />
FontSize="20" </Grid>
HorizontalAlignment="Left"
Margin="23"
Text="Name:" />
<TextBlock
FontSize="20"
HorizontalAlignment="Left"
Margin="23"
Text="Login-Name:" />
<TextBlock
FontSize="20"
HorizontalAlignment="Left"
Margin="23"
Text="URL:" />
<TextBlock
FontSize="20"
HorizontalAlignment="Left"
Margin="23"
Text="Password:" />
<TextBlock
FontSize="20"
HorizontalAlignment="Left"
Margin="23"
Text="Note:" />
</StackPanel>
<StackPanel Margin="20,20,20,20" Orientation="Vertical">
<TextBox
Height="30"
Margin="20"
Text="THE NAME OF YOUR SAVED LOGIN"
TextWrapping="Wrap" />
<TextBox
Height="30"
Margin="20"
Text="YOUR LOGIN NAME ON THIS PAGE"
TextWrapping="Wrap" />
<TextBox
Height="30"
Margin="20"
Text="THE URL TO YOUR PAGE"
TextWrapping="Wrap" />
<StackPanel Orientation="Horizontal">
<TextBox
Height="30"
Margin="20"
PasswordChar="*"
Text="PASSWORT"
TextWrapping="Wrap" />
<Button
BorderBrush="Black"
BorderThickness="1"
Content="X"
Name="copyPassword" />
<Button
BorderBrush="Black"
BorderThickness="1"
Content="X"
Name="showPassword" />
</StackPanel>
<TextBox
Height="150"
Margin="20"
Text="YOUR NOTES"
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</Border> </Border>
<!-- Right column -->
<Border Background="White" Grid.Column="1">
<StackPanel Margin="40" x:Name="ShowEntryDetails">
<Grid ColumnDefinitions="150,*">
<!-- Labels -->
<StackPanel Grid.Column="0">
<TextBlock FontWeight="SemiBold" Text="Name:" />
<TextBlock FontWeight="SemiBold" Text="Login-Name:" />
<TextBlock FontWeight="SemiBold" Text="URL:" />
<TextBlock FontWeight="SemiBold" Text="Password:" />
<TextBlock FontWeight="SemiBold" Text="Note:" />
</StackPanel>
<!-- entry fields -->
<StackPanel Grid.Column="1">
<TextBox Text="THE NAME OF YOUR SAVED LOGIN" />
<TextBox Text="YOUR LOGIN NAME ON THIS PAGE" />
<TextBox Text="THE URL TO YOUR PAGE" />
<StackPanel Orientation="Horizontal">
<TextBox
PasswordChar="•"
Text="PASSWORT"
Width="250" />
<Button
Classes="icon"
Content="📋"
ToolTip.Tip="Passwort kopieren"
x:Name="copyPassword" />
<Button
Classes="icon"
Content="👁"
ToolTip.Tip="Passwort anzeigen"
x:Name="showPassword" />
</StackPanel>
<TextBox
AcceptsReturn="True"
Height="150"
Text="YOUR NOTES" />
</StackPanel>
</Grid>
</StackPanel>
</Border>
</Grid> </Grid>
</UserControl> </UserControl>

View File

@ -45,7 +45,8 @@ public partial class MenuView : Window
Content = entry.Name, // Display the entry name on the button Content = entry.Name, // Display the entry name on the button
Margin = new Thickness(5), Margin = new Thickness(5),
Padding = new Thickness(10), Padding = new Thickness(10),
Width = 200 Width = 200,
Background = Brushes.SlateGray,
}; };
// add click handler for the button // add click handler for the button
button.Click += (object? sender, Avalonia.Interactivity.RoutedEventArgs e) => EntryDetails(entry); button.Click += (object? sender, Avalonia.Interactivity.RoutedEventArgs e) => EntryDetails(entry);

View File

@ -4,73 +4,110 @@
x:Class="Project.View.NewEntry" x:Class="Project.View.NewEntry"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<Border Background="SaddleBrown"> <UserControl.Styles>
<Style Selector="TextBlock">
<Setter Property="FontSize" Value="14" />
<Setter Property="FontWeight" Value="Medium" />
<Setter Property="Margin" Value="0,10,0,5" />
</Style>
<Style Selector="TextBox">
<Setter Property="Height" Value="40" />
<Setter Property="Margin" Value="0,0,0,10" />
<Setter Property="CornerRadius" Value="4" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<StackPanel Orientation="Vertical"> </Style>
<TextBlock <Style Selector="Button">
FontSize="20" <Setter Property="Height" Value="35" />
HorizontalAlignment="Left" <Setter Property="HorizontalContentAlignment" Value="Center" />
Text="Name:" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<TextBox TextWrapping="Wrap" Watermark="Name:" x:Name="NameBox"/> <Setter Property="CornerRadius" Value="4" />
<TextBlock <Setter Property="Margin" Value="5" />
FontSize="20" <Setter Property="Padding" Value="15,0" />
HorizontalAlignment="Left" </Style>
Text="Username/Email:" /> </UserControl.Styles>
<TextBox TextWrapping="Wrap" Watermark="Username/Email" x:Name="UsernameMailBox"/>
<TextBlock
FontSize="20"
HorizontalAlignment="Left"
Margin="23"
Text="URL:" />
<TextBox TextWrapping="Wrap" Watermark="E-Mail" x:Name="URLBox"/>
<TextBlock
FontSize="20"
HorizontalAlignment="Left"
Margin="23"
Text="Password:" />
<StackPanel Orientation="Horizontal">
<Border
Background="White"
BoxShadow="0 4 8 0 #40000000"
CornerRadius="8"
Margin="10">
<Grid Margin="20">
<StackPanel>
<TextBlock
FontSize="24"
FontWeight="Bold"
Foreground="Gray"
HorizontalAlignment="Center"
Margin="0,0,0,20"
Text="New Entry" />
<TextBlock Text="Name:" />
<TextBox Watermark="Enter Name" x:Name="NameBox" />
<TextBlock Text="Username/E-Mail:" />
<TextBox Watermark="Enter username or email" x:Name="UsernameMailBox" />
<TextBlock Text="URL:" />
<TextBox Watermark="Enter URL" x:Name="URLBox" />
<TextBlock Text="Password:" />
<Grid ColumnDefinitions="*, Auto, Auto">
<TextBox <TextBox
Grid.Column="0"
Name="NewentryPW" Name="NewentryPW"
PasswordChar="*" PasswordChar="•"
Watermark="Password" x:Name="PassBox"/> Watermark="Enter password"
x:Name="PassBox" />
<Button <Button
BorderBrush="Black" Background="#4CAF50"
BorderThickness="1" Foreground="White"
Content="Generate Secure Password (WIP)" Grid.Column="1"
Name="newentry_generate_password" /> IsEnabled="False"
Name="newentry_generate_password"
ToolTip.Tip="Generate secure password (WORK IN PROGRESS)">
🔒
</Button>
<Button <Button
BorderBrush="Black" Background="#607D8B"
BorderThickness="1"
Click="NewEntry_ShowPW_Click" Click="NewEntry_ShowPW_Click"
Content="👁" Content="👁"
Foreground="White"
Grid.Column="2"
Name="newentry_show_password" /> Name="newentry_show_password" />
</StackPanel>
<TextBlock
FontSize="20"
HorizontalAlignment="Left"
Text="Note:" />
<TextBox TextWrapping="Wrap" Watermark="Note" x:Name="NoteBox"/>
<StackPanel Orientation="Horizontal">
<Button
BorderBrush="Black"
BorderThickness="1"
Click="NewEntry_Cancel_Click"
Content="X"
Name="newentry_cancel_button" />
<Button
BorderBrush="Black"
BorderThickness="1"
Click="NewEntry_Save_Click"
Content="✓"
Name="newentry_save_button" />
</StackPanel>
</StackPanel>
</Border>
</Grid> </Grid>
<TextBlock Text="Note:" />
<TextBox
AcceptsReturn="True"
Height="80"
Watermark="Your note:"
x:Name="NoteBox" />
<StackPanel
HorizontalAlignment="Center"
Margin="0,20,0,0"
Orientation="Horizontal">
<Button
Background="#4CAF50"
Click="NewEntry_Save_Click"
Content="Save"
Foreground="White"
Name="newentry_save_button" />
<Button
Background="#FF5722"
Click="NewEntry_Cancel_Click"
Content="Cancel"
Foreground="White"
Name="newentry_cancel_button" />
</StackPanel>
</StackPanel>
</Grid>
</Border>
</UserControl> </UserControl>

View File

@ -1,57 +1,85 @@
<UserControl <UserControl
Height="500" Height="600"
Width="350" Width="400"
x:Class="Project.View.NewLogin" x:Class="Project.View.NewLogin"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.Styles>
<Style Selector="TextBlock">
<Setter Property="Margin" Value="0,5" />
<Setter Property="FontSize" Value="14" />
<Setter Property="FontWeight" Value="Medium" />
</Style>
<Style Selector="TextBox">
<Setter Property="Width" Value="250" />
<Setter Property="Margin" Value="0,5,0,15" />
<Setter Property="CornerRadius" Value="4" />
</Style>
<Style Selector="Button">
<Setter Property="Width" Value="120" />
<Setter Property="Height" Value="40" />
<Setter Property="CornerRadius" Value="20" />
<Setter Property="Margin" Value="10,8" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="#4CAF50" />
<Setter Property="Foreground" Value="White" />
</Style>
</UserControl.Styles>
<Grid> <Grid>
<Grid.Background>
<LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
<GradientStop Color="#FFE0B2" Offset="0" />
<GradientStop Color="#FFCC80" Offset="1" />
</LinearGradientBrush>
</Grid.Background>
<Border Background="SandyBrown"> <Border
Background="White"
BoxShadow="0 4 8 0 #40000000"
CornerRadius="8"
Margin="20">
<StackPanel Orientation="Vertical"> <StackPanel Margin="20">
<TextBlock <TextBlock
FontSize="20" FontSize="24"
HorizontalAlignment="Left" FontWeight="Bold"
Text="Username:" /> HorizontalAlignment="Center"
Margin="0,0,0,20"
Text="Neuer Benutzer" />
<TextBlock Text="Benutzername:" />
<TextBox <TextBox
TextWrapping="Wrap" TextWrapping="Wrap"
Watermark="Username" Watermark="Benutzername eingeben"
x:Name="NewLoginUsernameBox" /> x:Name="NewLoginUsernameBox" />
<TextBlock
FontSize="20" <TextBlock Text="Passwort:" />
HorizontalAlignment="Left"
Margin="23"
Text="Password:" />
<TextBox <TextBox
PasswordChar="*" PasswordChar="•"
TextWrapping="Wrap" TextWrapping="Wrap"
Watermark="Password:" Watermark="Passwort eingeben"
x:Name="NewLoginPasswordBox" /> x:Name="NewLoginPasswordBox" />
<TextBlock
FontSize="20" <TextBlock Text="E-Mail:" />
HorizontalAlignment="Left"
Margin="23"
Text="Email:" />
<TextBox <TextBox
TextWrapping="Wrap" TextWrapping="Wrap"
Watermark="Email:" Watermark="E-Mail-Adresse eingeben"
x:Name="NewLoginEmailBox" /> x:Name="NewLoginEmailBox" />
<StackPanel Orientation="Horizontal">
<StackPanel
HorizontalAlignment="Center"
Margin="0,20,0,0"
Orientation="Horizontal">
<Button Click="NewLoginSaveOnClick" Content="Speichern" />
<Button <Button
BorderBrush="Black" Background="#FF5722"
BorderThickness="1"
Click="NewLoginSaveOnClick"
Content="Save" />
<Button
BorderBrush="Black"
BorderThickness="1"
Click="NewLoginCancelOnClick" Click="NewLoginCancelOnClick"
Content="Cancel" /> Content="Abbrechen" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Border> </Border>
</Grid> </Grid>
</UserControl> </UserControl>

View File

@ -1,5 +1,5 @@
<Window <Window
Height="250" SizeToContent="Height"
Title="WARNING" Title="WARNING"
Width="500" Width="500"
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
@ -7,16 +7,53 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel Margin="20" Spacing="10"> <Window.Styles>
<TextBlock HorizontalAlignment="Center" Text="One or more of your inputs are missing or wrong." /> <Style Selector="TextBlock">
<TextBlock HorizontalAlignment="Center" Text="All fields must be filled." /> <Setter Property="HorizontalAlignment" Value="Center" />
<TextBlock HorizontalAlignment="Center" Text="Your username needs at least 4 characters." /> <Setter Property="FontSize" Value="14" />
<TextBlock HorizontalAlignment="Center" Text="Your password needs at least 8 characters." /> <Setter Property="Foreground" Value="Gray" />
<TextBlock HorizontalAlignment="Center" Text="Make sure your email is correct." /> <Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="Margin" Value="0,5" />
</Style>
<Style Selector="Button">
<Setter Property="Width" Value="120" />
<Setter Property="Height" Value="40" />
<Setter Property="CornerRadius" Value="20" />
<Setter Property="Margin" Value="0,15,0,0" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="#4CAF50" />
<Setter Property="Foreground" Value="White" />
</Style>
</Window.Styles>
<Grid Background="#F5F5F5">
<Border
Background="White"
BoxShadow="0 4 8 0 #40000000"
CornerRadius="8"
Margin="15">
<ScrollViewer>
<StackPanel Margin="20" MaxWidth="450">
<TextBlock
FontSize="24"
FontWeight="Bold"
Margin="0,0,0,15"
Text="⚠️ Warning" />
<TextBlock Text="One or more entries are wrong or missing." />
<TextBlock Text="All boxes must be filled in." />
<TextBlock Text="Your username needs to be at least 4 characters." />
<TextBlock Text="Your password needs to be at least 8 characters." />
<TextBlock Text="Make sure your e-mail is correct." />
<Button <Button
Click="OkButton_Click" Click="OkButton_Click"
Content="OK" Content="OK"
HorizontalAlignment="Center" Margin="0,15,0,5" />
Width="80" />
</StackPanel> </StackPanel>
</ScrollViewer>
</Border>
</Grid>
</Window> </Window>

View File

@ -9,7 +9,8 @@ using Project.Persistence;
namespace Project.View; namespace Project.View;
public partial class PopUp : Window public partial class PopUp : Window
{ public PopUp() {
public PopUp()
{ {
InitializeComponent(); InitializeComponent();
} }

View File

@ -36,6 +36,10 @@
<DependentUpon>NewEntry.axaml</DependentUpon> <DependentUpon>NewEntry.axaml</DependentUpon>
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Update="LoginErrorPopup\LoginErrorPopup.axaml.cs">
<DependentUpon>PopUp.axaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>