From a9043133241c6345ac40bb22529c32fff01c7c8c Mon Sep 17 00:00:00 2001 From: limited_dev Date: Wed, 14 Jun 2023 16:29:07 +0200 Subject: [PATCH 1/2] chore: edited README Signed-off-by: limited_dev --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 32e3982..d5e23c0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,2 @@ -# TODO: - - Tags - - Search - - Notify on Topic / Tag - - Send thread to user before deletion - - -# FIXES IN NEED: - - Finish the GET mentioning \ No newline at end of file +# BulletBoards +A simple imageboard made in Razor \ No newline at end of file From 5a31eb891eca16a3be1604063f39ff1dd0cfd433 Mon Sep 17 00:00:00 2001 From: limited_dev Date: Wed, 14 Jun 2023 17:24:51 +0200 Subject: [PATCH 2/2] fix: fixed index gramar, started working on fixing the register and login system Signed-off-by: limited_dev --- ImageBoardServerApp/Pages/Accounts/Login.razor | 6 +++++- ImageBoardServerApp/Pages/Accounts/Register.razor | 8 ++++---- ImageBoardServerApp/Pages/Basic/Index.razor | 2 +- ImageBoardServerApp/Shared/Components/UserEntry.razor | 2 +- ImageBoardServerApp/Util/TheManager.cs | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ImageBoardServerApp/Pages/Accounts/Login.razor b/ImageBoardServerApp/Pages/Accounts/Login.razor index 1088fe2..0f920eb 100644 --- a/ImageBoardServerApp/Pages/Accounts/Login.razor +++ b/ImageBoardServerApp/Pages/Accounts/Login.razor @@ -32,7 +32,11 @@ private async Task login() { - var user = await UsersRepository.getUserByEmailRawAsync(Email); + var user = await UsersRepository.getUserByEmailRawAsync(Email.ToLower()); + if (user == null) + { + user = await UsersRepository.getUserByEmailRawAsync(Email); + } if (user == null) { await js.InvokeVoidAsync("alert", "User does not exist"); diff --git a/ImageBoardServerApp/Pages/Accounts/Register.razor b/ImageBoardServerApp/Pages/Accounts/Register.razor index fcddce3..3015e22 100644 --- a/ImageBoardServerApp/Pages/Accounts/Register.razor +++ b/ImageBoardServerApp/Pages/Accounts/Register.razor @@ -72,8 +72,8 @@ msg = "Saving..."; UserData userToCreate = new UserData() { - Email = Email, - ProposedEmail = Email, + Email = Email.ToLower(), + ProposedEmail = Email.ToLower(), Password = BCrypt.Net.BCrypt.HashPassword(Password), Role = "User", TimeBanned = -1, @@ -94,10 +94,10 @@ msg = "Sending...."; - Postman.sendMail(Email, + Postman.sendMail(Email.ToLower(), "Confirm email", "Confirm you email:\n" + - $"https://bulletboards.xyz/sys/click/confirmmail/{uid}/{Email}/{Email}/{hash}"); + $"https://bulletboards.xyz/sys/click/confirmmail/{uid}/{Email.ToLower()}/{Email.ToLower()}/{hash}"); msg = "Done. Check email."; diff --git a/ImageBoardServerApp/Pages/Basic/Index.razor b/ImageBoardServerApp/Pages/Basic/Index.razor index 74fa521..6eaac3e 100644 --- a/ImageBoardServerApp/Pages/Basic/Index.razor +++ b/ImageBoardServerApp/Pages/Basic/Index.razor @@ -13,7 +13,7 @@
Click here to learn more about free software.
- Check out the project on Gitlab. + Check out the project on GitLab.

We're currently @amountOfUsers users, viewing @amountOfPosts post with @amountOfComments comment. diff --git a/ImageBoardServerApp/Shared/Components/UserEntry.razor b/ImageBoardServerApp/Shared/Components/UserEntry.razor index a02e9be..3f02a6c 100644 --- a/ImageBoardServerApp/Shared/Components/UserEntry.razor +++ b/ImageBoardServerApp/Shared/Components/UserEntry.razor @@ -1,5 +1,6 @@ @using System.ComponentModel.DataAnnotations @using ImageBoardServerApp.Data.Repository +@inject NavigationManager navManager @user.Email | @user.Posts.Count Posts | @user.Comments.Count Comments | @@ -14,7 +15,6 @@ Update Role Unban (if banned) -
@user.Role
diff --git a/ImageBoardServerApp/Util/TheManager.cs b/ImageBoardServerApp/Util/TheManager.cs index ae06cb4..add2eba 100644 --- a/ImageBoardServerApp/Util/TheManager.cs +++ b/ImageBoardServerApp/Util/TheManager.cs @@ -6,7 +6,7 @@ namespace ImageBoardServerApp.Util; public class TheManager { - public static string version = "v1.0.0-rc2"; + public static string version = "v1.0.0-rc3"; private static long getDiff(PostData post) {