From 70587b2af6d98d39c56291d414b66af08d10581b Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 27 Oct 2025 02:01:55 +0100 Subject: [PATCH] Adds a solid start Foundation with a GlobalList.razor and OnStartUp.cs --- .../Account/Pages/Manage/Index.razor | 14 +- .../Account/Shared/ManageNavMenu.razor | 6 +- CouchLog/Components/App.razor | 4 +- CouchLog/Components/Layout/NavMenu.razor | 34 ++-- CouchLog/Components/Pages/AdminSettings.razor | 7 + CouchLog/Components/Pages/Auth.razor | 13 -- CouchLog/Components/Pages/Counter.razor | 23 --- CouchLog/Components/Pages/GlobalList.razor | 147 ++++++++++++++++++ .../Components/Pages/GlobalList.razor.css | 77 +++++++++ CouchLog/Components/Pages/PrivateList.razor | 99 ++++++++++++ CouchLog/Components/Pages/Weather.razor | 68 -------- CouchLog/CouchLog.csproj | 23 ++- CouchLog/Data/CouchLog.db | Bin 278528 -> 278528 bytes .../DatabaseModels/Global/GlobalEntity.cs | 4 +- CouchLog/OnStartUp.cs | 102 ++++++++++++ CouchLog/Program.cs | 55 ++++--- CouchLog/Properties/serviceDependencies.json | 7 +- .../Properties/serviceDependencies.local.json | 7 +- .../serviceDependencies.local.json.user | 7 +- CouchLog/libman.json | 5 + CouchLog/wwwroot/Pictures/Inception.jpg | Bin 0 -> 419890 bytes .../wwwroot/StreamingPlatforms/AppleTV.png | Bin 0 -> 3797 bytes .../wwwroot/StreamingPlatforms/Disney+.png | Bin 0 -> 73563 bytes CouchLog/wwwroot/StreamingPlatforms/Joyn.png | Bin 0 -> 22283 bytes .../wwwroot/StreamingPlatforms/Netflix.png | Bin 0 -> 9717 bytes .../wwwroot/StreamingPlatforms/Paramount+.png | Bin 0 -> 92862 bytes .../StreamingPlatforms/Prime-Video.png | Bin 0 -> 34502 bytes CouchLog/wwwroot/StreamingPlatforms/WOWTV.png | Bin 0 -> 22471 bytes CouchLog/wwwroot/app.css | 2 + .../wwwroot/lib/bootstrap/dist/js/site.js | 8 + Docs/.$ER-Diagramm.drawio.bkp | 135 +++++++--------- Docs/ER-Diagramm.drawio | 66 ++++---- 32 files changed, 627 insertions(+), 286 deletions(-) create mode 100644 CouchLog/Components/Pages/AdminSettings.razor delete mode 100644 CouchLog/Components/Pages/Auth.razor delete mode 100644 CouchLog/Components/Pages/Counter.razor create mode 100644 CouchLog/Components/Pages/GlobalList.razor create mode 100644 CouchLog/Components/Pages/GlobalList.razor.css create mode 100644 CouchLog/Components/Pages/PrivateList.razor delete mode 100644 CouchLog/Components/Pages/Weather.razor create mode 100644 CouchLog/OnStartUp.cs create mode 100644 CouchLog/libman.json create mode 100644 CouchLog/wwwroot/Pictures/Inception.jpg create mode 100644 CouchLog/wwwroot/StreamingPlatforms/AppleTV.png create mode 100644 CouchLog/wwwroot/StreamingPlatforms/Disney+.png create mode 100644 CouchLog/wwwroot/StreamingPlatforms/Joyn.png create mode 100644 CouchLog/wwwroot/StreamingPlatforms/Netflix.png create mode 100644 CouchLog/wwwroot/StreamingPlatforms/Paramount+.png create mode 100644 CouchLog/wwwroot/StreamingPlatforms/Prime-Video.png create mode 100644 CouchLog/wwwroot/StreamingPlatforms/WOWTV.png create mode 100644 CouchLog/wwwroot/lib/bootstrap/dist/js/site.js diff --git a/CouchLog/Components/Account/Pages/Manage/Index.razor b/CouchLog/Components/Account/Pages/Manage/Index.razor index 885aa2e..54edfd9 100644 --- a/CouchLog/Components/Account/Pages/Manage/Index.razor +++ b/CouchLog/Components/Account/Pages/Manage/Index.razor @@ -23,12 +23,12 @@ -
+
@@ -36,7 +36,7 @@ @code { private ApplicationUser user = default!; private string? username; - private string? phoneNumber; + //private string? phoneNumber; [CascadingParameter] private HttpContext HttpContext { get; set; } = default!; @@ -48,21 +48,21 @@ { user = await UserAccessor.GetRequiredUserAsync(HttpContext); username = await UserManager.GetUserNameAsync(user); - phoneNumber = await UserManager.GetPhoneNumberAsync(user); + //phoneNumber = await UserManager.GetPhoneNumberAsync(user); - Input.PhoneNumber ??= phoneNumber; + //Input.PhoneNumber ??= phoneNumber; } private async Task OnValidSubmitAsync() { - if (Input.PhoneNumber != phoneNumber) + /*if (Input.PhoneNumber != phoneNumber) { var setPhoneResult = await UserManager.SetPhoneNumberAsync(user, Input.PhoneNumber); if (!setPhoneResult.Succeeded) { RedirectManager.RedirectToCurrentPageWithStatus("Error: Failed to set phone number.", HttpContext); } - } + }*/ await SignInManager.RefreshSignInAsync(user); RedirectManager.RedirectToCurrentPageWithStatus("Your profile has been updated", HttpContext); diff --git a/CouchLog/Components/Account/Shared/ManageNavMenu.razor b/CouchLog/Components/Account/Shared/ManageNavMenu.razor index c747ee8..e6c1413 100644 --- a/CouchLog/Components/Account/Shared/ManageNavMenu.razor +++ b/CouchLog/Components/Account/Shared/ManageNavMenu.razor @@ -7,9 +7,11 @@ + @@ -19,9 +21,11 @@ External logins } + diff --git a/CouchLog/Components/App.razor b/CouchLog/Components/App.razor index e7e4773..69f473b 100644 --- a/CouchLog/Components/App.razor +++ b/CouchLog/Components/App.razor @@ -9,13 +9,15 @@ - + + + diff --git a/CouchLog/Components/Layout/NavMenu.razor b/CouchLog/Components/Layout/NavMenu.razor index 37e7f6b..8b0d37e 100644 --- a/CouchLog/Components/Layout/NavMenu.razor +++ b/CouchLog/Components/Layout/NavMenu.razor @@ -1,6 +1,10 @@ -@implements IDisposable +@using CouchLog.Data +@using Microsoft.AspNetCore.Identity +@implements IDisposable @inject NavigationManager NavigationManager +@inject AuthenticationStateProvider AuthenticationStateProvider +@inject UserManager UserManager