mirror of https://github.com/abpframework/abp.git
7 changed files with 99 additions and 8 deletions
@ -0,0 +1,31 @@ |
|||
@page "/Account/LoggedOut" |
|||
@model Volo.Abp.Account.Web.Pages.Account.LoggedOutModel |
|||
@using Volo.Abp.Account.Localization |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@using Volo.Abp.Account.Web.Pages.Account |
|||
@inject IHtmlLocalizer<AccountResource> L |
|||
|
|||
@section scripts { |
|||
<abp-script-bundle name="@typeof(LoggedOutModel).FullName"> |
|||
<abp-script src="/Pages/Account/LoggedOut.js"/> |
|||
</abp-script-bundle> |
|||
} |
|||
|
|||
@section styles { |
|||
<abp-style src="/Pages/Account/LoggedOut.css"/> |
|||
} |
|||
|
|||
<abp-card> |
|||
<abp-card-body> |
|||
<abp-card-title>@L["LoggedOutTitle"]</abp-card-title> |
|||
<abp-card-text>@L["LoggedOutText"]</abp-card-text> |
|||
@if (Model.PostLogoutRedirectUri != null) |
|||
{ |
|||
<a abp-button="Primary" class="redirectButton" href="@Model.PostLogoutRedirectUri">@L["ReturnToText", Model.ClientName]</a> |
|||
} |
|||
@if (Model.SignOutIframeUrl != null) |
|||
{ |
|||
<iframe class="signout logoutiframe" src="@Model.SignOutIframeUrl"></iframe> |
|||
} |
|||
</abp-card-body> |
|||
</abp-card> |
|||
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.Extensions.Logging; |
|||
|
|||
namespace Volo.Abp.Account.Web.Pages.Account |
|||
{ |
|||
public class LoggedOutModel : AccountPageModel |
|||
{ |
|||
[HiddenInput] |
|||
[BindProperty(SupportsGet = true)] |
|||
public string ClientName { get; set; } |
|||
|
|||
[HiddenInput] |
|||
[BindProperty(SupportsGet = true)] |
|||
public string SignOutIframeUrl { get; set; } |
|||
|
|||
[HiddenInput] |
|||
[BindProperty(SupportsGet = true)] |
|||
public string PostLogoutRedirectUri { get; set; } |
|||
|
|||
public virtual Task<IActionResult> OnGetAsync() |
|||
{ |
|||
return Task.FromResult<IActionResult>(Page()); |
|||
} |
|||
|
|||
public virtual Task<IActionResult> OnPostAsync() |
|||
{ |
|||
return Task.FromResult<IActionResult>(Page()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,5 @@ |
|||
.logoutiframe { |
|||
display: none; |
|||
width:0; |
|||
height: 0; |
|||
} |
|||
@ -0,0 +1,6 @@ |
|||
(function ($) { |
|||
//TODO:gterdem There should be an option to set the redirect delay here
|
|||
setTimeout(function () { |
|||
window.location = $('.redirectButton').attr('href'); |
|||
}, 3000) |
|||
})(JQuery) |
|||
Loading…
Reference in new issue