From 88695149d20a2becbbb0b4f89d5469eadd7f52ca Mon Sep 17 00:00:00 2001 From: dingo Date: Sat, 25 Apr 2026 16:58:07 -0400 Subject: [PATCH] feat(website): Keycloak SSO auth, leaderboard tabs, HowToPlay CMS, webclient redirect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SOR.Website now uses Keycloak OIDC (same realm as webclient) for SSO; clicking Play no longer re-prompts for login - /webclient redirects directly to webclient.aeternalisgames.com (no auth gate) - Leaderboard: 4 ranked tabs — Rank Score, Games Played, Games Won, Win Rate (Win Rate requires min 10 games; active column highlighted) - HowToPlay page reads body HTML from catalog.website_contents (key=howtoplay); falls back to built-in static content when no DB entry exists - Admin: HowToPlayEditor at /website/how-to-play with live HTML preview + clear - Admin NavMenu: How To Play link added under Website section - WebsiteContent entity + EF migration (catalog schema) - appsettings.json: added Keycloak config skeleton (values from k8s secrets) - Index page: branding corrected to "Origin: Stone of Revival" / Aeternalis Games; hero image sourced from CDN Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- .../SOR.Admin/Components/Layout/NavMenu.razor | 5 + .../Pages/Website/HowToPlayEditor.razor | 145 ++++ .../SOR.Database/Contexts/CatalogDbContext.cs | 1 + .../Entities/Catalog/WebsiteContent.cs | 23 + ...260425201722_AddWebsiteContent.Designer.cs | 681 ++++++++++++++++++ .../20260425201722_AddWebsiteContent.cs | 39 + .../Catalog/CatalogDbContextModelSnapshot.cs | 26 + .../SOR.Website/Pages/Auth/Logout.cshtml.cs | 31 +- Server/src/SOR.Website/Pages/HowToPlay.cshtml | 8 + .../src/SOR.Website/Pages/HowToPlay.cshtml.cs | 20 +- Server/src/SOR.Website/Pages/Index.cshtml | 6 +- .../src/SOR.Website/Pages/Leaderboard.cshtml | 49 +- .../SOR.Website/Pages/Leaderboard.cshtml.cs | 78 +- .../SOR.Website/Pages/Shared/_Layout.cshtml | 12 +- .../src/SOR.Website/Pages/Webclient.cshtml.cs | 22 +- Server/src/SOR.Website/Program.cs | 345 ++++----- Server/src/SOR.Website/SOR.Website.csproj | 7 +- Server/src/SOR.Website/appsettings.json | 5 + 18 files changed, 1228 insertions(+), 275 deletions(-) create mode 100644 Server/src/SOR.Admin/Components/Pages/Website/HowToPlayEditor.razor create mode 100644 Server/src/SOR.Database/Entities/Catalog/WebsiteContent.cs create mode 100644 Server/src/SOR.Database/Migrations/Catalog/20260425201722_AddWebsiteContent.Designer.cs create mode 100644 Server/src/SOR.Database/Migrations/Catalog/20260425201722_AddWebsiteContent.cs diff --git a/Server/src/SOR.Admin/Components/Layout/NavMenu.razor b/Server/src/SOR.Admin/Components/Layout/NavMenu.razor index 159adbb..112ee46 100644 --- a/Server/src/SOR.Admin/Components/Layout/NavMenu.razor +++ b/Server/src/SOR.Admin/Components/Layout/NavMenu.razor @@ -205,6 +205,11 @@ News Posts +