feat: added /sys/ to all system pages, edited 404 page, added deadlink, moar changes

This commit is contained in:
limited_dev 2023-02-12 17:01:46 +01:00
parent 2d458fd2f2
commit 0279df06fa
24 changed files with 90 additions and 41 deletions

View file

@ -9,8 +9,12 @@
<LayoutView Layout="@typeof(MainLayout)">
<h3>404</h3>
<div class="Error404">
<img src="img/static/err/2.png" alt="noimageFound"/>
<p role="alert">Sorry, nothing found. Please go back to the main page. Or watch the tree and find the hidden Cat..</p>
<img src="img/static/err/1.png" alt="noimageFound"/>
<p role="alert">Sorry, nothing found.</p>
<br/>
<a href="/">Please go back to the main page.</a>
<br/>
<p>Or watch the tree and find the hidden Cat..</p>
</div>
</LayoutView>
</NotFound>

View file

@ -1,4 +1,4 @@
@page "/banned"
@page "/sys/banned"
<h3>Banned</h3>
<img class="image" src="img/static/banned/@i"/>

View file

@ -1,4 +1,4 @@
@page "/login"
@page "/sys/login"
@using ImageBoardServerApp.Data.Repository
@using ImageBoardServerApp.Auth
@inject IJSRuntime js

View file

@ -1,4 +1,4 @@
@page "/register"
@page "/sys/register"
@using ImageBoardServerApp.Data.Repository
@using ImageBoardServerApp.Auth
@inject IJSRuntime js

View file

@ -0,0 +1,6 @@
@page "/sys/you"
<h3>UserPage</h3>
@code {
}

View file

@ -0,0 +1,10 @@
@page "/sys/dead"
<h3>DeadLink</h3>
<img class="deadlink" src="img/static/deadlink/1.png" alt="Img is dead as well"/>
<span>This link is dead.</span>
<br/>
<a href="/">Return home</a>
@code {
}

View file

@ -0,0 +1,7 @@
.deadlink{
justify-content: center;
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}

View file

@ -1,4 +1,4 @@
@page "/faq"
@page "/sys/faq"
<h3>FAQ</h3>
@code {

View file

@ -1,4 +1,4 @@
@page "/rules"
@page "/sys/rules"
<div class="rules_headline">
<h3>Rules</h3>
</div>

View file

@ -1,4 +1,4 @@
@page "/report/{type}/{board}/{id}"
@page "/sys/report/{type}/{board}/{id}"
@using System.ComponentModel.DataAnnotations
@using System.Data
@using ImageBoardServerApp.Auth

View file

@ -1,20 +1,19 @@
@page "/modmenu"
@page "/sys/modmenu"
@using ImageBoardServerApp.Auth
@inject AuthenticationStateProvider authStateProvider
@inject NavigationManager navManager
<h3>ModMenu</h3>
<AuthorizeView>
<Authorized>
<h3>ModMenu</h3>
<span>Welcome @mail to the mod menu</span>
<div>
<a href="/modmenu/reports">[Reports]</a>
<a href="/modmenu/users">[Users]</a>
<a href="/sys/reports">[Reports]</a>
<a href="/sys/users">[Users]</a>
</div>
</Authorized>
<NotAuthorized>
<a href="/login">You do not have permission to view this menu.</a>
<DeadLink/>
</NotAuthorized>
</AuthorizeView>
@code {

View file

@ -1,11 +1,19 @@
@page "/modmenu/reports"
@page "/sys/reports"
@using ImageBoardServerApp.Data.Repository
<h3>Reports</h3>
@foreach (var r in reports)
{
<AuthorizeView>
<Authorized>
<h3>Reports</h3>
@foreach (var r in reports)
{
<Report report="r"/>
<hr/>
}
}
</Authorized>
<NotAuthorized>
<DeadLink/>
</NotAuthorized>
</AuthorizeView>
@code {
private List<ReportData> reports;

View file

@ -1,6 +1,13 @@
@page "/modmenu/users"
<h3>UsersPage</h3>
@page "/sys/users"
<AuthorizeView>
<Authorized>
<h3>Users</h3>
</Authorized>
<NotAuthorized>
<DeadLink/>
</NotAuthorized>
</AuthorizeView>
@code {
}

View file

@ -1,4 +1,4 @@
@page "/SuccessfulPost"
@page "/sys/SuccessfulPost"
<h3>SuccessfulPost</h3>
<span>Post sucessfully crated!</span>

View file

@ -1,4 +1,4 @@
@page "/UnSuccessfulPost"
@page "/sys/UnSuccessfulPost"
<h3>UnuccessfulPost</h3>
<span>Post was not created!</span>

View file

@ -16,14 +16,22 @@
<h3>Threads</h3>
<br/>
@if (posts.Any())
@if (posts != null)
{
@if (posts.Any())
{
@foreach(var post in posts)
{
<Post post="@post" showOpenThread="true"></Post>
<hr/>
}
}
}
else
{
<p>
<em>Loading Posts...</em>
</p>
}
@code {

View file

@ -44,7 +44,7 @@
<a @onclick="@deletePost" href="javascript:void(0)">Delete</a>
<span>]</span>
<span>[</span>
<a class="report" href="/report/comment/@comment.Board/@comment.CommentID" target="_blank">Report</a>
<a class="report" href="/sys/report/comment/@comment.Board/@comment.CommentID" target="_blank">Report</a>
<span>]</span>
</div>
}

View file

@ -90,7 +90,7 @@
//Maybe redirect to /banned?
return;
}
foundusr.lastActionTimeStamp = DateTimeOffset.UnixEpoch.ToUnixTimeMilliseconds();
foundusr.lastActionTimeStamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
await UsersRepository.updateUserAsync(foundusr);
bool hasImage = selectedFile != null;
@ -141,7 +141,7 @@
if (commentId == -1)
{
//Open comment unsucessfull
navigationManager.NavigateTo("/UnSuccessfulPost");
navigationManager.NavigateTo("/sys/UnSuccessfulPost");
hasErr = true;
postErr = "There was an error and the comment could not be created. Please notify the admin.";
Console.WriteLine("Shit sucks and did not work.");

View file

@ -5,9 +5,9 @@
<br/>
<div>
<span>Read the </span>
<a href="/rules">rules</a>
<a href="/sys/rules">rules</a>
<span> and </span>
<a href="/faq">faq</a>
<a href="/sys/faq">faq</a>
<span> before posting</span>
</div>
</div>

View file

@ -105,7 +105,7 @@
//Maybe redirect to /banned?
return;
}
foundusr.lastActionTimeStamp = DateTimeOffset.UnixEpoch.ToUnixTimeMilliseconds();
foundusr.lastActionTimeStamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
await UsersRepository.updateUserAsync(foundusr);

View file

@ -52,7 +52,7 @@
<a @onclick="@deletePost" href="javascript:void(0)">Delete</a>
<span>]</span>
<span>[</span>
<a class="report" href="/report/op/@post.Board/@post.PostID" target="_blank">Report</a>
<a class="report" href="/sys/report/op/@post.Board/@post.PostID" target="_blank">Report</a>
<span>]</span>
@if (showOpenThread)
{

View file

@ -13,8 +13,8 @@
<main>
<div class="top-row px-4">
<a href="/faq">[FAQ]</a>
<a href="/rules">[Rules]</a>
<a href="/sys/faq">[FAQ]</a>
<a href="/sys/rules">[Rules]</a>
</div>
<article class="content px-4">

View file

@ -10,7 +10,7 @@
<a class="navbar-brand" @onclick="logout" href="javascript:void(0)">[Logout]</a>
</Authorized>
<NotAuthorized>
<a class="navbar-brand" href="/login">[Login]</a>
<a class="navbar-brand" href="/sys/login">[Login]</a>
</NotAuthorized>
</AuthorizeView>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB