Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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). *@

<IdentityPageTitle Title="Accept invitation" />
<AppPageTitle Title="Accept invitation" />

<div class="ag-login-head">
<RadzenText TagName="TagName.H1" TextStyle="TextStyle.H4" Text="Accept your invitation" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@inject UserManager<User> UserManager
@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Confirm email" />
<AppPageTitle Title="Confirm email" />

<div class="rz-p-4 rz-p-md-8">
<RadzenCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@inject SignInManager<User> SignInManager
@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Confirm email change" />
<AppPageTitle Title="Confirm email change" />

<div class="rz-p-4 rz-p-md-8">
<RadzenCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@inject IEmailSender<User> EmailSender
@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Forgot your password?" />
<AppPageTitle Title="Forgot your password?" />

<div class="ag-login-head">
<RadzenText TagName="TagName.H1" TextStyle="TextStyle.H4" Text="Forgot your password?" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Check your email" />
<AppPageTitle Title="Check your email" />

<div class="rz-p-4 rz-p-md-8">
<RadzenCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Invalid password reset" />
<AppPageTitle Title="Invalid password reset" />

<div class="rz-p-4 rz-p-md-8">
<RadzenCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Invalid user" />
<AppPageTitle Title="Invalid user" />

<div class="rz-p-4 rz-p-md-8">
<RadzenCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Locked out" />
<AppPageTitle Title="Locked out" />

<div class="rz-p-4 rz-p-md-8">
<RadzenCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@inject IJSRuntime JsRuntime
@inject IIdentityFeatureProvider Features

<IdentityPageTitle Title="Log in" />
<AppPageTitle Title="Log in" />

<div class="ag-login-head">
<RadzenText TagName="TagName.H1" TextStyle="TextStyle.H4" Text="Welcome back" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@inject NotificationService NotificationService
@inject LoginTokenProtector LoginTokens

<IdentityPageTitle Title="Two-factor authentication" />
<AppPageTitle Title="Two-factor authentication" />

<div class="ag-login-head">
<RadzenText TagName="TagName.H1" TextStyle="TextStyle.H4" Text="Two-factor authentication" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@inject NotificationService NotificationService
@inject LoginTokenProtector LoginTokens

<IdentityPageTitle Title="Recovery code verification" />
<AppPageTitle Title="Recovery code verification" />

<div class="ag-login-head">
<RadzenText TagName="TagName.H1" TextStyle="TextStyle.H4" Text="Recovery code verification" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@inject NotificationService NotificationService
@inject IOptions<IdentityOptions> IdentityOptions

<IdentityPageTitle Title="Change Password" Breadcrumb="Account / Password" />
<AppPageTitle Title="Change Password" Breadcrumb="Account / Password" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
@inject ILogger<DeletePersonalData> Logger
@inject NotificationService NotificationService
@inject NavigationManager NavigationManager
@inject DialogService DialogService
@inject ConfirmService Confirm

<IdentityPageTitle Title="Delete Account" Breadcrumb="Account / Personal data" />
<AppPageTitle Title="Delete Account" Breadcrumb="Account / Personal data" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@inject NotificationService NotificationService
@inject AuthenticationStateProvider AuthenticationStateProvider

<IdentityPageTitle Title="Disable two-factor authentication (2FA)" Breadcrumb="Account / Two-factor authentication" />
<AppPageTitle Title="Disable two-factor authentication (2FA)" Breadcrumb="Account / Two-factor authentication" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@inject NavigationManager NavigationManager
@inject NotificationService NotificationService

<IdentityPageTitle Title="Manage Email" Breadcrumb="Account / Email" />
<AppPageTitle Title="Manage Email" Breadcrumb="Account / Email" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@inject NotificationService NotificationService
@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Configure authenticator app" Breadcrumb="Account / Two-factor authentication" />
<AppPageTitle Title="Configure authenticator app" Breadcrumb="Account / Two-factor authentication" />

