Üzenetküldés frontenden

This commit is contained in:
2025-04-07 17:05:40 +02:00
parent a3be387ee1
commit b02fb58f2e
14 changed files with 338 additions and 70 deletions
@@ -1,20 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
<local:BasePage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="WorkFlowCheck.MAUI.Pages.Security.LoginPage"
xmlns:local="clr-namespace:WorkFlowCheck.MAUI.Pages"
Title="Bejelentkezés"
BackgroundColor="#f0f0f0">
<ScrollView>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ContentView x:Name="LoginContent">
<ScrollView>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Középen lévő kártya, ami mobilon is jól mutat, tableten pedig középen marad -->
<Frame Grid.Row="1"
<!-- Középen lévő kártya, ami mobilon is jól mutat, tableten pedig középen marad -->
<Frame Grid.Row="1"
BackgroundColor="White"
BorderColor="#cccccc"
CornerRadius="20"
@@ -25,22 +27,22 @@
WidthRequest="{OnPlatform Android=350, iOS=350, WinUI=400, MacCatalyst=400}"
MaximumWidthRequest="500">
<VerticalStackLayout Spacing="20">
<VerticalStackLayout Spacing="20">
<Label Text="Bejelentkezés"
<Label Text="Bejelentkezés"
FontSize="24"
FontAttributes="Bold"
HorizontalOptions="Center"
TextColor="#333" />
<Entry x:Name="UsernameEntry"
<Entry x:Name="UsernameEntry"
Placeholder="Felhasználói név"
FontSize="18"
BackgroundColor="#f9f9f9"
HeightRequest="50"
Margin="0" />
<Entry x:Name="PasswordEntry"
<Entry x:Name="PasswordEntry"
Placeholder="PIN kód"
IsPassword="True"
Keyboard="Numeric"
@@ -48,21 +50,21 @@
BackgroundColor="#f9f9f9"
HeightRequest="50"
Margin="0" />
<HorizontalStackLayout Spacing="20" HorizontalOptions="Center">
<RadioButton x:Name="ProdOption" Content="PROD" GroupName="Environment" />
<RadioButton x:Name="UatOption" Content="UAT" GroupName="Environment" />
</HorizontalStackLayout>
<Button x:Name="LoginBtn"
<HorizontalStackLayout Spacing="20" HorizontalOptions="Center">
<RadioButton x:Name="ProdOption" Content="PROD" GroupName="Environment" />
<RadioButton x:Name="UatOption" Content="UAT" GroupName="Environment" />
</HorizontalStackLayout>
<Button x:Name="LoginBtn"
Text="Bejelentkezés"
FontSize="18"
HeightRequest="50"
CornerRadius="10"
TextColor="White"
Clicked="OnLoginClicked" />
<Button x:Name="LoginNFCBtn"
<Button x:Name="LoginNFCBtn"
Text="NFC azonosítás"
FontSize="18"
HeightRequest="50"
@@ -70,12 +72,13 @@
TextColor="White"
Clicked="OnLoginNFCClicked" />
<ActivityIndicator x:Name="LoadingIndicator"
<ActivityIndicator x:Name="LoadingIndicator"
IsRunning="False"
IsVisible="False"
HorizontalOptions="Center" />
</VerticalStackLayout>
</Frame>
</Grid>
</ScrollView>
</ContentPage>
</VerticalStackLayout>
</Frame>
</Grid>
</ScrollView>
</ContentView>
</local:BasePage>
@@ -6,13 +6,14 @@ using WorkFlowCheck.MAUI.Services.Interfaces;
namespace WorkFlowCheck.MAUI.Pages.Security;
public partial class LoginPage : ContentPage
public partial class LoginPage : BasePage
{
private IUserService _userService;
private ISyncService _syncService;
public LoginPage()
{
InitializeComponent();
SetContent(LoginContent);
_userService = MauiProgram.ServiceProvider.GetRequiredService<IUserService>();
_syncService = MauiProgram.ServiceProvider.GetRequiredService<ISyncService>();
}