diff --git a/src/y4f/Program.cs b/src/y4f/Program.cs index d1c70e0..17d1fcf 100644 --- a/src/y4f/Program.cs +++ b/src/y4f/Program.cs @@ -1,3 +1,4 @@ +using Blazored.LocalStorage; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using y4f; @@ -6,7 +7,7 @@ var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); - +builder.Services.AddBlazoredLocalStorage(); builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); diff --git a/src/y4f/Shared/Kontoverwaltung.razor b/src/y4f/Shared/Kontoverwaltung.razor index 19bd801..c74a919 100644 --- a/src/y4f/Shared/Kontoverwaltung.razor +++ b/src/y4f/Shared/Kontoverwaltung.razor @@ -5,7 +5,7 @@
-

AccountID: #1234

+

AccountID: @RegistrierungA.userName

Ihr QR-Code:

diff --git a/src/y4f/Shared/RegistrierungA.razor b/src/y4f/Shared/RegistrierungA.razor index adf18b7..403bb75 100644 --- a/src/y4f/Shared/RegistrierungA.razor +++ b/src/y4f/Shared/RegistrierungA.razor @@ -1,18 +1,34 @@ @page "/RegistrierungA" @layout Registrierung +@inject NavigationManager NavManager +@inject Blazored.LocalStorage.ISyncLocalStorageService localStorage

Benutzername:

- +

Passwort:

- - -
- -
- + + +
-@code { +@code { + public string inputName { get; set; } = string.Empty; + public string inputPassword { get; set; } = string.Empty; + + public static string userName { get; set; } = string.Empty; + + public void Login() { + if (inputName == userDataName && inputPassword == userDataPassword) { + localStorage.SetItem("name", inputName); + userName = localStorage.GetItem("name"); + NavManager.NavigateTo("/Bestelluebersicht"); + } + } } + +@code { + public string userDataName { get; set; } = ""; + public string userDataPassword { get; set; } = ""; +} \ No newline at end of file diff --git a/src/y4f/Shared/RegistrierungA.razor.css b/src/y4f/Shared/RegistrierungA.razor.css index 9c3f3ae..6d3d119 100644 --- a/src/y4f/Shared/RegistrierungA.razor.css +++ b/src/y4f/Shared/RegistrierungA.razor.css @@ -9,5 +9,8 @@ form { } - - +button { + text-align: center; + background-color: #89F9A5; + border-radius: 50px; +} diff --git a/src/y4f/y4f.csproj b/src/y4f/y4f.csproj index 9bb7029..567afc2 100644 --- a/src/y4f/y4f.csproj +++ b/src/y4f/y4f.csproj @@ -12,6 +12,7 @@ +