mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-15 09:38:19 +01:00
46 lines
No EOL
1.3 KiB
Text
46 lines
No EOL
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> |