mirror of
				https://github.com/yummy4friends/y4f.git
				synced 2025-10-30 00:27:56 +01:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			5c8b194fca
			...
			workflow/T
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 59ff664ffe | ||
|  | fced97beb0 | 
							
								
								
									
										23
									
								
								.github/workflows/dotnet.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/dotnet.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| name: Test if program still runs | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: [ "dev" ] | ||||
|   pull_request: | ||||
|     branches: [ "dev" ] | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|  | ||||
|     runs-on: ubuntu-latest | ||||
|  | ||||
|     steps: | ||||
|     - uses: actions/checkout@v3 | ||||
|     - name: Setup .NET | ||||
|       uses: actions/setup-dotnet@v3 | ||||
|       with: | ||||
|         dotnet-version: 7.0.107 | ||||
|     - name: Restore dependencies | ||||
|       run: dotnet restore | ||||
|     - name: Build | ||||
|       run: dotnet build --no-restore | ||||
| @@ -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>("#app"); | ||||
| builder.RootComponents.Add<HeadOutlet>("head::after"); | ||||
|  | ||||
|  | ||||
| builder.Services.AddBlazoredLocalStorage(); | ||||
|  | ||||
| builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
|  | ||||
|  | ||||
| <div class="container mt-auto"> | ||||
|     <h4>AccountID: #1234</h4> | ||||
|     <h4>AccountID: @RegistrierungA.userName</h4> | ||||
|     <h4>Ihr QR-Code:  </h4> | ||||
|     <img src="assets/K-QR.png" class="img" title="logo image"> | ||||
|  | ||||
|   | ||||
| @@ -1,22 +1,36 @@ | ||||
| @page "/RegistrierungA" | ||||
| @page "/RegistrierungA" | ||||
| @layout Registrierung | ||||
| @inject NavigationManager NavManager | ||||
| @inject Blazored.LocalStorage.ISyncLocalStorageService localStorage | ||||
|  | ||||
| <div class="container col-lg-5 col-md-9 col-sm-12 d-flex flex-column " id="content"> | ||||
|     <p>Benutzername:</p> | ||||
|     <center> | ||||
|         <input type="text" class="form-control" id="name" name="name"> | ||||
|     </center> | ||||
|     <p>Passwort:</p> | ||||
|     <center> | ||||
|         <input type="text" class="form-control" id="password" name="password"> | ||||
|     </center> | ||||
|     <center> | ||||
|          | ||||
|         <form id="button" action="Bestelluebersicht"> | ||||
|             <input type="submit" value="Login" class="btn">  | ||||
|         </form> | ||||
|     </center> | ||||
| </div> | ||||
| @code { | ||||
|  | ||||
|     <input type="text" class="form-control" id="name" name="name" @bind="@inputName"> | ||||
|  | ||||
|     <p>Passwort:</p> | ||||
|     <input type="password" class="form-control" id="password" name="password" @bind="@inputPassword"> | ||||
|      | ||||
|     <button type="button" class="btn" @onclick="@Login">Login</button> | ||||
|  | ||||
| </div> | ||||
|  | ||||
| @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<string>("name"); | ||||
|             NavManager.NavigateTo("/Bestelluebersicht"); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| @code { | ||||
|     public string userDataName { get; set; } = ""; | ||||
|     public string userDataPassword { get; set; } = ""; | ||||
| } | ||||
| @@ -15,5 +15,8 @@ input { | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| button { | ||||
|     text-align: center; | ||||
|     background-color: #89F9A5; | ||||
|     border-radius: 50px; | ||||
| } | ||||
|   | ||||
| @@ -12,6 +12,7 @@ | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="Blazored.LocalStorage" Version="4.3.0" /> | ||||
|     <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.1" /> | ||||
|     <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.1" PrivateAssets="all" /> | ||||
|   </ItemGroup> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user