Ouverture de l'authentification dans une modal

This commit is contained in:
2026-04-13 23:09:17 +02:00
parent 7080fa8450
commit 740074c49e
6 changed files with 209 additions and 6 deletions

View File

@@ -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))