Files
ZelWiki/TightWiki/Areas/Identity/Pages/Account/Logout.cshtml
2025-02-07 16:16:10 +08:00

30 lines
751 B
Plaintext

@page
@model LogoutModel
@{
var sessionState = ViewData["SessionState"] as TightWiki.SessionState ?? throw new Exception("Wiki State Context cannot be null.");
}
<h3>
退出
</h3>
<p>
退出登录前确保其他人没有在使用当前会话,退出后您需要重新登录<br /><br />
</p>
<hr />
<header>
@{
if (User.Identity?.IsAuthenticated ?? false)
{
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Page("/", new { area = "" })" method="post">
<button type="submit" class="btn btn-primary rounded-0">退出</button>
</form>
}
else
{
<p>操作成功</p>
}
}
</header>