Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update admin dashboard to include service status and remove active users chart (#2159)
Leendert de Borst6e9d7e142f26
diff --git a/apps/server/AliasVault.Admin/Main/Components/WorkerStatus/ServiceControl.razor b/apps/server/AliasVault.Admin/Main/Components/WorkerStatus/ServiceControl.razordeleted file mode 100644index 6a60fdd2f..000000000--- a/apps/server/AliasVault.Admin/Main/Components/WorkerStatus/ServiceControl.razor+++ /dev/null@@ -1,288 +0,0 @@-@using AliasVault.WorkerStatus.Database-@inherits MainBase--@foreach (var service in Services)-{- <button @onclick="() => ServiceClick(service.Name)"- class="@GetServiceButtonClasses(service) mx-3 inline-flex items-center justify-center rounded-xl px-8 py-2 text-white"- disabled="@(!service.IsHeartBeatValid)"- title="@GetButtonTooltip(service)">- <span>@service.DisplayName</span>- @if (service.IsHeartBeatValid && service.CurrentStatus != service.DesiredStatus && !string.IsNullOrEmpty(service.DesiredStatus))- {- <svg class="animate-spin ml-2 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">- <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>- <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>- </svg>- }- </button>-}--@code {- /// <summary>- /// The names of the services to display.- /// </summary>- [Parameter]- public List<string> ServiceNames { get; set; } = ["AliasVault.SmtpService", "AliasVault.TaskRunner"];-- /// <summary>- /// The display names of the services to display.- /// </summary>- [Parameter]- public Dictionary<string, string> ServiceDisplayNames { get; set; } = new();-- /// <summary>- /// The statuses of the services.- /// </summary>- private List<WorkerServiceStatus> ServiceStatus = [];-- /// <summary>- /// Whether the page is initializing.- /// </summary>- private bool InitInProgress;-- /// <summary>- /// The interval to refresh the page.- /// </summary>- private readonly int AutoRefreshInterval = 5000;- private CancellationTokenSource? _timerCancellationTokenSource;-- /// <summary>- /// The state of a service.- /// </summary>- private sealed class ServiceState- {- public string Name { get; set; } = "";- public string DisplayName { get; set; } = "";- public string CurrentStatus { get; set; } = "";- public string DesiredStatus { get; set; } = "";- public bool IsHeartBeatValid { get; set; }- }-- private List<ServiceState> Services { get; set; } = [];-- /// <inheritdoc />- protected override async Task OnInitializedAsync()- {- Services = ServiceNames.Select(name => new ServiceState- {- Name = name,- DisplayName = ServiceDisplayNames.GetValueOrDefault(name, name)- }).ToList();-- await base.OnInitializedAsync();- }-- /// <inheritdoc />- protected override async Task OnAfterRenderAsync(bool firstRender)- {- await base.OnAfterRenderAsync(firstRender);-- if (firstRender)- {- _timerCancellationTokenSource = new CancellationTokenSource();- _ = RunPeriodicRefreshAsync(_timerCancellationTokenSource.Token);- }- }-- /// <inheritdoc />- protected override void Dispose(bool disposing)- {- base.Dispose(disposing);-- if (disposing)- {- _timerCancellationTokenSource?.Cancel();- _timerCancellationTokenSource?.Dispose();- }- }-- /// <summary>- /// Checks if the heartbeat is valid (within the last 5 minutes).- /// </summary>- private static bool IsHeartbeatValid(DateTime lastHeartbeat)- {- return DateTime.UtcNow <= lastHeartbeat.AddMinutes(5);- }-- /// <summary>- /// Gets the CSS classes for a service button based on its current state.- /// </summary>- private static string GetServiceButtonClasses(ServiceState service)- {- string buttonClass = "cursor-pointer ";-- if (!service.IsHeartBeatValid)- {- buttonClass += "bg-gray-600";- }- else if (service.CurrentStatus == "Started" && (service.DesiredStatus == string.Empty || service.DesiredStatus == "Started"))- {- buttonClass += "bg-green-600";- }- else if (service.CurrentStatus == "Stopping" || (service.DesiredStatus == "Stopped" && service.CurrentStatus != service.DesiredStatus))- {- buttonClass += "bg-red-500";- }- else if (service.CurrentStatus == "Starting" || (service.DesiredStatus == "Started" && service.CurrentStatus != service.DesiredStatus))- {- buttonClass += "bg-emerald-500";- }- else if (service.CurrentStatus == "Stopped" && (service.DesiredStatus == string.Empty || service.DesiredStatus == "Stopped"))- {- buttonClass += "bg-red-600";- }-- return buttonClass;- }-- /// <summary>- /// Gets the tooltip text for a service button based on its last heartbeat.- /// </summary>- private static string GetButtonTooltip(ServiceState service)- {- if (!service.IsHeartBeatValid)- {- return "Heartbeat offline";- }-- var statusMessages = new Dictionary<string, string>- {- { "Started", "Service is running" },- { "Starting", "Service is starting..." },- { "Stopped", "Service is stopped" },- { "Stopping", "Service is stopping..." }- };-- return statusMessages.GetValueOrDefault(service.CurrentStatus, string.Empty);- }-- /// <summary>- /// Handles a click on a service button.- /// </summary>- private async Task ServiceClick(string serviceName)- {- var service = Services.First(s => s.Name == serviceName);-- if (!service.IsHeartBeatValid)- {- return;- }-- // If service not started and not starting, clicking should start it. Otherwise, stop it.- if (service.CurrentStatus == "Started" || service.DesiredStatus == "Started")- {- // Show confirmation modal before stopping a service.- var confirmed = await ConfirmModalService.ShowConfirmation(- "Stop " + service.DisplayName + "?",- "Are you sure you want to stop the " + service.DisplayName + " service?\n\nThe service will be unavailable until it is started again.",- "Stop service",- "Cancel");-- if (!confirmed)- {- return;- }-- service.DesiredStatus = "Stopped";- }- else- {- service.DesiredStatus = "Started";- }- StateHasChanged();-- await UpdateServiceStatus(serviceName, service.DesiredStatus);- service.CurrentStatus = service.DesiredStatus;-- StateHasChanged();- }-- /// <summary>- /// Initializes the page.- /// </summary>- private async Task InitPage()- {- if (InitInProgress)- {- return;- }-- try- {- InitInProgress = true;- await using var dbContext = await DbContextFactory.CreateDbContextAsync();- ServiceStatus = await dbContext.WorkerServiceStatuses.ToListAsync();-- foreach (var service in Services)- {- var entry = ServiceStatus.Find(x => x.ServiceName == service.Name);- if (entry != null)- {- service.IsHeartBeatValid = IsHeartbeatValid(entry.Heartbeat);- service.CurrentStatus = entry.CurrentStatus;- service.DesiredStatus = entry.DesiredStatus;- }- else- {- // No record exists - service hasn't started yet or database issue.- // Show as offline/stopped state so the button displays red (not transparent).- service.IsHeartBeatValid = false;- service.CurrentStatus = "Stopped";- service.DesiredStatus = string.Empty;- }- }-- await InvokeAsync(StateHasChanged);- }- finally- {- InitInProgress = false;- }- }-- /// <summary>- /// Updates the status of a service.- /// </summary>- private async Task<bool> UpdateServiceStatus(string serviceName, string desiredStatus)- {- await using var dbContext = await DbContextFactory.CreateDbContextAsync();- var entry = await dbContext.WorkerServiceStatuses.Where(x => x.ServiceName == serviceName).FirstOrDefaultAsync();- if (entry != null)- {- entry.DesiredStatus = desiredStatus;- await dbContext.SaveChangesAsync();-- var timeout = DateTime.UtcNow.AddSeconds(30);- while (true)- {- if (DateTime.UtcNow > timeout)- {- return false;- }-- await using var dbContextInner = await DbContextFactory.CreateDbContextAsync();- var check = await dbContextInner.WorkerServiceStatuses.Where(x => x.ServiceName == serviceName).FirstAsync();- if (check.CurrentStatus == entry.DesiredStatus)- {- return true;- }- await Task.Delay(1000);- }- }-- return false;- }-- /// <summary>- /// Refreshes the service status periodically.- /// </summary>- private async Task RunPeriodicRefreshAsync(CancellationToken cancellationToken)- {- while (!cancellationToken.IsCancellationRequested)- {- await InitPage();- await Task.Delay(AutoRefreshInterval, cancellationToken);- }- }-}diff --git a/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Components/ActiveUsersChart.razor b/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Components/ActiveUsersChart.razordeleted file mode 100644index 64c31f5a3..000000000--- a/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Components/ActiveUsersChart.razor+++ /dev/null@@ -1,140 +0,0 @@-@rendermode InteractiveServer-@using AliasVault.Shared.Server.Models-@using AliasVault.Shared.Server.Services-@inject ServerSettingsService SettingsService--<div class="md:col-span-2 p-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 sm:p-6 dark:bg-gray-800 max-h-[500px]">- @if (IsLoading)- {- <LoadingIndicator />- }- else- {- <ApexChart TItem="DailyUserCount"- Title="@($"User activity - last {DaysToShow} days")"- Height="400">- <ApexPointSeries TItem="DailyUserCount"- Items="TotalDailyUserCounts"- SeriesType="@SeriesType.Area"- Name="Total Active Users"- XValue="@(e => e.Date.ToString("MM-dd"))"- YValue="@(e => e.Count)" />- <ApexPointSeries TItem="DailyUserCount"- Items="DailyUserCounts"- SeriesType="@SeriesType.Area"- Name="Returning Users"- XValue="@(e => e.Date.ToString("MM-dd"))"- YValue="@(e => e.Count)" />-- <ApexPointSeries TItem="DailyUserCount"- Items="NewUserRegistrations"- SeriesType="@SeriesType.Area"- Name="New Registrations"- XValue="@(e => e.Date.ToString("MM-dd"))"- YValue="@(e => e.Count)" />- </ApexChart>- }-</div>---@code {- private bool IsLoading { get; set; } = true;- private List<DailyUserCount> DailyUserCounts = new();- private List<DailyUserCount> TotalDailyUserCounts = new();- private List<DailyUserCount> NewUserRegistrations = new();- private int DaysToShow { get; set; } = 30;- private ServerSettingsModel Settings { get; set; } = new();-- /// <inheritdoc/>- protected override async Task OnInitializedAsync()- {- Settings = await SettingsService.GetAllSettingsAsync();-- // Set the number of days to show to the auth log retention days up to a maximum of 60 days (for performance reasons).- int maxDays = Math.Min(Settings.AuthLogRetentionDays, 60);-- // If the auth log retention days is 0 (unlimited), set the number of days to show to 60.- DaysToShow = maxDays == 0 ? 60 : maxDays;- }-- /// <summary>- /// Refreshes the data displayed on the card.- /// </summary>- public async Task RefreshData()- {- IsLoading = true;- StateHasChanged();-- // Get daily active user counts for the past 14 days- await GetDailyActiveUserCounts();-- IsLoading = false;- StateHasChanged();- }-- /// <summary>- /// Get daily active user counts for up to the last 90 days to display on the chart.- /// </summary>- private async Task GetDailyActiveUserCounts()- {- DailyUserCounts = new List<DailyUserCount>();- TotalDailyUserCounts = new List<DailyUserCount>();- NewUserRegistrations = new List<DailyUserCount>();- await using var dbContext = await DbContextFactory.CreateDbContextAsync();-- // Define the date range (defaults to amount of days in auth log retention, with a maximum of 90 days)- var endDate = DateTime.UtcNow.Date;- var startDate = endDate.AddDays(-DaysToShow);-- // Get total active users (all users who logged in based on auth logs)- var totalUsersByDay = await dbContext.AuthLogs- .Where(l => l.Timestamp >= startDate && l.Timestamp < endDate && l.IsSuccess && l.Username != "admin")- .GroupBy(x => x.Timestamp.Date)- .Select(g => new { Day = g.Key, Count = g.Select(x => x.Username).Distinct().Count() })- .ToListAsync();-- // Get new user registrations by day- var newUsersByDay = await dbContext.AliasVaultUsers- .Where(u => u.CreatedAt >= startDate && u.CreatedAt < endDate && u.UserName != "admin")- .GroupBy(u => u.CreatedAt.Date)- .Select(g => new { Day = g.Key, Count = g.Count() })- .ToListAsync();-- // Fill in the results for all days- for (int i = 0; i < DaysToShow; i++)- {- // Subtract 1 day to avoid showing the current day as those numbers are not complete yet.- var day = endDate.AddDays(-i - 1);-- var totalActiveCount = totalUsersByDay.FirstOrDefault(d => d.Day == day)?.Count ?? 0;- var registeredUsersCount = newUsersByDay.FirstOrDefault(d => d.Day == day)?.Count ?? 0;-- // Calculate the number of returning users by subtracting the number of users registered that day from the total active users.- var returningUsersCount = totalActiveCount - registeredUsersCount;-- DailyUserCounts.Add(new DailyUserCount- {- Date = day,- Count = returningUsersCount- });-- TotalDailyUserCounts.Add(new DailyUserCount- {- Date = day,- Count = totalActiveCount- });-- NewUserRegistrations.Add(new DailyUserCount- {- Date = day,- Count = registeredUsersCount- });- }- }-- private sealed class DailyUserCount- {- public DateTime Date { get; set; }- public int Count { get; set; }- }-}diff --git a/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Components/RecentActiveUsersCard.razor b/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Components/RecentActiveUsersCard.razornew file mode 100644index 000000000..2fe0f989d--- /dev/null+++ b/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Components/RecentActiveUsersCard.razor@@ -0,0 +1,99 @@+@using AliasVault.RazorComponents.Tables+@using AliasVault.RazorComponents.Utilities+@inject NavigationManager NavigationManager++<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">Recently active users</h3>+ <a href="users" class="text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300">View all users</a>+ </div>+ @if (IsLoading)+ {+ <LoadingIndicator />+ }+ else if (Users.Count == 0)+ {+ <p class="text-sm text-gray-500 dark:text-gray-400">No user activity has been recorded yet.</p>+ }+ else+ {+ <SortableTable Columns="@_tableColumns">+ @foreach (var user in Users)+ {+ <SortableTableRow OnClick="@(() => NavigateToUser(user.User.UserId!))">+ <SortableTableColumn IsPrimary="true">+ <UserNameDisplay User="@user.User" AsLink="false" />+ </SortableTableColumn>+ <SortableTableColumn>@user.CredentialCount.ToString("N0")</SortableTableColumn>+ <SortableTableColumn>@user.EmailClaimCount.ToString("N0")</SortableTableColumn>+ <SortableTableColumn Title="@(user.LastActivityDate.ToString("yyyy-MM-dd HH:mm") + " UTC")">@RelativeTimeFormatter.Format(user.LastActivityDate)</SortableTableColumn>+ </SortableTableRow>+ }+ </SortableTable>+ }+</div>++@code {+ /// <summary>+ /// Number of users shown on the card.+ /// </summary>+ private const int UserCount = 4;++ private readonly List<TableColumn> _tableColumns = [+ new TableColumn { Title = "Username", Sortable = false },+ new TableColumn { Title = "# Credentials", Sortable = false },+ new TableColumn { Title = "# Email aliases", Sortable = false },+ new TableColumn { Title = "Last Activity", Sortable = false },+ ];++ private bool IsLoading { get; set; } = true;+ private List<RecentUser> Users { get; set; } = [];++ /// <summary>+ /// Refreshes the data displayed on the card.+ /// </summary>+ public async Task RefreshData()+ {+ IsLoading = true;+ StateHasChanged();++ await using var dbContext = await DbContextFactory.CreateDbContextAsync();+ var users = await dbContext.AliasVaultUsers+ .Where(u => u.LastActivityDate != null)+ .OrderByDescending(u => u.LastActivityDate)+ .Take(UserCount)+ .Select(u => new+ {+ u.Id,+ u.UserName,+ u.Blocked,+ u.TwoFactorEnabled,+ LastActivityDate = u.LastActivityDate!.Value,+ CredentialCount = dbContext.VaultManifests.Where(m => m.OwnerGroupId == u.PersonalGroupId).Sum(m => m.CredentialsCount),+ EmailClaimCount = dbContext.EmailClaimLinks.Count(l => l.State != EmailClaimLinkState.Removed && l.VaultManifest.OwnerGroupId == u.PersonalGroupId),+ })+ .ToListAsync();++ Users = users.Select(u => new RecentUser(+ new UserDisplay { UserId = u.Id, UserName = u.UserName?.ToLower(), Blocked = u.Blocked, TwoFactorEnabled = u.TwoFactorEnabled },+ u.CredentialCount,+ u.EmailClaimCount,+ u.LastActivityDate)).ToList();++ IsLoading = false;+ StateHasChanged();+ }++ /// <summary>+ /// Navigates to the user detail page.+ /// </summary>+ private void NavigateToUser(string userId)+ {+ NavigationManager.NavigateTo($"users/{userId}");+ }++ /// <summary>+ /// A user row on the card.+ /// </summary>+ private sealed record RecentUser(UserDisplay User, int CredentialCount, int EmailClaimCount, DateTime LastActivityDate);+}diff --git a/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Components/ServiceStatusCard.razor b/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Components/ServiceStatusCard.razornew file mode 100644index 000000000..a3c6333eb--- /dev/null+++ b/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Components/ServiceStatusCard.razor@@ -0,0 +1,191 @@+@using AliasVault.RazorComponents.Utilities+@using AliasVault.Shared.Models.Enums+@using AliasVault.WorkerStatus+@using AliasVault.WorkerStatus.Database++<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">Service status</h3>+ </div>+ @if (IsLoading)+ {+ <LoadingIndicator />+ }+ else+ {+ <div class="grid grid-cols-1 sm:grid-cols-2 gap-4">+ @foreach (var service in Services)+ {+ <div class="@service.TileClasses p-4 rounded-lg">+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400">@service.DisplayName</p>+ <div class="flex items-center gap-2">+ <span class="@service.DotClasses w-3 h-3 rounded-full"></span>+ <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@service.Label</h4>+ </div>+ <p class="text-sm text-gray-600 dark:text-gray-400" title="@service.Description">Last heartbeat: @RelativeTimeFormatter.Format(service.LastHeartbeat)</p>+ </div>+ }+ </div>+ <a href="maintenance" class="@Maintenance.TileClasses block p-4 mt-4 rounded-lg hover:opacity-90 transition-opacity">+ <p class="text-sm font-medium text-gray-500 dark:text-gray-400">Last maintenance run</p>+ <div class="flex items-center gap-2">+ <span class="@Maintenance.DotClasses w-3 h-3 rounded-full"></span>+ <h4 class="text-2xl font-bold text-gray-900 dark:text-white">@Maintenance.Label</h4>+ </div>+ <p class="text-sm text-gray-600 dark:text-gray-400" title="@Maintenance.Tooltip">@Maintenance.Description</p>+ </a>+ }+</div>++@code {+ /// <summary>+ /// A service whose last heartbeat is older than this is reported as offline.+ /// </summary>+ private static readonly TimeSpan HeartbeatTimeout = TimeSpan.FromMinutes(1);++ /// <summary>+ /// Interval at which the card polls the heartbeat records.+ /// </summary>+ private static readonly TimeSpan AutoRefreshInterval = TimeSpan.FromSeconds(10);++ /// <summary>+ /// A maintenance run that started longer ago than this is reported as overdue.+ /// </summary>+ private static readonly TimeSpan MaintenanceOverdueAfter = TimeSpan.FromHours(25);++ /// <summary>+ /// The monitored services keyed by the name they heartbeat under, with the name shown to the admin.+ /// </summary>+ private static readonly Dictionary<string, string> MonitoredServices = new()+ {+ { "AliasVault.SmtpService", "SMTP service" },+ { "AliasVault.TaskRunner", "Task runner" },+ };++ private bool IsLoading { get; set; } = true;+ private List<ServiceState> Services { get; set; } = [];+ private MaintenanceState Maintenance { get; set; } = null!;+ private CancellationTokenSource? _refreshCancellationTokenSource;++ /// <summary>+ /// Refreshes the data displayed on the card.+ /// </summary>+ public async Task RefreshData()+ {+ await using var dbContext = await DbContextFactory.CreateDbContextAsync();+ var entries = await dbContext.WorkerServiceStatuses.AsNoTracking().ToListAsync();+ var lastJob = await dbContext.TaskRunnerJobs.AsNoTracking()+ .Where(j => j.Status != TaskRunnerJobStatus.Pending)+ .OrderByDescending(j => j.RunDate)+ .ThenByDescending(j => j.StartTime)+ .FirstOrDefaultAsync();++ Services = MonitoredServices.Select(s => BuildState(s.Value, entries.Find(e => e.ServiceName == s.Key))).ToList();+ Maintenance = BuildMaintenanceState(lastJob);+ IsLoading = false;+ await InvokeAsync(StateHasChanged);+ }++ /// <inheritdoc />+ protected override async Task OnAfterRenderAsync(bool firstRender)+ {+ await base.OnAfterRenderAsync(firstRender);++ if (firstRender)+ {+ _refreshCancellationTokenSource = new CancellationTokenSource();+ _ = RunPeriodicRefreshAsync(_refreshCancellationTokenSource.Token);+ }+ }++ /// <inheritdoc />+ protected override void Dispose(bool disposing)+ {+ base.Dispose(disposing);++ if (disposing)+ {+ _refreshCancellationTokenSource?.Cancel();+ _refreshCancellationTokenSource?.Dispose();+ }+ }++ /// <summary>+ /// Derives what to show for a service from its heartbeat record.+ /// </summary>+ private static ServiceState BuildState(string displayName, WorkerServiceStatus? entry)+ {+ if (entry is null)+ {+ return new ServiceState(displayName, "Unknown", "No heartbeat has been recorded for this service yet.", null, "bg-gray-50 dark:bg-gray-700/50", "bg-gray-400");+ }++ if (DateTime.UtcNow - entry.Heartbeat > HeartbeatTimeout)+ {+ return new ServiceState(displayName, "Offline", "The service has not sent a heartbeat recently.", entry.Heartbeat, "bg-red-50 dark:bg-red-900/30", "bg-red-500");+ }++ return entry.CurrentStatus switch+ {+ nameof(Status.Started) => new ServiceState(displayName, "Running", "All workers of the service are running.", entry.Heartbeat, "bg-green-50 dark:bg-green-900/30", "bg-green-500"),+ nameof(Status.Starting) => new ServiceState(displayName, "Starting", "The service is alive but not all of its workers are running yet.", entry.Heartbeat, "bg-yellow-50 dark:bg-yellow-900/30", "bg-yellow-400"),+ nameof(Status.Stopped) => new ServiceState(displayName, "Stopped", "The service shut down.", entry.Heartbeat, "bg-red-50 dark:bg-red-900/30", "bg-red-500"),+ _ => new ServiceState(displayName, entry.CurrentStatus, "The service reported an unknown status.", entry.Heartbeat, "bg-gray-50 dark:bg-gray-700/50", "bg-gray-400"),+ };+ }++ /// <summary>+ /// Derives what to show for the last maintenance run. A run that is overdue or did not succeed is flagged.+ /// </summary>+ private static MaintenanceState BuildMaintenanceState(TaskRunnerJob? job)+ {+ if (job is null)+ {+ return new MaintenanceState("Never", "No maintenance run has been recorded yet.", null, "bg-red-50 dark:bg-red-900/30", "bg-red-500");+ }++ var startedAt = job.RunDate.Date + job.StartTime.ToTimeSpan();+ var label = RelativeTimeFormatter.Format(startedAt);+ var isOverdue = DateTime.UtcNow - startedAt > MaintenanceOverdueAfter;+ var tooltip = $"Started at {startedAt:yyyy-MM-dd HH:mm} UTC";++ return job.Status switch+ {+ TaskRunnerJobStatus.Error => new MaintenanceState(label, "The last run failed.", $"{tooltip}. {job.ErrorMessage}", "bg-red-50 dark:bg-red-900/30", "bg-red-500"),+ TaskRunnerJobStatus.Canceled => new MaintenanceState(label, "The last run was canceled.", $"{tooltip}. {job.ErrorMessage}", "bg-yellow-50 dark:bg-yellow-900/30", "bg-yellow-400"),+ TaskRunnerJobStatus.Running when isOverdue => new MaintenanceState(label, "Running (overdue).", tooltip, "bg-red-50 dark:bg-red-900/30", "bg-red-500"),+ TaskRunnerJobStatus.Running => new MaintenanceState(label, "A maintenance run is currently in progress.", tooltip, "bg-blue-50 dark:bg-blue-900/30", "bg-blue-500"),+ _ when isOverdue => new MaintenanceState(label, "Maintenance has not run in the last 24 hours.", tooltip, "bg-yellow-50 dark:bg-yellow-900/30", "bg-yellow-400"),+ _ => new MaintenanceState(label, "The last run completed successfully.", tooltip, "bg-green-50 dark:bg-green-900/30", "bg-green-500"),+ };+ }++ /// <summary>+ /// Polls the heartbeat records until the card is disposed.+ /// </summary>+ private async Task RunPeriodicRefreshAsync(CancellationToken cancellationToken)+ {+ while (!cancellationToken.IsCancellationRequested)+ {+ try+ {+ await Task.Delay(AutoRefreshInterval, cancellationToken);+ await RefreshData();+ }+ catch (OperationCanceledException)+ {+ return;+ }+ }+ }++ /// <summary>+ /// What the card shows for one service.+ /// </summary>+ private sealed record ServiceState(string DisplayName, string Label, string Description, DateTime? LastHeartbeat, string TileClasses, string DotClasses);++ /// <summary>+ /// What the card shows for the last maintenance run.+ /// </summary>+ private sealed record MaintenanceState(string Label, string Description, string? Tooltip, string TileClasses, string DotClasses);+}diff --git a/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Index.razor b/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Index.razorindex 9c04d4b27..29949dc86 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Index.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Dashboard/Index.razor@@ -1,4 +1,4 @@-@page "/"+@page "/"@using AliasVault.Admin.Main.Pages.Dashboard.Components@inherits MainBase@@ -7,7 +7,7 @@<PageHeaderBreadcrumbItems="@BreadcrumbItems"Title="AliasVault Admin"- Description="Welcome to the AliasVault admin dashboard. Below you can find statistics about recent activity on this server.">+ Description="Welcome to the AliasVault admin dashboard. Below you can find the most recent activity, status and statistics for this server."><CustomActions><a href="all-time-stats" class="inline-flex items-center px-3 py-2 text-sm font-medium text-gray-600 bg-gray-100 border border-gray-300 rounded-md hover:bg-gray-200 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:text-gray-200"><svg class="w-4 h-4 sm:mr-2" fill="currentColor" viewBox="0 0 20 20">@@ -21,7 +21,8 @@<div class="px-4"><div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">- <ActiveUsersChart @ref="_activeUsersChart" />+ <RecentActiveUsersCard @ref="_recentActiveUsersCard" />+ <ServiceStatusCard @ref="_serviceStatusCard" /><ActiveUsersCard @ref="_activeUsersCard" /><RegistrationStatisticsCard @ref="_registrationStatisticsCard" /><EmailStatisticsCard @ref="_emailStatisticsCard" />@@ -30,7 +31,8 @@</div>@code {- private ActiveUsersChart? _activeUsersChart;+ private ServiceStatusCard? _serviceStatusCard;+ private RecentActiveUsersCard? _recentActiveUsersCard;private ActiveUsersCard? _activeUsersCard;private RegistrationStatisticsCard? _registrationStatisticsCard;private EmailStatisticsCard? _emailStatisticsCard;@@ -44,7 +46,7 @@// Check if 2FA is enabled. If not, show a one-time warning on the dashboard.if (!UserService.User().TwoFactorEnabled){- GlobalNotificationService.AddWarningMessage("Two-factor authentication is not enabled. It is recommended to enable it in Account Settings for better security.", true);+ GlobalNotificationService.AddWarningMessage("Two-factor authentication is not enabled for this admin account. It is recommended to enable it in Account Settings for better security.", true);}}@@ -64,14 +66,16 @@/// </summary>private async Task RefreshData(){- if (_activeUsersChart != null &&+ if (_serviceStatusCard != null &&+ _recentActiveUsersCard != null &&_activeUsersCard != null &&_registrationStatisticsCard != null &&_emailStatisticsCard != null &&_emailClaimsCard != null){await Task.WhenAll(- _activeUsersChart.RefreshData(),+ _serviceStatusCard.RefreshData(),+ _recentActiveUsersCard.RefreshData(),_activeUsersCard.RefreshData(),_registrationStatisticsCard.RefreshData(),_emailStatisticsCard.RefreshData(),diff --git a/apps/server/AliasVault.Admin/Main/Pages/Emails.razor b/apps/server/AliasVault.Admin/Main/Pages/Emails.razorindex bf7a78f7e..114d928bb 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Emails.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Emails.razor@@ -73,7 +73,7 @@ elseprivate readonly List<TableColumn> _tableColumns = [new TableColumn { Title = "ID", PropertyName = "Id" },- new TableColumn { Title = "Time", PropertyName = "DateSystem" },+ new TableColumn { Title = "Time (UTC)", PropertyName = "DateSystem" },new TableColumn { Title = "From", PropertyName = "From" },new TableColumn { Title = "To", PropertyName = "To" },new TableColumn { Title = "Vault", Sortable = false },diff --git a/apps/server/AliasVault.Admin/Main/Pages/Logging/Auth.razor b/apps/server/AliasVault.Admin/Main/Pages/Logging/Auth.razorindex e65ee4c7d..b8b41d5dd 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Logging/Auth.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Logging/Auth.razor@@ -93,7 +93,7 @@ else@code {private readonly List<TableColumn> _tableColumns = [new TableColumn { Title = "ID", PropertyName = "Id" },- new TableColumn { Title = "Time", PropertyName = "Timestamp" },+ new TableColumn { Title = "Time (UTC)", PropertyName = "Timestamp" },new TableColumn { Title = "Username", PropertyName = "Username" },new TableColumn { Title = "Client", PropertyName = "Client" },new TableColumn { Title = "Event", PropertyName = "EventType" },diff --git a/apps/server/AliasVault.Admin/Main/Pages/Logging/General.razor b/apps/server/AliasVault.Admin/Main/Pages/Logging/General.razorindex bb7ee471d..e2f617868 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Logging/General.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Logging/General.razor@@ -97,7 +97,7 @@ else@code {private readonly List<TableColumn> _tableColumns = [new TableColumn { Title = "ID", PropertyName = "Id" },- new TableColumn { Title = "Time", PropertyName = "Timestamp" },+ new TableColumn { Title = "Time (UTC)", PropertyName = "Timestamp" },new TableColumn { Title = "Application", PropertyName = "Application" },new TableColumn { Title = "Level", PropertyName = "Level" },new TableColumn { Title = "Message", PropertyName = "Message" },diff --git a/apps/server/AliasVault.Admin/Main/Pages/Maintenance/Components/TaskRunnerHistory.razor b/apps/server/AliasVault.Admin/Main/Pages/Maintenance/Components/TaskRunnerHistory.razorindex ae05e7fe7..7ba3f78bd 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Maintenance/Components/TaskRunnerHistory.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Maintenance/Components/TaskRunnerHistory.razor@@ -45,8 +45,8 @@[new TableColumn { Title = "ID", PropertyName = "Id" },new TableColumn { Title = "Date", PropertyName = "RunDate" },- new TableColumn { Title = "Start", PropertyName = "StartTime" },- new TableColumn { Title = "End", PropertyName = "EndTime" },+ new TableColumn { Title = "Start (UTC)", PropertyName = "StartTime" },+ new TableColumn { Title = "End (UTC)", PropertyName = "EndTime" },new TableColumn { Title = "Status", PropertyName = "Status" },new TableColumn { Title = "On-Demand", PropertyName = "IsOnDemand" },new TableColumn { Title = "Error", PropertyName = "ErrorMessage" },diff --git a/apps/server/AliasVault.Admin/Main/Pages/Maintenance/Index.razor b/apps/server/AliasVault.Admin/Main/Pages/Maintenance/Index.razorindex 17cf9c9e7..4aa8a28e3 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Maintenance/Index.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Maintenance/Index.razor@@ -25,9 +25,9 @@Maintenance tasks clean up logs, emails, expired tokens and unreferenced vault data according to the retention limits configured in <a href="settings/server" class="text-primary-700 hover:underline dark:text-primary-500">Server settings</a>.</p><div class="mb-4">- <label for="schedule" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Time</label>+ <label for="schedule" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Time (UTC)</label><input type="time" @bind="Settings.MaintenanceTime" id="schedule" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500">- <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Time when maintenance tasks are run (server local time)</p>+ <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Time when maintenance tasks are run</p></div><div class="mb-4"><label class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Run on Days</label>diff --git a/apps/server/AliasVault.Admin/Main/Pages/Users/Users.razor b/apps/server/AliasVault.Admin/Main/Pages/Users/Users.razorindex 243f6160c..89c2c4818 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Users/Users.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Users/Users.razor@@ -68,7 +68,7 @@ else@code {private readonly List<TableColumn> _tableColumns = [- new TableColumn { Title = "Registered", PropertyName = "CreatedAt" },+ new TableColumn { Title = "Registered (UTC)", PropertyName = "CreatedAt" },new TableColumn { Title = "Username", PropertyName = "UserName" },new TableColumn { Title = "Last Activity", PropertyName = "LastActivityDate" },new TableColumn { Title = "# Credentials", PropertyName = "CredentialCount" },diff --git a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/AuthLogTable.razor b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/AuthLogTable.razorindex 57fb356ab..da896282e 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/AuthLogTable.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/AuthLogTable.razor@@ -61,7 +61,7 @@ elseprivate readonly List<TableColumn> _authLogTableColumns = [new TableColumn { Title = "ID", PropertyName = "Id" },- new TableColumn { Title = "Time", PropertyName = "Timestamp" },+ new TableColumn { Title = "Time (UTC)", PropertyName = "Timestamp" },new TableColumn { Title = "Event", PropertyName = "EventType" },new TableColumn { Title = "Success", PropertyName = "IsSuccess" },new TableColumn { Title = "IP", PropertyName = "IpAddress" },diff --git a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/DataBucketTable.razor b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/DataBucketTable.razorindex e83e69521..099c7b0a3 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/DataBucketTable.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/DataBucketTable.razor@@ -64,7 +64,7 @@ elseprivate readonly List<TableColumn> _bucketTableColumns = [new TableColumn { Title = "Revision", PropertyName = "RevisionNumber" },- new TableColumn { Title = "Written", PropertyName = "UpdatedAt" },+ new TableColumn { Title = "Written (UTC)", PropertyName = "UpdatedAt" },new TableColumn { Title = "Size", PropertyName = "SizeBytes" },new TableColumn { Title = "Status", Sortable = false },new TableColumn { Title = "Actions", Sortable = false },diff --git a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/EmailClaimTable.razor b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/EmailClaimTable.razorindex 5d3e20cf5..ebf6de806 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/EmailClaimTable.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/EmailClaimTable.razor@@ -81,7 +81,7 @@ elseprivate readonly List<TableColumn> _emailClaimTableColumns = [new TableColumn { Title = "ID", PropertyName = "Id" },- new TableColumn { Title = "Created", PropertyName = "CreatedAt" },+ new TableColumn { Title = "Created (UTC)", PropertyName = "CreatedAt" },new TableColumn { Title = "Email", PropertyName = "Address" },new TableColumn { Title = "Email Count", PropertyName = "EmailCount" },new TableColumn { Title = "Status", PropertyName = "State" },diff --git a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/ManifestTable.razor b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/ManifestTable.razorindex 8c7a0be0a..62805af0c 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/ManifestTable.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/ManifestTable.razor@@ -61,7 +61,7 @@private readonly List<TableColumn> _manifestTableColumns = [new TableColumn { Title = "Revision", PropertyName = "RevisionNumber" },- new TableColumn { Title = "Written", PropertyName = "UpdatedAt" },+ new TableColumn { Title = "Written (UTC)", PropertyName = "UpdatedAt" },new TableColumn { Title = "Format", PropertyName = "StorageFormat" },new TableColumn { Title = "Manifest", PropertyName = "SizeBytes" },new TableColumn { Title = "Blobs referenced", PropertyName = "BlobBytes" },diff --git a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/PasswordHistoryTable.razor b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/PasswordHistoryTable.razorindex 4de070100..60702366e 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/PasswordHistoryTable.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/PasswordHistoryTable.razor@@ -49,10 +49,10 @@ elseprivate SortDirection SortDirection { get; set; } = SortDirection.Descending;private readonly List<TableColumn> _passwordHistoryTableColumns = [- new TableColumn { Title = "Replaced at", PropertyName = "ArchivedAt" },+ new TableColumn { Title = "Replaced at (UTC)", PropertyName = "ArchivedAt" },new TableColumn { Title = "Method", PropertyName = "Type" },new TableColumn { Title = "Changed by", PropertyName = "ArchivedByClient" },- new TableColumn { Title = "In use since", PropertyName = "UpdatedAt" },+ new TableColumn { Title = "In use since (UTC)", PropertyName = "UpdatedAt" },new TableColumn { Title = "Expires", Sortable = false },new TableColumn { Title = "Actions", Sortable = false },];diff --git a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/RefreshTokenTable.razor b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/RefreshTokenTable.razorindex 066f4040a..f09a5c652 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/RefreshTokenTable.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Components/RefreshTokenTable.razor@@ -55,8 +55,8 @@new TableColumn { Title = "ID", PropertyName = "Id" },new TableColumn { Title = "Device", PropertyName = "DeviceIdentifier" },new TableColumn { Title = "Ip", PropertyName = "IpAddress" },- new TableColumn { Title = "Created", PropertyName = "CreatedAt" },- new TableColumn { Title = "Expires", PropertyName = "ExpireDate" },+ new TableColumn { Title = "Created (UTC)", PropertyName = "CreatedAt" },+ new TableColumn { Title = "Expires (UTC)", PropertyName = "ExpireDate" },new TableColumn { Title = "Actions", Sortable = false },];diff --git a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Index.razor b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Index.razorindex e7ef3ec16..acc359fdc 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Index.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Index.razor@@ -107,7 +107,7 @@ else<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400"><tbody><tr class="">- <th scope="row" class="px-4 py-3 font-medium text-gray-900 whitespace-nowrap dark:text-white">Registered at</th>+ <th scope="row" class="px-4 py-3 font-medium text-gray-900 whitespace-nowrap dark:text-white">Registered at (UTC)</th><td class="px-4 py-3">@User.CreatedAt.ToString("yyyy-MM-dd HH:mm")</td></tr><tr>@@ -208,8 +208,7 @@ else<div><h3 class="mb-1 text-xl font-bold text-gray-900 dark:text-white">Vault storage</h3><p class="mb-3 text-sm text-gray-500 dark:text-gray-400">- A vault is stored as a manifest, a set of independently-versioned data buckets and the content-addressed- blob objects that are referenced by one or more manifest revisions.+ A vault is stored as a manifest, one or more data buckets and optional blob objects (attachments).</p><div class="mb-6 bg-gray-100 dark:bg-gray-700 rounded-lg p-4">@@ -243,10 +242,7 @@ else<h4 class="mb-2 text-lg font-semibold text-gray-900 dark:text-white">Manifest revisions (@StorageOverview.ManifestRevisions.Count)</h4><ManifestTable Revisions="@StorageOverview.ManifestRevisions" HasManifestAccessKeys="@HasManifestAccessKeys" OnMakeCurrent="@MakeCurrentAsync" />- <h4 class="mt-6 mb-2 text-lg font-semibold text-gray-900 dark:text-white">Data bucket revisions (@StorageOverview.BucketRevisions.Count)</h4>- <p class="mb-2 text-sm text-gray-500 dark:text-gray-400">- Small categories of vault data that sync on their own revision counter, separate from the manifest.- </p>+ <h4 class="mt-6 mb-2 text-lg font-semibold text-gray-900 dark:text-white">Data bucket revisions</h4><DataBucketTable Revisions="@StorageOverview.BucketRevisions" OnRestore="@RestoreBucketAsync" /><h4 class="mt-6 mb-2 text-lg font-semibold text-gray-900 dark:text-white">Blob objects (@StorageOverview.BlobCount.ToString("N0"))</h4>@@ -260,7 +256,7 @@ else<div><h3 class="mb-1 text-xl font-bold text-gray-900 dark:text-white">Previous master passwords (@PasswordHistoryList.Count)</h3><p class="mb-3 text-sm text-gray-500 dark:text-gray-400">- Allows to revert a password change in case of a failure. Automatically pruned after the configured Password Revert Window.+ Allows to revert a password change in case of a failure. Historic records are automatically deleted after the configured Password Revert Window.</p><PasswordHistoryTable PasswordHistoryList="@PasswordHistoryList" RetentionDays="@UnlockKeyHistoryRetentionDays" OnRevert="@RevertPasswordChangeAsync" />diff --git a/apps/server/AliasVault.Admin/Main/_Imports.razor b/apps/server/AliasVault.Admin/Main/_Imports.razorindex 64055324e..eb4fe0539 100644--- a/apps/server/AliasVault.Admin/Main/_Imports.razor+++ b/apps/server/AliasVault.Admin/Main/_Imports.razor@@ -19,7 +19,6 @@@using AliasVault.Admin.Main.Components.Layout@using AliasVault.Admin.Main.Components.Loading@using AliasVault.Admin.Main.Components.Users-@using AliasVault.Admin.Main.Components.WorkerStatus@using AliasVault.RazorComponents@using AliasVault.RazorComponents.Alerts@using AliasVault.RazorComponents.Buttonsdiff --git a/apps/server/AliasVault.Admin/wwwroot/css/tailwind.css b/apps/server/AliasVault.Admin/wwwroot/css/tailwind.cssindex e29ae6504..ceaa10e55 100644--- a/apps/server/AliasVault.Admin/wwwroot/css/tailwind.css+++ b/apps/server/AliasVault.Admin/wwwroot/css/tailwind.css@@ -880,10 +880,6 @@ video {height: 100%;}-.max-h-\[500px\] {- max-height: 500px;-}-.min-h-\[350px\] {min-height: 350px;}@@ -1221,10 +1217,6 @@ video {border-radius: 0.375rem;}-.rounded-xl {- border-radius: 0.75rem;-}-.rounded-b-lg {border-bottom-right-radius: 0.5rem;border-bottom-left-radius: 0.5rem;@@ -1315,11 +1307,6 @@ video {background-color: rgb(59 130 246 / var(--tw-bg-opacity));}-.bg-emerald-500 {- --tw-bg-opacity: 1;- background-color: rgb(16 185 129 / var(--tw-bg-opacity));-}-.bg-gray-100 {--tw-bg-opacity: 1;background-color: rgb(243 244 246 / var(--tw-bg-opacity));@@ -1380,11 +1367,6 @@ video {background-color: rgb(34 197 94 / var(--tw-bg-opacity));}-.bg-green-600 {- --tw-bg-opacity: 1;- background-color: rgb(22 163 74 / var(--tw-bg-opacity));-}-.bg-green-700 {--tw-bg-opacity: 1;background-color: rgb(21 128 61 / var(--tw-bg-opacity));@@ -1400,11 +1382,6 @@ video {background-color: rgb(251 146 60 / var(--tw-bg-opacity));}-.bg-orange-50 {- --tw-bg-opacity: 1;- background-color: rgb(255 247 237 / var(--tw-bg-opacity));-}-.bg-primary-100 {--tw-bg-opacity: 1;background-color: rgb(253 222 133 / var(--tw-bg-opacity));@@ -1470,6 +1447,11 @@ video {background-color: rgb(254 249 195 / var(--tw-bg-opacity));}+.bg-yellow-400 {+ --tw-bg-opacity: 1;+ background-color: rgb(250 204 21 / var(--tw-bg-opacity));+}+.bg-yellow-50 {--tw-bg-opacity: 1;background-color: rgb(254 252 232 / var(--tw-bg-opacity));@@ -1556,11 +1538,6 @@ video {padding-right: 1.75rem;}-.px-8 {- padding-left: 2rem;- padding-right: 2rem;-}-.py-0 {padding-top: 0px;padding-bottom: 0px;@@ -1809,11 +1786,6 @@ video {color: rgb(194 65 12 / var(--tw-text-opacity));}-.text-orange-800 {- --tw-text-opacity: 1;- color: rgb(154 52 18 / var(--tw-text-opacity));-}-.text-primary-600 {--tw-text-opacity: 1;color: rgb(214 131 56 / var(--tw-text-opacity));@@ -1867,18 +1839,10 @@ video {opacity: 0;}-.opacity-25 {- opacity: 0.25;-}-.opacity-50 {opacity: 0.5;}-.opacity-75 {- opacity: 0.75;-}-.shadow {--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);@@ -2041,6 +2005,10 @@ video {text-decoration-line: underline;}+.hover\:opacity-90:hover {+ opacity: 0.9;+}+.focus\:border-primary-500:focus {--tw-border-opacity: 1;border-color: rgb(244 149 65 / var(--tw-border-opacity));@@ -2265,6 +2233,10 @@ video {background-color: rgb(127 29 29 / 0.2);}+.dark\:bg-red-900\/30:is(.dark *) {+ background-color: rgb(127 29 29 / 0.3);+}+.dark\:bg-yellow-800:is(.dark *) {--tw-bg-opacity: 1;background-color: rgb(133 77 14 / var(--tw-bg-opacity));@@ -2275,6 +2247,10 @@ video {background-color: rgb(113 63 18 / var(--tw-bg-opacity));}+.dark\:bg-yellow-900\/30:is(.dark *) {+ background-color: rgb(113 63 18 / 0.3);+}+.dark\:bg-opacity-80:is(.dark *) {--tw-bg-opacity: 0.8;}@@ -2319,11 +2295,6 @@ video {color: rgb(134 239 172 / var(--tw-text-opacity));}-.dark\:text-orange-300:is(.dark *) {- --tw-text-opacity: 1;- color: rgb(253 186 116 / var(--tw-text-opacity));-}-.dark\:text-orange-400:is(.dark *) {--tw-text-opacity: 1;color: rgb(251 146 60 / var(--tw-text-opacity));@@ -2537,10 +2508,6 @@ video {width: auto;}- .sm\:grid-cols-1 {- grid-template-columns: repeat(1, minmax(0, 1fr));- }-.sm\:grid-cols-2 {grid-template-columns: repeat(2, minmax(0, 1fr));}@@ -2591,10 +2558,6 @@ video {}@media (min-width: 768px) {- .md\:col-span-2 {- grid-column: span 2 / span 2;- }-.md\:mb-0 {margin-bottom: 0px;}@@ -2700,14 +2663,14 @@ video {width: auto;}- .lg\:grid-cols-4 {- grid-template-columns: repeat(4, minmax(0, 1fr));- }-.lg\:grid-cols-2 {grid-template-columns: repeat(2, minmax(0, 1fr));}+ .lg\:grid-cols-4 {+ grid-template-columns: repeat(4, minmax(0, 1fr));+ }+.lg\:flex-row {flex-direction: row;}@@ -2770,10 +2733,6 @@ video {grid-column: span 2 / span 2;}- .\32xl\:grid-cols-3 {- grid-template-columns: repeat(3, minmax(0, 1fr));- }-.\32xl\:space-x-4 > :not([hidden]) ~ :not([hidden]) {--tw-space-x-reverse: 0;margin-right: calc(1rem * var(--tw-space-x-reverse));