diff --git a/ImageBoardServerApp/Pages/Accounts/Login.razor b/ImageBoardServerApp/Pages/Accounts/Login.razor index 4f960a8..1b301ed 100644 --- a/ImageBoardServerApp/Pages/Accounts/Login.razor +++ b/ImageBoardServerApp/Pages/Accounts/Login.razor @@ -9,27 +9,16 @@

Login to bulletbroards

- - - - - - - - - - - - - - - - - - - - - + + + +
+ + + +
+
+
@@ -38,25 +27,20 @@ private bool verified; - class Model - { - public string Email { get; set; } - public string Password { get; set; } - } - - Model model = new Model(); + public string Email { get; set; } + public string Password { get; set; } private async Task login() { Console.WriteLine("loggin you in..."); - var user = await UsersRepository.getUserByEmailRawAsync(model.Email); + var user = await UsersRepository.getUserByEmailRawAsync(Email); if (user == null) { await js.InvokeVoidAsync("alert", "User does not exist"); verified = false; return; } - verified = BCrypt.Net.BCrypt.Verify(model.Password, user.Password); + verified = BCrypt.Net.BCrypt.Verify(Password, user.Password); if (verified) { verified = true; diff --git a/ImageBoardServerApp/Pages/Accounts/Register.razor b/ImageBoardServerApp/Pages/Accounts/Register.razor index 6ee203a..f16a907 100644 --- a/ImageBoardServerApp/Pages/Accounts/Register.razor +++ b/ImageBoardServerApp/Pages/Accounts/Register.razor @@ -5,33 +5,38 @@ @inject AuthenticationStateProvider authStateProvider @inject NavigationManager navManager -

Register to bulletbroards

-
+
-
- - -
-
- - -
- [Register] + + + +
+ + + +
+ + +
+
+
-By registering you confirm that you are atleast 18 years of age. - - @code { private string Email { get; set; } private string Password { get; set; } + private bool is18 { get; set; } + + private string msg { get; set; } private bool verified; private async Task login() { + if (!is18) + return; Console.WriteLine("Registering..."); UserData userToCreate = new UserData() { @@ -64,7 +69,4 @@ } await js.InvokeVoidAsync("alert", $"Wrong Password"); } -} -@code { - } \ No newline at end of file diff --git a/ImageBoardServerApp/Pages/Accounts/Register.razor.css b/ImageBoardServerApp/Pages/Accounts/Register.razor.css index e69de29..1b050a0 100644 --- a/ImageBoardServerApp/Pages/Accounts/Register.razor.css +++ b/ImageBoardServerApp/Pages/Accounts/Register.razor.css @@ -0,0 +1,11 @@ +.headLogin{ + text-align: center; + -webkit-text-size-adjust: auto; +} +.login{ + text-align: center; + align-items:center; + font-style: unset;} +.gaping{ + alignment: left; +} \ No newline at end of file diff --git a/ImageBoardServerApp/Pages/_Host.cshtml b/ImageBoardServerApp/Pages/_Host.cshtml index 8811430..6355623 100644 --- a/ImageBoardServerApp/Pages/_Host.cshtml +++ b/ImageBoardServerApp/Pages/_Host.cshtml @@ -15,7 +15,7 @@ - + diff --git a/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor b/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor index eb149db..b126e06 100644 --- a/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor +++ b/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor @@ -31,9 +31,9 @@
@if (hasErr) - { - @postErr - } + { + @postErr + }
diff --git a/ImageBoardServerApp/Shared/Components/Post.razor b/ImageBoardServerApp/Shared/Components/Post.razor index aa07b3e..75d440e 100644 --- a/ImageBoardServerApp/Shared/Components/Post.razor +++ b/ImageBoardServerApp/Shared/Components/Post.razor @@ -53,15 +53,36 @@ }
- @foreach (string s in @post.Content.Split("\n")) + @if (showOpenThread) { - var className = ""; - @if (s.StartsWith(">") && !Regex.IsMatch(s, "^>{2,}")) + @foreach (string s in post.Content.Split("\n").ToList().Take(6)) { - className = "greenText"; + var className = ""; + @if (s.StartsWith(">") && !Regex.IsMatch(s, "^>{2,}")) + { + className = "greenText"; + } + + @s  } - - @s  + @if (post.Content.Split("\n").Length > 6) + { +
+ [Open Thread to read more...] + } + } + else + { + @foreach (string s in post.Content.Split("\n")) + { + var className = ""; + @if (s.StartsWith(">") && !Regex.IsMatch(s, "^>{2,}")) + { + className = "greenText"; + } + + @s  + } }
@@ -117,12 +138,13 @@ } - - @code { public bool canDel { get; set; } public bool isActive { get; set; } = false; + + private int linecnt = 0; + private async void lockMe() { diff --git a/ImageBoardServerApp/Shared/MainLayout.razor b/ImageBoardServerApp/Shared/MainLayout.razor index 25cde22..3457b28 100644 --- a/ImageBoardServerApp/Shared/MainLayout.razor +++ b/ImageBoardServerApp/Shared/MainLayout.razor @@ -1,5 +1,5 @@ -@inherits LayoutComponentBase -@using ImageBoardServerApp.Auth +@using ImageBoardServerApp.Auth +@inherits LayoutComponentBase @inject AuthenticationStateProvider authStateProvider @inject NavigationManager navManager @@ -11,12 +11,6 @@
- -
- [FAQ] - [Rules] -
-
@Body
@@ -37,11 +31,4 @@ mail = user.User.Identity.Name; } } - - private async Task logout() - { - var customAuthStateProvider = (CustomAuthenticationStateProvider) authStateProvider; - await customAuthStateProvider.UpdateAuthenticationStateAsync(null); - navManager.NavigateTo("/", true); - } } diff --git a/ImageBoardServerApp/Shared/MainLayout.razor.css b/ImageBoardServerApp/Shared/MainLayout.razor.css index 3d21ab5..56760ef 100644 --- a/ImageBoardServerApp/Shared/MainLayout.razor.css +++ b/ImageBoardServerApp/Shared/MainLayout.razor.css @@ -13,11 +13,10 @@ main { } .sidebar { - background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); + background-image: linear-gradient(180deg, #0f081b, #0f081b 70%); } .top-row { - border-bottom: 1px solid #f8f8f2; justify-content: flex-end; height: 3.5rem; diff --git a/ImageBoardServerApp/Shared/NavMenu.razor b/ImageBoardServerApp/Shared/NavMenu.razor index ff5e9ab..033bbfe 100644 --- a/ImageBoardServerApp/Shared/NavMenu.razor +++ b/ImageBoardServerApp/Shared/NavMenu.razor @@ -5,7 +5,8 @@