Ouverture de l'authentification dans une modal
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
@page "/authentication/{action}"
|
||||
@inject NavigationManager Navigation
|
||||
@inject IJSRuntime JS
|
||||
|
||||
<main class="rules-shell">
|
||||
<section class="panel panel-wide cta-panel" style="margin-top: 2rem;">
|
||||
@@ -45,6 +46,29 @@
|
||||
Navigation.NavigateToLogin("authentication/login", request);
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (!firstRender)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var status = Action switch
|
||||
{
|
||||
RemoteAuthenticationActions.LogInCallback => "login-succeeded",
|
||||
RemoteAuthenticationActions.LogOutCallback => "logout-succeeded",
|
||||
_ => null,
|
||||
};
|
||||
|
||||
if (status is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await Task.Delay(700);
|
||||
await JS.InvokeVoidAsync("chesscubingAuthModal.notifyParent", status);
|
||||
}
|
||||
|
||||
private static string NormalizeReturnUrl(string? returnUrl)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(returnUrl))
|
||||
|
||||
Reference in New Issue
Block a user