diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/AcceptInvitation.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/AcceptInvitation.razor
index 2650418..341f9b6 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/AcceptInvitation.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/AcceptInvitation.razor
@@ -14,7 +14,7 @@
is the way a host adds people while self-service registration is disabled, so gating it
behind the UserRegistration flag would defeat its purpose (#100). *@
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ConfirmEmail.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ConfirmEmail.razor
index 0621d16..20dda3a 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ConfirmEmail.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ConfirmEmail.razor
@@ -6,7 +6,7 @@
@inject UserManager
UserManager
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ConfirmEmailChange.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ConfirmEmailChange.razor
index c6eb03f..e8dea6b 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ConfirmEmailChange.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ConfirmEmailChange.razor
@@ -7,7 +7,7 @@
@inject SignInManager SignInManager
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ForgotPassword.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ForgotPassword.razor
index 8bb7db6..bab529a 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ForgotPassword.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ForgotPassword.razor
@@ -9,7 +9,7 @@
@inject IEmailSender EmailSender
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ForgotPasswordConfirmation.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ForgotPasswordConfirmation.razor
index b453249..531dc84 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ForgotPasswordConfirmation.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ForgotPasswordConfirmation.razor
@@ -3,7 +3,7 @@
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/InvalidPasswordReset.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/InvalidPasswordReset.razor
index 2ce4cb2..91f0289 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/InvalidPasswordReset.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/InvalidPasswordReset.razor
@@ -3,7 +3,7 @@
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/InvalidUser.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/InvalidUser.razor
index fcab912..2abac74 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/InvalidUser.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/InvalidUser.razor
@@ -3,7 +3,7 @@
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Lockout.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Lockout.razor
index 31700f1..7ec8d20 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Lockout.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Lockout.razor
@@ -3,7 +3,7 @@
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Login.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Login.razor
index 3906955..82d26b6 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Login.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Login.razor
@@ -9,7 +9,7 @@
@inject IJSRuntime JsRuntime
@inject IIdentityFeatureProvider Features
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/LoginWith2fa.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/LoginWith2fa.razor
index ca1ed29..be86f61 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/LoginWith2fa.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/LoginWith2fa.razor
@@ -7,7 +7,7 @@
@inject NotificationService NotificationService
@inject LoginTokenProtector LoginTokens
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/LoginWithRecoveryCode.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/LoginWithRecoveryCode.razor
index b3c3b86..2c6bf12 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/LoginWithRecoveryCode.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/LoginWithRecoveryCode.razor
@@ -7,7 +7,7 @@
@inject NotificationService NotificationService
@inject LoginTokenProtector LoginTokens
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/ChangePassword.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/ChangePassword.razor
index 2ea2436..2526071 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/ChangePassword.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/ChangePassword.razor
@@ -8,7 +8,7 @@
@inject NotificationService NotificationService
@inject IOptions
IdentityOptions
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/DeletePersonalData.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/DeletePersonalData.razor
index 381569f..c6abfca 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/DeletePersonalData.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/DeletePersonalData.razor
@@ -6,9 +6,9 @@
@inject ILogger Logger
@inject NotificationService NotificationService
@inject NavigationManager NavigationManager
-@inject DialogService DialogService
+@inject ConfirmService Confirm
-
+
@@ -96,12 +96,13 @@
}
// Zweifache Absicherung über Dialog
- var confirm = await DialogService.Confirm(
+ var confirm = await Confirm.ConfirmAsync(
"Your account will be deactivated now and your personal data permanently erased after the retention period. Continue?",
"Final Confirmation",
- new ConfirmOptions { OkButtonText = "Yes, Delete My Account", CancelButtonText = "No, Cancel" });
+ okText: "Yes, Delete My Account",
+ cancelText: "No, Cancel");
- if (confirm != true)
+ if (!confirm)
{
NotificationService.Notify(NotificationSeverity.Info, "Cancelled", "Account deletion cancelled.");
return;
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Disable2fa.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Disable2fa.razor
index 6112a67..ba4e002 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Disable2fa.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Disable2fa.razor
@@ -7,7 +7,7 @@
@inject NotificationService NotificationService
@inject AuthenticationStateProvider AuthenticationStateProvider
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Email.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Email.razor
index 45305cb..ea69e6c 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Email.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Email.razor
@@ -8,7 +8,7 @@
@inject NavigationManager NavigationManager
@inject NotificationService NotificationService
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/EnableAuthenticator.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/EnableAuthenticator.razor
index e9e6edd..3363e9d 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/EnableAuthenticator.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/EnableAuthenticator.razor
@@ -10,7 +10,7 @@
@inject NotificationService NotificationService
@inject NavigationManager NavigationManager
-
+
@if (_recoveryCodes is not null)
{
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/GenerateRecoveryCodes.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/GenerateRecoveryCodes.razor
index b3ff247..7e4eb90 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/GenerateRecoveryCodes.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/GenerateRecoveryCodes.razor
@@ -6,7 +6,7 @@
@inject NotificationService NotificationService
@inject AuthenticationStateProvider AuthenticationStateProvider
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/PasskeyCreate.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/PasskeyCreate.razor
index 0e0d841..7b7a027 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/PasskeyCreate.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/PasskeyCreate.razor
@@ -5,7 +5,7 @@
@inject NavigationManager NavigationManager
@inject NotificationService NotificationService
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Passkeys.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Passkeys.razor
index 76f90c6..dfec518 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Passkeys.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Passkeys.razor
@@ -9,7 +9,7 @@
@inject ConfirmService Confirm
@inject NotificationService NotificationService
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/PersonalData.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/PersonalData.razor
index 5beadb2..f0d9396 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/PersonalData.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/PersonalData.razor
@@ -5,7 +5,7 @@
@inject UserManager UserManager
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Profile.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Profile.razor
index 275dfee..c776e95 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Profile.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/Profile.razor
@@ -5,7 +5,7 @@
@inject UserManager UserManager
@inject NotificationService NotificationService
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/RenamePasskey.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/RenamePasskey.razor
index d725c24..c8c3fb8 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/RenamePasskey.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/RenamePasskey.razor
@@ -8,7 +8,7 @@
@inject NavigationManager NavigationManager
@inject NotificationService NotificationService
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/ResetAuthenticator.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/ResetAuthenticator.razor
index 602a091..1244a70 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/ResetAuthenticator.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/ResetAuthenticator.razor
@@ -3,7 +3,7 @@
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/SetPassword.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/SetPassword.razor
index 4a4f9a7..7968f72 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/SetPassword.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/SetPassword.razor
@@ -9,7 +9,7 @@
@inject NotificationService NotificationService
@inject IOptions IdentityOptions
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/TwoFactorAuthentication.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/TwoFactorAuthentication.razor
index 640afc0..1a9bc96 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/TwoFactorAuthentication.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Manage/TwoFactorAuthentication.razor
@@ -4,7 +4,7 @@
@inject UserManager UserManager
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Register.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Register.razor
index 579c526..257f745 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Register.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/Register.razor
@@ -12,7 +12,7 @@
@inject NotificationService NotificationService
@inject LoginTokenProtector LoginTokens
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/RegisterConfirmation.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/RegisterConfirmation.razor
index d7fea97..2a6c718 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/RegisterConfirmation.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/RegisterConfirmation.razor
@@ -4,7 +4,7 @@
@inject UserManager
UserManager
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResendEmailConfirmation.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResendEmailConfirmation.razor
index 4e12d74..4651195 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResendEmailConfirmation.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResendEmailConfirmation.razor
@@ -9,7 +9,7 @@
@inject NavigationManager NavigationManager
@inject NotificationService NotificationService
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResetPassword.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResetPassword.razor
index 5287b79..8d58163 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResetPassword.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResetPassword.razor
@@ -9,7 +9,7 @@
@inject NotificationService NotificationService
@inject IOptions
IdentityOptions
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResetPasswordConfirmation.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResetPasswordConfirmation.razor
index 483f1d1..f859b48 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResetPasswordConfirmation.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Account/Pages/ResetPasswordConfirmation.razor
@@ -3,7 +3,7 @@
@inject NavigationManager NavigationManager
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Dialogs/RoleUserDialog.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Dialogs/RoleUserDialog.razor
index 05a3b01..21e370e 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Dialogs/RoleUserDialog.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Dialogs/RoleUserDialog.razor
@@ -1,4 +1,5 @@
@inject DialogService DialogService
+@inject ConfirmService Confirm
@inject UserManager UserManager
@inject RoleManager RoleManager
@@ -46,7 +47,7 @@
if(string.IsNullOrEmpty(_role.Name))
return;
- if (await DialogService.Confirm("Are you sure you want to remove this user?", "Remove User") == true)
+ if (await Confirm.ConfirmAsync("Are you sure you want to remove this user?", "Remove User"))
{
if (user.RootUser && _role.Name == Roles.Administrator)
{
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/Roles.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/Roles.razor
index 2a8018f..0f2c7d0 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/Roles.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/Roles.razor
@@ -10,7 +10,7 @@
@attribute [Authorize(Roles = "Administrator")]
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/UserCleanup.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/UserCleanup.razor
index 99bdbfc..de1151a 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/UserCleanup.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/UserCleanup.razor
@@ -6,7 +6,7 @@
@attribute [Authorize(Roles = "Administrator")]
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/Users.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/Users.razor
index a69baec..b1d20f1 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/Users.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Components/Administration/Pages/Users.razor
@@ -13,7 +13,7 @@
@attribute [Authorize(Roles = "Administrator")]
-
+
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Components/Shared/IdentityPageTitle.razor b/src/AndreGoepel.Marten.Identity.Blazor/Components/Shared/IdentityPageTitle.razor
deleted file mode 100644
index e3d49b2..0000000
--- a/src/AndreGoepel.Marten.Identity.Blazor/Components/Shared/IdentityPageTitle.razor
+++ /dev/null
@@ -1,26 +0,0 @@
-@using Microsoft.Extensions.Options
-@inject IServiceProvider Services
-
-@* Identity-flavoured wrapper over the design library's AppPageTitle: adds the
- configured application name (MartenIdentityBlazorOptions.ApplicationName) as the
- document-title suffix. AppPageTitle handles the and the breadcrumb. *@
-
-
-@code {
- /// The page-specific title, e.g. "Log in".
- [Parameter, EditorRequired]
- public string Title { get; set; } = default!;
-
- ///
- /// Optional topbar breadcrumb for shell pages, e.g. "Account / Profile". When
- /// omitted the document is used. Ignored on layouts that
- /// don't cascade a breadcrumb state (e.g. the login layout).
- ///
- [Parameter]
- public string? Breadcrumb { get; set; }
-
- // Resolve optionally: the title must still render when the host (or a test) has not
- // registered the options, in which case no brand suffix is appended.
- private string? ApplicationName =>
- Services.GetService>()?.Value.ApplicationName;
-}
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/Initialization.cs b/src/AndreGoepel.Marten.Identity.Blazor/Initialization.cs
index a0b149d..3656a15 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/Initialization.cs
+++ b/src/AndreGoepel.Marten.Identity.Blazor/Initialization.cs
@@ -5,6 +5,7 @@
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
+using Microsoft.Extensions.Options;
namespace AndreGoepel.Marten.Identity.Blazor;
@@ -33,6 +34,16 @@ public static IServiceCollection AddMartenIdentityBlazor(
options.Configure(configureOptions);
}
+ // Feed the identity ApplicationName into the design system's brand name so
+ // AppPageTitle renders "{page title} – {ApplicationName}" without every page
+ // passing a Suffix (this replaces the old IdentityPageTitle wrapper). Bound
+ // lazily off IOptions so it picks up the host's configureOptions value.
+ services
+ .AddOptions()
+ .Configure>(
+ (design, identity) => design.BrandName = identity.Value.ApplicationName
+ );
+
// Default feature-flag provider reads the options baseline (#66). TryAdd lets a host
// register a persistence-backed provider that takes precedence.
services.TryAddScoped();
diff --git a/src/AndreGoepel.Marten.Identity.Blazor/_Imports.razor b/src/AndreGoepel.Marten.Identity.Blazor/_Imports.razor
index 93e1df9..99b112b 100644
--- a/src/AndreGoepel.Marten.Identity.Blazor/_Imports.razor
+++ b/src/AndreGoepel.Marten.Identity.Blazor/_Imports.razor
@@ -23,7 +23,6 @@
@using AndreGoepel.Marten.Identity.Blazor.Components.Account
@using AndreGoepel.Marten.Identity.Blazor.Components.Account.Shared
@using AndreGoepel.Marten.Identity.Blazor.Components.Layout
-@using AndreGoepel.Marten.Identity.Blazor.Components.Shared
@using Radzen
@using Radzen.Blazor
@using System.ComponentModel.DataAnnotations
diff --git a/tests/AndreGoepel.Marten.Identity.Blazor.Tests/InitializationTests.cs b/tests/AndreGoepel.Marten.Identity.Blazor.Tests/InitializationTests.cs
index 4c9823e..db5248c 100644
--- a/tests/AndreGoepel.Marten.Identity.Blazor.Tests/InitializationTests.cs
+++ b/tests/AndreGoepel.Marten.Identity.Blazor.Tests/InitializationTests.cs
@@ -1,10 +1,29 @@
using AndreGoepel.Design.Blazor;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Options;
namespace AndreGoepel.Marten.Identity.Blazor.Tests;
public class InitializationTests
{
+ // AppPageTitle (which replaced the IdentityPageTitle wrapper) reads the brand suffix
+ // from DesignBlazorOptions.BrandName. AddMartenIdentityBlazor must feed the configured
+ // ApplicationName into it, or every page title silently loses its brand suffix (#113).
+ [Fact]
+ public void AddMartenIdentityBlazor_FeedsApplicationNameIntoDesignBrandName()
+ {
+ var services = new ServiceCollection();
+ services.AddLogging();
+
+ services.AddMartenIdentityBlazor(o => o.ApplicationName = "Acme Identity");
+
+ using var provider = services.BuildServiceProvider();
+ var brandName = provider
+ .GetRequiredService>()
+ .Value.BrandName;
+ Assert.Equal("Acme Identity", brandName);
+ }
+
// The admin pages inject design-blazor's ConfirmService, so AddMartenIdentityBlazor
// must register the design-system services (via AddDesignBlazor) — otherwise those
// pages fail to render on any host that doesn't call AddDesignBlazor() itself.