diff --git a/ImageBoardServerApp/Data/CommentData.cs b/ImageBoardServerApp/Data/CommentData.cs
index bcaf8a1..14a5c5d 100644
--- a/ImageBoardServerApp/Data/CommentData.cs
+++ b/ImageBoardServerApp/Data/CommentData.cs
@@ -1,7 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Diagnostics.CodeAnalysis;
-using ImageBoardServerApp.Shared.Components;
namespace ImageBoardServerApp.Data;
diff --git a/ImageBoardServerApp/Pages/Moderation/ModMenu.razor b/ImageBoardServerApp/Pages/Moderation/ModMenu.razor
index bdea895..ed7579a 100644
--- a/ImageBoardServerApp/Pages/Moderation/ModMenu.razor
+++ b/ImageBoardServerApp/Pages/Moderation/ModMenu.razor
@@ -10,6 +10,7 @@
Welcome @mail to the mod menu
diff --git a/ImageBoardServerApp/Pages/Moderation/UsersPage.razor b/ImageBoardServerApp/Pages/Moderation/UsersPage.razor
new file mode 100644
index 0000000..871b4c0
--- /dev/null
+++ b/ImageBoardServerApp/Pages/Moderation/UsersPage.razor
@@ -0,0 +1,6 @@
+@page "/modmenu/users"
+UsersPage
+
+@code {
+
+}
\ No newline at end of file
diff --git a/ImageBoardServerApp/Shared/Components/Comment.razor b/ImageBoardServerApp/Shared/Components/Comment.razor
index 192a56d..1225ce6 100644
--- a/ImageBoardServerApp/Shared/Components/Comment.razor
+++ b/ImageBoardServerApp/Shared/Components/Comment.razor
@@ -9,7 +9,7 @@
@toggleText
]
@comment.Username
- @if (comment.User.Role != "User")
+ @if (@comment.User.Role != "User")
{
}
diff --git a/ImageBoardServerApp/Shared/Components/Comment.razor.css b/ImageBoardServerApp/Shared/Components/Comment.razor.css
index 30f20bc..4de11ba 100644
--- a/ImageBoardServerApp/Shared/Components/Comment.razor.css
+++ b/ImageBoardServerApp/Shared/Components/Comment.razor.css
@@ -60,9 +60,11 @@
margin: 0;
}
+
.Admin{
color: #ff191c;
}
+
.Mod{
color: #af13d7;
-}
+}
\ No newline at end of file
diff --git a/ImageBoardServerApp/Shared/Components/Forms/CommentForm.razor b/ImageBoardServerApp/Shared/Components/Forms/CommentForm.razor
index 883ab15..90bf2c6 100644
--- a/ImageBoardServerApp/Shared/Components/Forms/CommentForm.razor
+++ b/ImageBoardServerApp/Shared/Components/Forms/CommentForm.razor
@@ -100,7 +100,7 @@
{
Stream stream = selectedFile.OpenReadStream(maxAllowedSize: 512000 * 4); // max 2MB
var file = Path.GetRandomFileName() + "." + selectedFile.Name.Split(".")[selectedFile.Name.Split(".").Length - 1];
- var path = $"{env.WebRootPath}/img/dynamic/comment/{@post.Board}/{file}";
+ var path = $"{env.WebRootPath}/img/dynamic/comment/{@post.Board}/{@file}";
FileStream fs = File.Create(path);
await stream.CopyToAsync(fs);
stream.Close();
@@ -110,7 +110,7 @@
var imageToUpload = new ImageData
{
Board = post.Board,
- ImageLocation = $"/img/dynamic/comment/{post.Board}/{file}"
+ ImageLocation = $"/img/dynamic/comment/{@post.Board}/{@file}"
};
int imageID = await ImagesRepository.createImageAsync(imageToUpload);
commentToCreate = new CommentData()
diff --git a/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor b/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor
index 01338f2..cf54db9 100644
--- a/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor
+++ b/ImageBoardServerApp/Shared/Components/Forms/PostForm.razor
@@ -120,7 +120,7 @@
Stream stream = selectedFile.OpenReadStream(maxAllowedSize: 512000 * 4); // max 2MB
var file = Path.GetRandomFileName() + "." + selectedFile.Name.Split(".")[selectedFile.Name.Split(".").Length - 1];
- var path = $"{env.WebRootPath}/img/dynamic/op/{board.Tag}/{file}";
+ var path = $"{env.WebRootPath}/img/dynamic/op/{@board.Tag}/{@file}";
FileStream fs = File.Create(path);
await stream.CopyToAsync(fs);
stream.Close();
@@ -129,7 +129,7 @@
var imageToUpload = new ImageData
{
Board = board.Tag,
- ImageLocation = $"/img/dynamic/op/{board.Tag}/{file}"
+ ImageLocation = $"/img/dynamic/op/{@board.Tag}/{@file}"
};
int imageID = await ImagesRepository.createImageAsync(imageToUpload);
var postToPost = new PostData
diff --git a/ImageBoardServerApp/Shared/Components/Post.razor b/ImageBoardServerApp/Shared/Components/Post.razor
index b3d8f72..2e493a2 100644
--- a/ImageBoardServerApp/Shared/Components/Post.razor
+++ b/ImageBoardServerApp/Shared/Components/Post.razor
@@ -14,9 +14,9 @@
@post.Title
@post.Username
@if (post.User.Role != "User")
- {
- ##@post.User.Role.
- }
+ {
+ ##@post.User.Role
+ }
@getTimeFromUnix(post.CreatedAt)
No.@post.PostID
@@ -36,7 +36,7 @@
@foreach (string s in @post.Content.Split("\n"))
{
- @if (s.StartsWith(">"))
+ @if (@s.StartsWith(">"))
{
@s
}
diff --git a/ImageBoardServerApp/Shared/Components/Post.razor.css b/ImageBoardServerApp/Shared/Components/Post.razor.css
index 2285ed7..2cee082 100644
--- a/ImageBoardServerApp/Shared/Components/Post.razor.css
+++ b/ImageBoardServerApp/Shared/Components/Post.razor.css
@@ -19,11 +19,11 @@
.Admin{
color: #ff191c;
}
+
.Mod{
color: #af13d7;
}
-
.threadHeader{
text-align: left;
}
diff --git a/ImageBoardServerApp/_Imports.razor b/ImageBoardServerApp/_Imports.razor
index 3e6f6b8..3613cc4 100644
--- a/ImageBoardServerApp/_Imports.razor
+++ b/ImageBoardServerApp/_Imports.razor
@@ -6,8 +6,6 @@
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
-@using ImageBoardServerApp
-@using ImageBoardServerApp.Shared
@using Radzen
@using Radzen.Blazor
@using ImageBoardServerApp