mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-05 03:18:45 +00:00
Website UI redesign and QOL changes (#601)
* Initial support for leaderboards and some refactoring * Start of UI redesign * Finish slot and user redesign, added deletion of comments, reviews, scores, and photos * Remove leftover debug print * Fix bug in permission check * Simplify sidebar code and add hearted and queued levels * Fix navbar scrolling on mobile and refactor SlotCardPartial
This commit is contained in:
parent
37b0925cba
commit
f4cad21061
40 changed files with 779 additions and 255 deletions
|
@ -0,0 +1,30 @@
|
|||
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
|
||||
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages.Login;
|
||||
|
||||
public class PirateSignupPage : BaseLayout
|
||||
{
|
||||
public PirateSignupPage(Database database) : base(database)
|
||||
{}
|
||||
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
User? user = this.Database.UserFromWebRequest(this.Request);
|
||||
if (user == null) return this.Redirect("/login");
|
||||
|
||||
return this.Page();
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPost()
|
||||
{
|
||||
User? user = this.Database.UserFromWebRequest(this.Request);
|
||||
if (user == null) return this.Redirect("/login");
|
||||
|
||||
user.Language = user.Language == "en-PT" ? "en" : "en-PT";
|
||||
await this.Database.SaveChangesAsync();
|
||||
|
||||
return this.Redirect("/");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue