fixed the bork

This commit is contained in:
limited_dev 2023-02-07 21:47:28 +01:00
parent 2724b6b9d2
commit c1fd893ff0
10 changed files with 20 additions and 15 deletions

View file

@ -1,7 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics.CodeAnalysis;
using ImageBoardServerApp.Shared.Components;
namespace ImageBoardServerApp.Data;

View file

@ -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>

View file

@ -0,0 +1,6 @@
@page "/modmenu/users"
<h3>UsersPage</h3>
@code {
}

View file

@ -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>
}

View file

@ -60,9 +60,11 @@
margin: 0;
}
.Admin{
color: #ff191c;
}
.Mod{
color: #af13d7;
}
}

View file

@ -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()

View file

@ -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

View file

@ -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>
}

View file

@ -19,11 +19,11 @@
.Admin{
color: #ff191c;
}
.Mod{
color: #af13d7;
}
.threadHeader{
text-align: left;
}

View file

@ -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