Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Refactor admin dashboard into separate components (#349)

Leendert de Borst65304b0f84e6
diff --git a/src/AliasVault.Admin/Main/Pages/Dashboard/Components/ActiveUsersCard.razor b/src/AliasVault.Admin/Main/Pages/Dashboard/Components/ActiveUsersCard.razor
new file mode 100644
index 000000000..d051e0aec
--- /dev/null
+++ b/src/AliasVault.Admin/Main/Pages/Dashboard/Components/ActiveUsersCard.razor
@@ -0,0 +1,137 @@
+<div class="p-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 sm:p-6 dark:bg-gray-800">
+ <div class="flex items-center justify-between mb-4">
+ <h3 class="text-lg font-semibold text-gray-900 dark:text-white">Active users</h3>
+ <button
+ @onclick="ToggleUserNames"
+ class="text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300">
+ @(ShowUserNames ? "Hide names" : "Show names")
+ </button>
+ </div>
+ @if (IsLoading)
+ {
+ <LoadingIndicator />
+ }
+ else
+ {
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
+ <div class="bg-green-50 dark:bg-green-900/30 p-4 rounded-lg">
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 24 hours</p>
+ <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@UserStats.Last24Hours</h4>
+ @if (ShowUserNames)
+ {
+ <div class="mt-2 text-sm text-gray-600 dark:text-gray-300">
+ <ul>
+ @foreach (var user in UserStats.Last24HourUsers)
+ {
+ <li>@user</li>
+ }
+ </ul>
+ </div>
+ }
+ </div>
+ <div class="bg-green-50 dark:bg-green-900/30 p-4 rounded-lg">
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 7 days</p>
+ <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@UserStats.Last7Days</h4>
+ @if (ShowUserNames)
+ {
+ <div class="mt-2 text-sm text-gray-600 dark:text-gray-300">
+ <ul>
+ @foreach (var user in UserStats.Last7DayUsers)
+ {
+ <li>@user</li>
+ }
+ </ul>
+ </div>
+ }
+ </div>
+ <div class="bg-green-50 dark:bg-green-900/30 p-4 rounded-lg">
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 14 days</p>
+ <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@UserStats.Last14Days</h4>
+ @if (ShowUserNames)
+ {
+ <div class="mt-2 text-sm text-gray-600 dark:text-gray-300">
+ <ul>
+ @foreach (var user in UserStats.Last14DayUsers)
+ {
+ <li>@user</li>
+ }
+ </ul>
+ </div>
+ }
+ </div>
+ </div>
+ }
+</div>
+
+@code {
+ private bool IsLoading { get; set; } = true;
+ private UserStatistics UserStats { get; set; } = new();
+ private bool ShowUserNames { get; set; }
+
+ /// <summary>
+ /// Refreshes the data displayed on the card.
+ /// </summary>
+ public async Task RefreshData()
+ {
+ IsLoading = true;
+ StateHasChanged();
+
+ var now = DateTime.UtcNow;
+ var last24Hours = now.AddHours(-24);
+ var last7Days = now.AddDays(-7);
+ var last14Days = now.AddDays(-14);
+
+ // Get user statistics
+ var (count24h, users24h) = await GetActiveUserCount(last24Hours);
+ var (count7d, users7d) = await GetActiveUserCount(last7Days);
+ var (count14d, users14d) = await GetActiveUserCount(last14Days);
+
+ UserStats = new UserStatistics
+ {
+ Last24Hours = count24h,
+ Last7Days = count7d,
+ Last14Days = count14d,
+ Last24HourUsers = users24h,
+ Last7DayUsers = users7d,
+ Last14DayUsers = users14d
+ };
+
+ IsLoading = false;
+ StateHasChanged();
+ }
+
+ private async Task<(int count, List<string> users)> GetActiveUserCount(DateTime since)
+ {
+ // Get unique users who either:
+ // 1. Have successful auth logs
+ // 2. Have updated their vault
+ var activeUsers = await DbContext.AuthLogs
+ .Where(l => l.Timestamp >= since && l.IsSuccess)
+ .Select(l => l.Username)
+ .Union(
+ DbContext.Vaults
+ .Where(v => v.UpdatedAt >= since)
+ .Select(v => v.User.UserName!)
+ )
+ .Distinct()
+ .ToListAsync();
+
+ return (activeUsers.Count, activeUsers);
+ }
+
+ private void ToggleUserNames()
+ {
+ ShowUserNames = !ShowUserNames;
+ StateHasChanged();
+ }
+
+ private sealed class UserStatistics
+ {
+ public int Last24Hours { get; set; }
+ public int Last7Days { get; set; }
+ public int Last14Days { get; set; }
+ public List<string> Last24HourUsers { get; set; } = new();
+ public List<string> Last7DayUsers { get; set; } = new();
+ public List<string> Last14DayUsers { get; set; } = new();
+ }
+}
diff --git a/src/AliasVault.Admin/Main/Pages/Dashboard/Components/EmailStatisticsCard.razor b/src/AliasVault.Admin/Main/Pages/Dashboard/Components/EmailStatisticsCard.razor
new file mode 100644
index 000000000..51402fdd1
--- /dev/null
+++ b/src/AliasVault.Admin/Main/Pages/Dashboard/Components/EmailStatisticsCard.razor
@@ -0,0 +1,64 @@
+<div class="p-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 sm:p-6 dark:bg-gray-800">
+ <div class="flex items-center justify-between mb-4">
+ <h3 class="text-lg font-semibold text-gray-900 dark:text-white">Recent emails received</h3>
+ </div>
+ @if (IsLoading)
+ {
+ <LoadingIndicator />
+ }
+ else
+ {
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
+ <div class="bg-primary-50 dark:bg-gray-700/50 p-4 rounded-lg">
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 24 hours</p>
+ <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@EmailStats.Last24Hours</h4>
+ </div>
+ <div class="bg-primary-50 dark:bg-gray-700/50 p-4 rounded-lg">
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 7 days</p>
+ <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@EmailStats.Last7Days</h4>
+ </div>
+ <div class="bg-primary-50 dark:bg-gray-700/50 p-4 rounded-lg">
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 14 days</p>
+ <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@EmailStats.Last14Days</h4>
+ </div>
+ </div>
+ }
+</div>
+
+@code {
+ private bool IsLoading { get; set; } = true;
+ private EmailStatistics EmailStats { get; set; } = new();
+
+ /// <summary>
+ /// Refreshes the data displayed on the card.
+ /// </summary>
+ public async Task RefreshData()
+ {
+ IsLoading = true;
+ StateHasChanged();
+
+ var now = DateTime.UtcNow;
+ var last24Hours = now.AddHours(-24);
+ var last7Days = now.AddDays(-7);
+ var last14Days = now.AddDays(-14);
+
+ // Get email statistics
+ var emailQuery = DbContext.Emails.AsQueryable();
+ EmailStats = new EmailStatistics
+ {
+ Last24Hours = await emailQuery.CountAsync(e => e.DateSystem >= last24Hours),
+ Last7Days = await emailQuery.CountAsync(e => e.DateSystem >= last7Days),
+ Last14Days = await emailQuery.CountAsync(e => e.DateSystem >= last14Days)
+ };
+
+ IsLoading = false;
+ StateHasChanged();
+ }
+
+ private sealed class EmailStatistics
+ {
+ public int Last24Hours { get; set; }
+ public int Last7Days { get; set; }
+ public int Last14Days { get; set; }
+ }
+}
diff --git a/src/AliasVault.Admin/Main/Pages/Dashboard/Components/RegistrationStatisticsCard.razor b/src/AliasVault.Admin/Main/Pages/Dashboard/Components/RegistrationStatisticsCard.razor
new file mode 100644
index 000000000..85be0dd3b
--- /dev/null
+++ b/src/AliasVault.Admin/Main/Pages/Dashboard/Components/RegistrationStatisticsCard.razor
@@ -0,0 +1,64 @@
+<div class="p-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 sm:p-6 dark:bg-gray-800">
+ <div class="flex items-center justify-between mb-4">
+ <h3 class="text-lg font-semibold text-gray-900 dark:text-white">User registrations</h3>
+ </div>
+ @if (IsLoading)
+ {
+ <LoadingIndicator />
+ }
+ else
+ {
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
+ <div class="bg-blue-50 dark:bg-blue-900/30 p-4 rounded-lg">
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 24 hours</p>
+ <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@RegistrationStats.Last24Hours</h4>
+ </div>
+ <div class="bg-blue-50 dark:bg-blue-900/30 p-4 rounded-lg">
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 7 days</p>
+ <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@RegistrationStats.Last7Days</h4>
+ </div>
+ <div class="bg-blue-50 dark:bg-blue-900/30 p-4 rounded-lg">
+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 14 days</p>
+ <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@RegistrationStats.Last14Days</h4>
+ </div>
+ </div>
+ }
+</div>
+
+@code {
+ private bool IsLoading { get; set; } = true;
+ private RegistrationStatistics RegistrationStats { get; set; } = new();
+
+ /// <summary>
+ /// Refreshes the data displayed on the card.
+ /// </summary>
+ public async Task RefreshData()
+ {
+ IsLoading = true;
+ StateHasChanged();
+
+ var now = DateTime.UtcNow;
+ var last24Hours = now.AddHours(-24);
+ var last7Days = now.AddDays(-7);
+ var last14Days = now.AddDays(-14);
+
+ // Get registration statistics
+ var registrationQuery = DbContext.AliasVaultUsers.AsQueryable();
+ RegistrationStats = new RegistrationStatistics
+ {
+ Last24Hours = await registrationQuery.CountAsync(u => u.CreatedAt >= last24Hours),
+ Last7Days = await registrationQuery.CountAsync(u => u.CreatedAt >= last7Days),
+ Last14Days = await registrationQuery.CountAsync(u => u.CreatedAt >= last14Days)
+ };
+
+ IsLoading = false;
+ StateHasChanged();
+ }
+
+ private sealed class RegistrationStatistics
+ {
+ public int Last24Hours { get; set; }
+ public int Last7Days { get; set; }
+ public int Last14Days { get; set; }
+ }
+}
diff --git a/src/AliasVault.Admin/Main/Pages/Dashboard/Index.razor b/src/AliasVault.Admin/Main/Pages/Dashboard/Index.razor
new file mode 100644
index 000000000..9b2459abe
--- /dev/null
+++ b/src/AliasVault.Admin/Main/Pages/Dashboard/Index.razor
@@ -0,0 +1,54 @@
+@page "/"
+@using AliasVault.Admin.Main.Pages.Dashboard.Components
+@inherits MainBase
+
+<LayoutPageTitle>Home</LayoutPageTitle>
+
+<PageHeader
+ BreadcrumbItems="@BreadcrumbItems"
+ Title="AliasVault Admin"
+ Description="Welcome to the AliasVault admin portal. Below you can find statistics about recent email activity and active users.">
+ <CustomActions>
+ <RefreshButton OnClick="RefreshData" ButtonText="Refresh" />
+ </CustomActions>
+</PageHeader>
+
+<div class="px-4">
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
+ <ActiveUsersCard @ref="_activeUsersCard" />
+ <RegistrationStatisticsCard @ref="_registrationStatisticsCard" />
+ <EmailStatisticsCard @ref="_emailStatisticsCard" />
+ </div>
+</div>
+
+@code {
+ private ActiveUsersCard? _activeUsersCard;
+ private RegistrationStatisticsCard? _registrationStatisticsCard;
+ private EmailStatisticsCard? _emailStatisticsCard;
+
+ /// <inheritdoc />
+ protected override async Task OnAfterRenderAsync(bool firstRender)
+ {
+ if (firstRender)
+ {
+ await RefreshData();
+ }
+ }
+
+ /// <summary>
+ /// Refreshes the data displayed on the cards.
+ /// </summary>
+ private async Task RefreshData()
+ {
+ if (_activeUsersCard != null &&
+ _registrationStatisticsCard != null &&
+ _emailStatisticsCard != null)
+ {
+ await Task.WhenAll(
+ _activeUsersCard.RefreshData(),
+ _registrationStatisticsCard.RefreshData(),
+ _emailStatisticsCard.RefreshData()
+ );
+ }
+ }
+}
diff --git a/src/AliasVault.Admin/Main/Pages/Home.razor b/src/AliasVault.Admin/Main/Pages/Home.razor
deleted file mode 100644
index 55d6a4b0d..000000000
--- a/src/AliasVault.Admin/Main/Pages/Home.razor
+++ /dev/null
@@ -1,236 +0,0 @@
-@page "/"
-@inherits MainBase
-
-<LayoutPageTitle>Home</LayoutPageTitle>
-
-<PageHeader
- BreadcrumbItems="@BreadcrumbItems"
- Title="AliasVault Admin"
- Description="Welcome to the AliasVault admin portal. Below you can find statistics about recent email activity and active users.">
- <CustomActions>
- <RefreshButton OnClick="RefreshData" ButtonText="Refresh" />
- </CustomActions>
-</PageHeader>
-
-<div class="px-4">
- @if (IsLoading)
- {
- <LoadingIndicator />
- }
- else
- {
- <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
- <!-- Active Users Card -->
- <div class="p-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 sm:p-6 dark:bg-gray-800">
- <div class="flex items-center justify-between mb-4">
- <h3 class="text-lg font-semibold text-gray-900 dark:text-white">Active users</h3>
- <button
- @onclick="ToggleUserNames"
- class="text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300">
- @(ShowUserNames ? "Hide names" : "Show names")
- </button>
- </div>
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
- <div class="bg-green-50 dark:bg-green-900/30 p-4 rounded-lg">
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 24 hours</p>
- <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@UserStats.Last24Hours</h4>
- @if (ShowUserNames)
- {
- <div class="mt-2 text-sm text-gray-600 dark:text-gray-300">
- <ul>
- @foreach (var user in UserStats.Last24HourUsers)
- {
- <li>@user</li>
- }
- </ul>
- </div>
- }
- </div>
- <div class="bg-green-50 dark:bg-green-900/30 p-4 rounded-lg">
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 7 days</p>
- <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@UserStats.Last7Days</h4>
- @if (ShowUserNames)
- {
- <div class="mt-2 text-sm text-gray-600 dark:text-gray-300">
- <ul>
- @foreach (var user in UserStats.Last7DayUsers)
- {
- <li>@user</li>
- }
- </ul>
- </div>
- }
- </div>
- <div class="bg-green-50 dark:bg-green-900/30 p-4 rounded-lg">
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 14 days</p>
- <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@UserStats.Last14Days</h4>
- @if (ShowUserNames)
- {
- <div class="mt-2 text-sm text-gray-600 dark:text-gray-300">
- <ul>
- @foreach (var user in UserStats.Last14DayUsers)
- {
- <li>@user</li>
- }
- </ul>
- </div>
- }
- </div>
- </div>
- </div>
-
- <!-- Registration Statistics Card -->
- <div class="p-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 sm:p-6 dark:bg-gray-800">
- <div class="flex items-center justify-between mb-4">
- <h3 class="text-lg font-semibold text-gray-900 dark:text-white">User registrations</h3>
- </div>
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
- <div class="bg-blue-50 dark:bg-blue-900/30 p-4 rounded-lg">
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 24 hours</p>
- <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@RegistrationStats.Last24Hours</h4>
- </div>
- <div class="bg-blue-50 dark:bg-blue-900/30 p-4 rounded-lg">
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 7 days</p>
- <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@RegistrationStats.Last7Days</h4>
- </div>
- <div class="bg-blue-50 dark:bg-blue-900/30 p-4 rounded-lg">
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 14 days</p>
- <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@RegistrationStats.Last14Days</h4>
- </div>
- </div>
- </div>
-
- <!-- Email Statistics Card -->
- <div class="p-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 sm:p-6 dark:bg-gray-800">
- <div class="flex items-center justify-between mb-4">
- <h3 class="text-lg font-semibold text-gray-900 dark:text-white">Recent emails received</h3>
- </div>
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
- <div class="bg-primary-50 dark:bg-gray-700/50 p-4 rounded-lg">
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 24 hours</p>
- <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@EmailStats.Last24Hours</h4>
- </div>
- <div class="bg-primary-50 dark:bg-gray-700/50 p-4 rounded-lg">
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 7 days</p>
- <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@EmailStats.Last7Days</h4>
- </div>
- <div class="bg-primary-50 dark:bg-gray-700/50 p-4 rounded-lg">
- <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last 14 days</p>
- <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@EmailStats.Last14Days</h4>
- </div>
- </div>
- </div>
- </div>
- }
-</div>
-
-@code {
- private bool IsLoading { get; set; } = true;
- private EmailStatistics EmailStats { get; set; } = new();
- private UserStatistics UserStats { get; set; } = new();
- private bool ShowUserNames { get; set; } = false;
- private RegistrationStatistics RegistrationStats { get; set; } = new();
-
- private class EmailStatistics
- {
- public int Last24Hours { get; set; }
- public int Last7Days { get; set; }
- public int Last14Days { get; set; }
- }
-
- private class UserStatistics
- {
- public int Last24Hours { get; set; }
- public int Last7Days { get; set; }
- public int Last14Days { get; set; }
- public List<string> Last24HourUsers { get; set; } = new();
- public List<string> Last7DayUsers { get; set; } = new();
- public List<string> Last14DayUsers { get; set; } = new();
- }
-
- private class RegistrationStatistics
- {
- public int Last24Hours { get; set; }
- public int Last7Days { get; set; }
- public int Last14Days { get; set; }
- }
-
- /// <inheritdoc />
- protected override async Task OnInitializedAsync()
- {
- await base.OnInitializedAsync();
- await RefreshData();
- }
-
- private async Task RefreshData()
- {
- IsLoading = true;
- StateHasChanged();
-
- var now = DateTime.UtcNow;
- var last24Hours = now.AddHours(-24);
- var last7Days = now.AddDays(-7);
- var last14Days = now.AddDays(-14);
-
- // Get email statistics
- var emailQuery = DbContext.Emails.AsQueryable();
- EmailStats = new EmailStatistics
- {
- Last24Hours = await emailQuery.CountAsync(e => e.DateSystem >= last24Hours),
- Last7Days = await emailQuery.CountAsync(e => e.DateSystem >= last7Days),
- Last14Days = await emailQuery.CountAsync(e => e.DateSystem >= last14Days)
- };
-
- // Get user statistics
- var (count24h, users24h) = await GetActiveUserCount(last24Hours);
- var (count7d, users7d) = await GetActiveUserCount(last7Days);
- var (count14d, users14d) = await GetActiveUserCount(last14Days);
-
- UserStats = new UserStatistics
- {
- Last24Hours = count24h,
- Last7Days = count7d,
- Last14Days = count14d,
- Last24HourUsers = users24h,
- Last7DayUsers = users7d,
- Last14DayUsers = users14d
- };
-
- // Get registration statistics
- var registrationQuery = DbContext.AliasVaultUsers.AsQueryable();
- RegistrationStats = new RegistrationStatistics
- {
- Last24Hours = await registrationQuery.CountAsync(u => u.CreatedAt >= last24Hours),
- Last7Days = await registrationQuery.CountAsync(u => u.CreatedAt >= last7Days),
- Last14Days = await registrationQuery.CountAsync(u => u.CreatedAt >= last14Days)
- };
-
- IsLoading = false;
- StateHasChanged();
- }
-
- private async Task<(int count, List<string> users)> GetActiveUserCount(DateTime since)
- {
- // Get unique users who either:
- // 1. Have successful auth logs
- // 2. Have updated their vault
- var activeUsers = await DbContext.AuthLogs
- .Where(l => l.Timestamp >= since && l.IsSuccess)
- .Select(l => l.Username)
- .Union(
- DbContext.Vaults
- .Where(v => v.UpdatedAt >= since)
- .Select(v => v.User.UserName!)
- )
- .Distinct()
- .ToListAsync();
-
- return (activeUsers.Count, activeUsers);
- }
-
- private void ToggleUserNames()
- {
- ShowUserNames = !ShowUserNames;
- StateHasChanged();
- }
-}
diff --git a/src/AliasVault.Admin/Main/Pages/MainBase.cs b/src/AliasVault.Admin/Main/Pages/MainBase.cs
index 9b3ff31f7..dd4ef5de9 100644
--- a/src/AliasVault.Admin/Main/Pages/MainBase.cs
+++ b/src/AliasVault.Admin/Main/Pages/MainBase.cs
@@ -23,7 +23,7 @@ using Microsoft.JSInterop;
/// Also, a default set of breadcrumbs is added in the parent OnInitialized method.
/// </summary>
[Authorize]
-public class MainBase : OwningComponentBase
+public abstract class MainBase : OwningComponentBase
{
/// <summary>
/// Gets or sets the NavigationService instance responsible for handling navigation, replaces the default NavigationManager.
diff --git a/src/AliasVault.Client/Main/Pages/MainBase.cs b/src/AliasVault.Client/Main/Pages/MainBase.cs
index b99dae4de..072ba5986 100644
--- a/src/AliasVault.Client/Main/Pages/MainBase.cs
+++ b/src/AliasVault.Client/Main/Pages/MainBase.cs
@@ -19,7 +19,7 @@ using Microsoft.AspNetCore.Components.Authorization;
/// All pages that inherit from this class will receive default injected components that are used globally.
/// Also, a default set of breadcrumbs is added in the parent OnInitialized method.
/// </summary>
-public class MainBase : OwningComponentBase
+public abstract class MainBase : OwningComponentBase
{
private const string ReturnUrlKey = "returnUrl";
private bool _parametersInitialSet;