diff --git a/ImageBoardServerApp/Data/UserData.cs b/ImageBoardServerApp/Data/UserData.cs
index b397f65..438c4d2 100644
--- a/ImageBoardServerApp/Data/UserData.cs
+++ b/ImageBoardServerApp/Data/UserData.cs
@@ -28,9 +28,6 @@ public class UserData
[Required]
public string Password { get; set; }
- [Required]
- public int PermissionInteger { get; set; }
-
[Required]
public string Role { get; set; }
diff --git a/ImageBoardServerApp/Pages/Accounts/Register.razor b/ImageBoardServerApp/Pages/Accounts/Register.razor
index adbdfc1..a6868ef 100644
--- a/ImageBoardServerApp/Pages/Accounts/Register.razor
+++ b/ImageBoardServerApp/Pages/Accounts/Register.razor
@@ -34,7 +34,6 @@
Email = Email,
Password = BCrypt.Net.BCrypt.HashPassword(Password),
Role = "User",
- PermissionInteger = 1,
TimeBanned = -1
};
if (await UsersRepository.getUserByEmailAsync(Email) != null)
diff --git a/ImageBoardServerApp/Pages/Boards/Au.razor b/ImageBoardServerApp/Pages/Boards/Au.razor
index e73c04b..8179161 100644
--- a/ImageBoardServerApp/Pages/Boards/Au.razor
+++ b/ImageBoardServerApp/Pages/Boards/Au.razor
@@ -1,4 +1,4 @@
-@page "/e/"
+@page "/au/"
@@ -8,7 +8,7 @@
{
BoardID = 0,
maxThreads = 10,
- Tag = "e",
- Topic = "Everything"
+ Tag = "au",
+ Topic = "Autism"
};
}
\ No newline at end of file
diff --git a/ImageBoardServerApp/Pages/Boards/E.razor b/ImageBoardServerApp/Pages/Boards/E.razor
index 8179161..e73c04b 100644
--- a/ImageBoardServerApp/Pages/Boards/E.razor
+++ b/ImageBoardServerApp/Pages/Boards/E.razor
@@ -1,4 +1,4 @@
-@page "/au/"
+@page "/e/"
@@ -8,7 +8,7 @@
{
BoardID = 0,
maxThreads = 10,
- Tag = "au",
- Topic = "Autism"
+ Tag = "e",
+ Topic = "Everything"
};
}
\ No newline at end of file
diff --git a/ImageBoardServerApp/Shared/Components/Forms/CommentForm.razor b/ImageBoardServerApp/Shared/Components/Forms/CommentForm.razor
index 5a9c509..0cf2810 100644
--- a/ImageBoardServerApp/Shared/Components/Forms/CommentForm.razor
+++ b/ImageBoardServerApp/Shared/Components/Forms/CommentForm.razor
@@ -107,7 +107,11 @@
}
bool hasImage = selectedFile != null;
-
+ if (postUsername == null || postUsername == "")
+ {
+ postUsername = "Anonymous";
+ }
+
CommentData commentToCreate;
if (hasImage)
{
diff --git a/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor b/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor
index 73c52b2..99c9c41 100644
--- a/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor
+++ b/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor
@@ -137,6 +137,10 @@
ImageLocation = $"/img/dynamic/op/{@board.Tag}/{@file}"
};
int imageID = await ImagesRepository.createImageAsync(imageToUpload);
+ if (postUsername == null || postUsername == "")
+ {
+ postUsername = "Anonymous";
+ }
var postToPost = new PostData
{
UserID = userID,
diff --git a/ImageBoardServerApp/Shared/Components/Post.razor b/ImageBoardServerApp/Shared/Components/Post.razor
index 2956967..5aa82ea 100644
--- a/ImageBoardServerApp/Shared/Components/Post.razor
+++ b/ImageBoardServerApp/Shared/Components/Post.razor
@@ -71,12 +71,26 @@
- [
- Sticky
- ]
- [
- Lock
- ]
+ [
+ @if (post.IsSticky)
+ {
+ Unsticky
+ }
+ else
+ {
+ Sticky
+ }
+ ]
+ [
+ @if (post.IsLocked)
+ {
+ Unlock
+ }
+ else
+ {
+ Lock
+ }
+ ]
@@ -85,7 +99,7 @@
]
[
Report
- ]
+ ]
@if (showOpenThread)
{
[
@@ -105,13 +119,13 @@
@code {
- private async Task lockMe()
+ private async void lockMe()
{
post.IsLocked = !post.IsLocked;
await PostsRepository.updatePostAsync(post);
}
- private async Task stickyMe()
+ private async void stickyMe()
{
post.IsSticky = !post.IsSticky;
await PostsRepository.updatePostAsync(post);
diff --git a/ImageBoardServerApp/Shared/Components/ReportEntry.razor b/ImageBoardServerApp/Shared/Components/ReportEntry.razor
index 3069d7b..5a6e7c5 100644
--- a/ImageBoardServerApp/Shared/Components/ReportEntry.razor
+++ b/ImageBoardServerApp/Shared/Components/ReportEntry.razor
@@ -18,26 +18,26 @@
Explaination: @report.ReportExlaination
Ban User:
- banTarget(1)" href="javascript:void(0)">1 Tag
+ banTarget(1)" href="javascript:void(0)">1d
- banTarget(7)" href="javascript:void(0)">7 Tage
+ banTarget(7)" href="javascript:void(0)">1w
- banTarget(31)" href="javascript:void(0)">31 Tage
+ banTarget(31)" href="javascript:void(0)">1m
- banTarget(365)" href="javascript:void(0)">365 Tage
+ banTarget(365)" href="javascript:void(0)">1yr
- banTarget(99999999)" href="javascript:void(0)">99M Tage
+ banTarget(99999999)" href="javascript:void(0)">273,972.6 yrs
Ban Reporter:
- banReporter(1)" href="javascript:void(0)">1 Tag
+ banReporter(1)" href="javascript:void(0)">1d
- banReporter(7)" href="javascript:void(0)">7 Tage
+ banReporter(7)" href="javascript:void(0)">1w
- banReporter(31)" href="javascript:void(0)">31 Tage
+ banReporter(31)" href="javascript:void(0)">1m
- banReporter(365)" href="javascript:void(0)">365 Tage
+ banReporter(365)" href="javascript:void(0)">1yr
- banReporter(99999999)" href="javascript:void(0)">99M Tage
+ banReporter(99999999)" href="javascript:void(0)">273,972.6 yrs
Done
diff --git a/ImageBoardServerApp/Util/Boards.cs b/ImageBoardServerApp/Util/Boards.cs
new file mode 100644
index 0000000..60d1fb6
--- /dev/null
+++ b/ImageBoardServerApp/Util/Boards.cs
@@ -0,0 +1,9 @@
+namespace ImageBoardServerApp.Data;
+
+public class Boards
+{
+ private List posts = new List()
+ {
+
+ };
+}
\ No newline at end of file
diff --git a/ImageBoardServerApp/Data/TheManager.cs b/ImageBoardServerApp/Util/TheManager.cs
similarity index 94%
rename from ImageBoardServerApp/Data/TheManager.cs
rename to ImageBoardServerApp/Util/TheManager.cs
index 68ef45f..257125d 100644
--- a/ImageBoardServerApp/Data/TheManager.cs
+++ b/ImageBoardServerApp/Util/TheManager.cs
@@ -22,7 +22,7 @@ public class TheManager
public static long getBumpValue(PostData post)
{
- return 10 * 60000 - getDiff(post) + ( 60000 * (post.Comments.Count + 1));
+ return (post.IsSticky ? 999999999999999999 : 10 * 60000 - getDiff(post) + ( 60000 * (post.Comments.Count + 1))) ;
}
public static async Task> getPostList(string boardTag)
diff --git a/ImageBoardServerApp/_Imports.razor b/ImageBoardServerApp/_Imports.razor
index 4340349..9ae8f44 100644
--- a/ImageBoardServerApp/_Imports.razor
+++ b/ImageBoardServerApp/_Imports.razor
@@ -17,4 +17,4 @@
@using ImageBoardServerApp.Shared
@using ImageBoardServerApp.Shared.Components
@using ImageBoardServerApp.Shared.Components.Forms
-@using ImageBoardServerApp.Data
+@using ImageBoardServerApp.Data
\ No newline at end of file