@if (_recoveryCodes is not null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@inject NotificationService NotificationService
@inject AuthenticationStateProvider AuthenticationStateProvider

<IdentityPageTitle Title="Generate two-factor authentication (2FA) recovery codes" Breadcrumb="Account / Two-factor authentication" />
<AppPageTitle Title="Generate two-factor authentication (2FA) recovery codes" Breadcrumb="Account / Two-factor authentication" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@inject NavigationManager NavigationManager
@inject NotificationService NotificationService

<IdentityPageTitle Title="Register New Passkey" Breadcrumb="Account / Passkeys" />
<AppPageTitle Title="Register New Passkey" Breadcrumb="Account / Passkeys" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@inject ConfirmService Confirm
@inject NotificationService NotificationService

<IdentityPageTitle Title="Manage Passkeys" Breadcrumb="Account / Passkeys" />
<AppPageTitle Title="Manage Passkeys" Breadcrumb="Account / Passkeys" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@inject UserManager<User> UserManager
@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Personal Data" Breadcrumb="Account / Personal data" />
<AppPageTitle Title="Personal Data" Breadcrumb="Account / Personal data" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@inject UserManager<User> UserManager
@inject NotificationService NotificationService

<IdentityPageTitle Title="Profile" Breadcrumb="Account / Profile" />
<AppPageTitle Title="Profile" Breadcrumb="Account / Profile" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@inject NavigationManager NavigationManager
@inject NotificationService NotificationService

<IdentityPageTitle Title="Rename Passkey" Breadcrumb="Account / Passkeys" />
<AppPageTitle Title="Rename Passkey" Breadcrumb="Account / Passkeys" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Reset Authenticator Key" Breadcrumb="Account / Two-factor authentication" />
<AppPageTitle Title="Reset Authenticator Key" Breadcrumb="Account / Two-factor authentication" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@inject NotificationService NotificationService
@inject IOptions<IdentityOptions> IdentityOptions

<IdentityPageTitle Title="Set Password" Breadcrumb="Account / Password" />
<AppPageTitle Title="Set Password" Breadcrumb="Account / Password" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@inject UserManager<User> UserManager
@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Two-Factor Authentication" Breadcrumb="Account / Two-factor authentication" />
<AppPageTitle Title="Two-Factor Authentication" Breadcrumb="Account / Two-factor authentication" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@inject NotificationService NotificationService
@inject LoginTokenProtector LoginTokens

<IdentityPageTitle Title="Register" />
<AppPageTitle Title="Register" />

<div class="ag-login-head">
<RadzenText TagName="TagName.H1" TextStyle="TextStyle.H4" Text="Register" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@inject UserManager<User> UserManager
@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Register confirmation" />
<AppPageTitle Title="Register confirmation" />

<div class="rz-p-4 rz-p-md-8">
<RadzenCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@inject NavigationManager NavigationManager
@inject NotificationService NotificationService

<IdentityPageTitle Title="Resend email confirmation" />
<AppPageTitle Title="Resend email confirmation" />

<div class="ag-login-head">
<RadzenText TagName="TagName.H1" TextStyle="TextStyle.H4" Text="Resend email confirmation" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@inject NotificationService NotificationService
@inject IOptions<IdentityOptions> IdentityOptions

<IdentityPageTitle Title="Reset password" />
<AppPageTitle Title="Reset password" />

<div class="ag-login-head">
<RadzenText TagName="TagName.H1" TextStyle="TextStyle.H4" Text="Reset your password" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@inject NavigationManager NavigationManager

<IdentityPageTitle Title="Password reset" />
<AppPageTitle Title="Password reset" />

<div class="rz-p-4 rz-p-md-8">
<RadzenCard>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@inject DialogService DialogService
@inject ConfirmService Confirm
@inject UserManager<User> UserManager
@inject RoleManager<Role> RoleManager

Expand Down Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@attribute [Authorize(Roles = "Administrator")]

<IdentityPageTitle Title="Roles" Breadcrumb="Administration / Roles" />
<AppPageTitle Title="Roles" Breadcrumb="Administration / Roles" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@attribute [Authorize(Roles = "Administrator")]

<IdentityPageTitle Title="User Cleanup" Breadcrumb="Administration / User cleanup" />
<AppPageTitle Title="User Cleanup" Breadcrumb="Administration / User cleanup" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@attribute [Authorize(Roles = "Administrator")]

<IdentityPageTitle Title="Users" Breadcrumb="Administration / Users" />
<AppPageTitle Title="Users" Breadcrumb="Administration / Users" />

<div class="rz-p-4 rz-p-md-6">
<RadzenStack Gap="1.5rem">
Expand Down

This file was deleted.

11 changes: 11 additions & 0 deletions src/AndreGoepel.Marten.Identity.Blazor/Initialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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<DesignBlazorOptions>()
.Configure<IOptions<MartenIdentityBlazorOptions>>(
(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<IIdentityFeatureProvider, OptionsIdentityFeatureProvider>();
Expand Down
1 change: 0 additions & 1 deletion src/AndreGoepel.Marten.Identity.Blazor/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading