mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-06-04 15:12:28 +00:00
Let level/profile owners delete comments
This commit is contained in:
parent
f93c6dc8a2
commit
0972375b05
4 changed files with 9 additions and 9 deletions
|
@ -137,10 +137,8 @@ public class LoginForm : BaseLayout
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(redirect))
|
if (string.IsNullOrWhiteSpace(redirect)) return this.Redirect("~/");
|
||||||
{
|
|
||||||
return this.RedirectToPage(nameof(LandingPage));
|
|
||||||
}
|
|
||||||
return this.Redirect(redirect);
|
return this.Redirect(redirect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +146,7 @@ public class LoginForm : BaseLayout
|
||||||
public IActionResult OnGet()
|
public IActionResult OnGet()
|
||||||
{
|
{
|
||||||
if (this.Database.UserFromWebRequest(this.Request) != null)
|
if (this.Database.UserFromWebRequest(this.Request) != null)
|
||||||
return this.RedirectToPage(nameof(LandingPage));
|
return this.Redirect("~/");
|
||||||
|
|
||||||
return this.Page();
|
return this.Page();
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class RegisterForm : BaseLayout
|
||||||
|
|
||||||
if (ServerConfiguration.Instance.Mail.MailEnabled) return this.Redirect("~/login/sendVerificationEmail");
|
if (ServerConfiguration.Instance.Mail.MailEnabled) return this.Redirect("~/login/sendVerificationEmail");
|
||||||
|
|
||||||
return this.RedirectToPage(nameof(LandingPage));
|
return this.Redirect("~/");
|
||||||
}
|
}
|
||||||
|
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
|
|
|
@ -112,7 +112,8 @@
|
||||||
}
|
}
|
||||||
<div class="@divLength wide stretched column">
|
<div class="@divLength wide stretched column">
|
||||||
<div class="lh-content" id="lh-comments">
|
<div class="lh-content" id="lh-comments">
|
||||||
@await Html.PartialAsync("Partials/CommentsPartial", ViewData.WithLang(language).WithTime(timeZone))
|
@await Html.PartialAsync("Partials/CommentsPartial", new ViewDataDictionary(ViewData.WithLang(language).WithTime(timeZone))
|
||||||
|
{ { "PageOwner", Model.Slot?.CreatorId }, })
|
||||||
</div>
|
</div>
|
||||||
<div class="lh-content" id="lh-photos">
|
<div class="lh-content" id="lh-photos">
|
||||||
<div class="ui purple segment" id="photos">
|
<div class="ui purple segment" id="photos">
|
||||||
|
|
|
@ -164,7 +164,8 @@
|
||||||
}
|
}
|
||||||
<div class="@divLength wide stretched column">
|
<div class="@divLength wide stretched column">
|
||||||
<div class="lh-content" id="lh-comments">
|
<div class="lh-content" id="lh-comments">
|
||||||
@await Html.PartialAsync("Partials/CommentsPartial", ViewData.WithLang(language).WithTime(timeZone))
|
@await Html.PartialAsync("Partials/CommentsPartial", new ViewDataDictionary(ViewData.WithLang(language).WithTime(timeZone))
|
||||||
|
{ {"PageOwner", Model.ProfileUser.UserId}, })
|
||||||
</div>
|
</div>
|
||||||
<div class="lh-content" id="lh-photos">
|
<div class="lh-content" id="lh-photos">
|
||||||
<div class="ui purple segment" id="photos">
|
<div class="ui purple segment" id="photos">
|
||||||
|
@ -193,7 +194,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="lh-content" id="lh-levels">
|
<div class="lh-content" id="lh-levels">
|
||||||
<div class="ui green segment" id="levels">
|
<div class="ui green segment" id="levels">
|
||||||
@if (Model.HeartedSlots?.Count == 0)
|
@if (Model.Slots?.Count == 0)
|
||||||
{
|
{
|
||||||
<p>This user hasn't published any levels</p>
|
<p>This user hasn't published any levels</p>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue