Skip to content

Commit

Permalink
Fix build issues (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
lanedirt committed Feb 10, 2025
1 parent 0633bc2 commit 117da9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
16 changes: 7 additions & 9 deletions src/AliasVault.Client/Main/Components/Email/EmailModal.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@inject IHttpClientFactory HttpClientFactory
@inject EmailService EmailService
@inject HttpClient HttpClient

<ClickOutsideHandler OnClose="OnClose" ContentId="emailModal">
<div class="fixed inset-0 z-50 overflow-auto bg-gray-500 bg-opacity-75 flex items-center justify-center">
<div id="emailModal" class="relative bg-white w-3/4 flex flex-col rounded-lg shadow-xl max-h-[90vh]">
Expand Down Expand Up @@ -186,19 +187,16 @@
if (response.IsSuccessStatusCode)
{
await OnEmailDeleted.InvokeAsync(Email.Id);
using AliasVault.Shared.Core;

#line default
#line hidden
#nullable disable
#nullable restore
#line 2 "/Users/user/Projects/AliasVault2/src/AliasVault.Client/_Imports.razor"
GlobalNotificationService.AddErrorMessage($"Failed to delete email: {errorMessage}", true);
GlobalNotificationService.AddSuccessMessage($"Email deleted successfully.");
}
else
{
GlobalNotificationService.AddErrorMessage($"Failed to delete email.", true);
}
}
catch (Exception ex)
{
GlobalNotificationService.AddErrorMessage($"An error occurred: {ex.Message}", true);
GlobalNotificationService.AddErrorMessage($"Failed to delete email: {ex.Message}", true);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@inject Config Config
@inject EmailService EmailService
@using System.Timers
@using AliasVault.Shared.Core
@inject ILogger<RecentEmails> Logger
@implements IAsyncDisposable

Expand Down Expand Up @@ -317,12 +318,6 @@
var mailbox = await response.Content.ReadFromJsonAsync<MailboxApiModel>();
await UpdateMailboxEmails(mailbox);
}

if (mailbox?.Mails != null)
{
// Show maximum of 10 recent emails.
MailboxEmails = mailbox.Mails.Take(10).ToList();
}
}

/// <summary>
Expand Down

0 comments on commit 117da9d

Please sign in to comment.