添加项目文件。
This commit is contained in:
29
TightWiki/Areas/Identity/Pages/Account/Logout.cshtml
Normal file
29
TightWiki/Areas/Identity/Pages/Account/Logout.cshtml
Normal file
@@ -0,0 +1,29 @@
|
||||
@page
|
||||
@model LogoutModel
|
||||
@{
|
||||
var sessionState = ViewData["SessionState"] as TightWiki.SessionState ?? throw new Exception("Wiki State Context cannot be null.");
|
||||
}
|
||||
|
||||
<h3>
|
||||
Logout
|
||||
</h3>
|
||||
|
||||
<p>
|
||||
Logging out will make sure that others cant use this session to make changes to the wiki. You'll need to log back in before making changes.<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">Logout</button>
|
||||
</form>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>You have successfully logged out of the application.</p>
|
||||
}
|
||||
}
|
||||
</header>
|
||||
Reference in New Issue
Block a user