fixed the bork
This commit is contained in:
parent
2724b6b9d2
commit
c1fd893ff0
10 changed files with 20 additions and 15 deletions
|
@ -1,7 +1,5 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using ImageBoardServerApp.Shared.Components;
|
||||
|
||||
namespace ImageBoardServerApp.Data;
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<span>Welcome @mail to the mod menu</span>
|
||||
<div>
|
||||
<a href="/modmenu/reports">[Reports]</a>
|
||||
<a href="/modmenu/users">[Users]</a>
|
||||
</div>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
|
|
6
ImageBoardServerApp/Pages/Moderation/UsersPage.razor
Normal file
6
ImageBoardServerApp/Pages/Moderation/UsersPage.razor
Normal file
|
@ -0,0 +1,6 @@
|
|||
@page "/modmenu/users"
|
||||
<h3>UsersPage</h3>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
|
@ -9,7 +9,7 @@
|
|||
<a class="toggleOpened" onclick="@ToggleOpened">@toggleText</a>
|
||||
<span>]</span>
|
||||
<span class="name">@comment.Username</span>
|
||||
@if (comment.User.Role != "User")
|
||||
@if (@comment.User.Role != "User")
|
||||
{
|
||||
<span class="@comment.User.Role" >##@comment.User.Role</span>
|
||||
}
|
||||
|
|
|
@ -60,9 +60,11 @@
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
.Admin{
|
||||
color: #ff191c;
|
||||
}
|
||||
|
||||
.Mod{
|
||||
color: #af13d7;
|
||||
}
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
<span class="title">@post.Title</span>
|
||||
<span class="name">@post.Username</span>
|
||||
@if (post.User.Role != "User")
|
||||
{
|
||||
<span class="@post.User.Role" >##@post.User.Role</span>.
|
||||
}
|
||||
{
|
||||
<span class="@post.User.Role" >##@post.User.Role</span>
|
||||
}
|
||||
<span class="date">@getTimeFromUnix(post.CreatedAt)</span>
|
||||
<span class="post-id">No.@post.PostID</span>
|
||||
</div>
|
||||
|
@ -36,7 +36,7 @@
|
|||
<div class="threadTextContainer">
|
||||
@foreach (string s in @post.Content.Split("\n"))
|
||||
{
|
||||
@if (s.StartsWith(">"))
|
||||
@if (@s.StartsWith(">"))
|
||||
{
|
||||
<span class="threadText greenText">@s</span>
|
||||
}
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
.Admin{
|
||||
color: #ff191c;
|
||||
}
|
||||
|
||||
.Mod{
|
||||
color: #af13d7;
|
||||
}
|
||||
|
||||
|
||||
.threadHeader{
|
||||
text-align: left;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue