1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 13:14:38 -05:00
poke/core/LightTube/Views/Account/Delete.cshtml
2022-08-05 22:33:38 +03:00

46 lines
1.3 KiB
Text

@using LightTube.Database
@model LightTube.Contexts.MessageContext
@{
ViewData["Title"] = "Delete Account";
Layout = "_Layout";
}
@if (!string.IsNullOrWhiteSpace(Model.Message))
{
<div class="login-message">
@Model.Message
</div>
}
<div class="login-container">
<div>
<div>
@if (Context.Request.Cookies.TryGetValue("account_data", out string _))
{
Context.TryGetUser(out LTUser user, "web");
<form asp-action="Delete" method="POST" class="login-form">
<h1>Delete Account</h1>
<p>Deleting a local account</p>
<input name="email" type="hidden" value="@user.UserID">
<input name="password" type="hidden" value="@user.PasswordHash">
<input type="submit" value="Delete Account" class="login-button danger">
</form>
}
else
{
<form asp-action="Delete" method="POST" class="login-form">
<h1>Delete Account</h1>
<input name="userid" type="text" placeholder="UserID">
<input name="password" type="password" placeholder="Password">
<input type="submit" value="Delete Account" class="login-button danger">
</form>
}
</div>
</div>
<div>
<div>
<h1>Warning!</h1>
<p>You cannot undo this operation! After you enter your username and password, your account will get deleted forever.</p>
</div>
</div>
</div>