mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-30 00:38:38 +00:00
Revert slug hotfix and change comment links to use relative urls
This commit is contained in:
parent
30133f592c
commit
48a4202ba1
3 changed files with 5 additions and 8 deletions
|
@ -18,7 +18,7 @@ using Microsoft.EntityFrameworkCore;
|
|||
namespace LBPUnion.ProjectLighthouse.Servers.Website.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("slot/{id:int}/{slug?}")]
|
||||
[Route("slot/{id:int}")]
|
||||
public class SlotPageController : ControllerBase
|
||||
{
|
||||
private readonly DatabaseContext database;
|
||||
|
|
|
@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore;
|
|||
namespace LBPUnion.ProjectLighthouse.Servers.Website.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("user/{id:int}/{slug?}")]
|
||||
[Route("user/{id:int}")]
|
||||
public class UserPageController : ControllerBase
|
||||
{
|
||||
private readonly DatabaseContext database;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
@if (Model.CommentsEnabled && Model.User != null)
|
||||
{
|
||||
<div class="ui divider"></div>
|
||||
<form class="ui reply form" action="@Url.RouteUrl(ViewContext.RouteData.Values)/postComment" method="post">
|
||||
<form class="ui reply form" action="postComment" method="post">
|
||||
<div class="field">
|
||||
<textarea style="min-height: 70px; height: 70px; max-height:120px" maxlength="100" name="msg"></textarea>
|
||||
</div>
|
||||
|
@ -53,9 +53,6 @@
|
|||
|
||||
string decodedMessage = HttpUtility.HtmlDecode(comment.GetCommentMessage(Database));
|
||||
|
||||
string? url = Url.RouteUrl(ViewContext.RouteData.Values);
|
||||
if (url == null) continue;
|
||||
|
||||
int rating = comment.ThumbsUp - comment.ThumbsDown;
|
||||
|
||||
<div style="display: flex" id="@comment.CommentId">
|
||||
|
@ -67,11 +64,11 @@
|
|||
}
|
||||
}
|
||||
<div class="voting" style="@(style)">
|
||||
<a href="@url/rateComment?commentId=@(comment.CommentId)&rating=@(yourThumb == 1 ? 0 : 1)">
|
||||
<a href="rateComment?commentId=@(comment.CommentId)&rating=@(yourThumb == 1 ? 0 : 1)">
|
||||
<i class="fitted @(yourThumb == 1 ? "green" : "grey") arrow up link icon" style="display: block"></i>
|
||||
</a>
|
||||
<span style="text-align: center; margin: auto; @(rating < 0 ? "margin-left: -5px" : "")">@(rating)</span>
|
||||
<a href="@url/rateComment?commentId=@(comment.CommentId)&rating=@(yourThumb == -1 ? 0 : -1)">
|
||||
<a href="rateComment?commentId=@(comment.CommentId)&rating=@(yourThumb == -1 ? 0 : -1)">
|
||||
<i class="fitted @(yourThumb == -1 ? "red" : "grey") arrow down link icon" style="display: block"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue