diff --git a/src/EventLogExpert.Components.Tests/DatabaseEntryRowTests.cs b/src/EventLogExpert.Components.Tests/Database/DatabaseEntryRowTests.cs similarity index 99% rename from src/EventLogExpert.Components.Tests/DatabaseEntryRowTests.cs rename to src/EventLogExpert.Components.Tests/Database/DatabaseEntryRowTests.cs index b38abd62..1f8fc95a 100644 --- a/src/EventLogExpert.Components.Tests/DatabaseEntryRowTests.cs +++ b/src/EventLogExpert.Components.Tests/Database/DatabaseEntryRowTests.cs @@ -2,10 +2,11 @@ // // Licensed under the MIT License. using Bunit; +using EventLogExpert.Components.Database; using EventLogExpert.UI; using EventLogExpert.UI.Models; -namespace EventLogExpert.Components.Tests; +namespace EventLogExpert.Components.Tests.Database; public sealed class DatabaseEntryRowTests : BunitContext { diff --git a/src/EventLogExpert.Components.Tests/DatabaseRecoveryDialogTests.cs b/src/EventLogExpert.Components.Tests/Database/DatabaseRecoveryDialogTests.cs similarity index 99% rename from src/EventLogExpert.Components.Tests/DatabaseRecoveryDialogTests.cs rename to src/EventLogExpert.Components.Tests/Database/DatabaseRecoveryDialogTests.cs index 5ce63f28..a328123b 100644 --- a/src/EventLogExpert.Components.Tests/DatabaseRecoveryDialogTests.cs +++ b/src/EventLogExpert.Components.Tests/Database/DatabaseRecoveryDialogTests.cs @@ -2,6 +2,7 @@ // // Licensed under the MIT License. using Bunit; +using EventLogExpert.Components.Database; using EventLogExpert.Eventing.Helpers; using EventLogExpert.UI; using EventLogExpert.UI.Interfaces; @@ -9,7 +10,7 @@ using Microsoft.Extensions.DependencyInjection; using NSubstitute; -namespace EventLogExpert.Components.Tests; +namespace EventLogExpert.Components.Tests.Database; public sealed class DatabaseRecoveryDialogTests : BunitContext { diff --git a/src/EventLogExpert.Components.Tests/DatabaseRecoveryHostTests.cs b/src/EventLogExpert.Components.Tests/Database/DatabaseRecoveryHostTests.cs similarity index 99% rename from src/EventLogExpert.Components.Tests/DatabaseRecoveryHostTests.cs rename to src/EventLogExpert.Components.Tests/Database/DatabaseRecoveryHostTests.cs index 32821edd..f1a21cb2 100644 --- a/src/EventLogExpert.Components.Tests/DatabaseRecoveryHostTests.cs +++ b/src/EventLogExpert.Components.Tests/Database/DatabaseRecoveryHostTests.cs @@ -2,6 +2,7 @@ // // Licensed under the MIT License. using Bunit; +using EventLogExpert.Components.Database; using EventLogExpert.Eventing.Helpers; using EventLogExpert.UI; using EventLogExpert.UI.Interfaces; @@ -9,7 +10,7 @@ using Microsoft.Extensions.DependencyInjection; using NSubstitute; -namespace EventLogExpert.Components.Tests; +namespace EventLogExpert.Components.Tests.Database; public sealed class DatabaseRecoveryHostTests : BunitContext { diff --git a/src/EventLogExpert.Components.Tests/SettingsUpgradeProgressBannerTests.cs b/src/EventLogExpert.Components.Tests/Database/SettingsUpgradeProgressBannerTests.cs similarity index 98% rename from src/EventLogExpert.Components.Tests/SettingsUpgradeProgressBannerTests.cs rename to src/EventLogExpert.Components.Tests/Database/SettingsUpgradeProgressBannerTests.cs index f8d9fd68..3f8eb06c 100644 --- a/src/EventLogExpert.Components.Tests/SettingsUpgradeProgressBannerTests.cs +++ b/src/EventLogExpert.Components.Tests/Database/SettingsUpgradeProgressBannerTests.cs @@ -2,13 +2,14 @@ // // Licensed under the MIT License. using Bunit; +using EventLogExpert.Components.Database; using EventLogExpert.Eventing.Helpers; using EventLogExpert.UI.Interfaces; using EventLogExpert.UI.Models; using Microsoft.Extensions.DependencyInjection; using NSubstitute; -namespace EventLogExpert.Components.Tests; +namespace EventLogExpert.Components.Tests.Database; public sealed class SettingsUpgradeProgressBannerTests : BunitContext { diff --git a/src/EventLogExpert/Shared/Base/ModalBase.cs b/src/EventLogExpert.Components/Base/ModalBase.cs similarity index 93% rename from src/EventLogExpert/Shared/Base/ModalBase.cs rename to src/EventLogExpert.Components/Base/ModalBase.cs index bd4c1fca..f993d03f 100644 --- a/src/EventLogExpert/Shared/Base/ModalBase.cs +++ b/src/EventLogExpert.Components/Base/ModalBase.cs @@ -1,12 +1,11 @@ // // Copyright (c) Microsoft Corporation. // // Licensed under the MIT License. -using EventLogExpert.Components.Base; using EventLogExpert.UI.Interfaces; using Fluxor.Blazor.Web.Components; using Microsoft.AspNetCore.Components; -namespace EventLogExpert.Shared.Base; +namespace EventLogExpert.Components.Base; /// /// Base for modals shown via . Owns the per-show id handshake with the service and @@ -68,9 +67,11 @@ public Task ShowInlineAlertAsync(InlineAlertRequest request, } // Route Esc/native-close through OnCancelAsync so all close paths share the same pipeline. - internal Task HandleDialogClosedByUserAsync() => OnCancelAsync(); + // Protected so derived modals' .razor markup can wire OnDialogClosedByUser="HandleDialogClosedByUserAsync" + // even when the derived class lives in a different assembly than ModalBase. + protected Task HandleDialogClosedByUserAsync() => OnCancelAsync(); - internal Task HandleInlineAlertResolvedAsync(InlineAlertResult result) + protected Task HandleInlineAlertResolvedAsync(InlineAlertResult result) { TryClearInlineAlert(null, result, false); return Task.CompletedTask; diff --git a/src/EventLogExpert.Components/DatabaseEntryRow.razor b/src/EventLogExpert.Components/Database/DatabaseEntryRow.razor similarity index 100% rename from src/EventLogExpert.Components/DatabaseEntryRow.razor rename to src/EventLogExpert.Components/Database/DatabaseEntryRow.razor diff --git a/src/EventLogExpert.Components/DatabaseEntryRow.razor.cs b/src/EventLogExpert.Components/Database/DatabaseEntryRow.razor.cs similarity index 98% rename from src/EventLogExpert.Components/DatabaseEntryRow.razor.cs rename to src/EventLogExpert.Components/Database/DatabaseEntryRow.razor.cs index 6d168f96..50416eb2 100644 --- a/src/EventLogExpert.Components/DatabaseEntryRow.razor.cs +++ b/src/EventLogExpert.Components/Database/DatabaseEntryRow.razor.cs @@ -5,7 +5,7 @@ using EventLogExpert.UI.Models; using Microsoft.AspNetCore.Components; -namespace EventLogExpert.Components; +namespace EventLogExpert.Components.Database; public sealed partial class DatabaseEntryRow : ComponentBase { diff --git a/src/EventLogExpert.Components/DatabaseEntryRow.razor.css b/src/EventLogExpert.Components/Database/DatabaseEntryRow.razor.css similarity index 100% rename from src/EventLogExpert.Components/DatabaseEntryRow.razor.css rename to src/EventLogExpert.Components/Database/DatabaseEntryRow.razor.css diff --git a/src/EventLogExpert.Components/DatabaseRecoveryDialog.razor b/src/EventLogExpert.Components/Database/DatabaseRecoveryDialog.razor similarity index 100% rename from src/EventLogExpert.Components/DatabaseRecoveryDialog.razor rename to src/EventLogExpert.Components/Database/DatabaseRecoveryDialog.razor diff --git a/src/EventLogExpert.Components/DatabaseRecoveryDialog.razor.cs b/src/EventLogExpert.Components/Database/DatabaseRecoveryDialog.razor.cs similarity index 99% rename from src/EventLogExpert.Components/DatabaseRecoveryDialog.razor.cs rename to src/EventLogExpert.Components/Database/DatabaseRecoveryDialog.razor.cs index 0865e4cc..a9faeb11 100644 --- a/src/EventLogExpert.Components/DatabaseRecoveryDialog.razor.cs +++ b/src/EventLogExpert.Components/Database/DatabaseRecoveryDialog.razor.cs @@ -7,7 +7,7 @@ using EventLogExpert.UI.Models; using Microsoft.AspNetCore.Components; -namespace EventLogExpert.Components; +namespace EventLogExpert.Components.Database; public sealed partial class DatabaseRecoveryDialog : ComponentBase, IAsyncDisposable { diff --git a/src/EventLogExpert.Components/DatabaseRecoveryDialog.razor.css b/src/EventLogExpert.Components/Database/DatabaseRecoveryDialog.razor.css similarity index 100% rename from src/EventLogExpert.Components/DatabaseRecoveryDialog.razor.css rename to src/EventLogExpert.Components/Database/DatabaseRecoveryDialog.razor.css diff --git a/src/EventLogExpert.Components/DatabaseRecoveryHost.razor b/src/EventLogExpert.Components/Database/DatabaseRecoveryHost.razor similarity index 100% rename from src/EventLogExpert.Components/DatabaseRecoveryHost.razor rename to src/EventLogExpert.Components/Database/DatabaseRecoveryHost.razor diff --git a/src/EventLogExpert.Components/DatabaseRecoveryHost.razor.cs b/src/EventLogExpert.Components/Database/DatabaseRecoveryHost.razor.cs similarity index 98% rename from src/EventLogExpert.Components/DatabaseRecoveryHost.razor.cs rename to src/EventLogExpert.Components/Database/DatabaseRecoveryHost.razor.cs index fd5003ac..86895d8c 100644 --- a/src/EventLogExpert.Components/DatabaseRecoveryHost.razor.cs +++ b/src/EventLogExpert.Components/Database/DatabaseRecoveryHost.razor.cs @@ -6,7 +6,7 @@ using EventLogExpert.UI.Models; using Microsoft.AspNetCore.Components; -namespace EventLogExpert.Components; +namespace EventLogExpert.Components.Database; public sealed partial class DatabaseRecoveryHost : ComponentBase, IDisposable { diff --git a/src/EventLogExpert.Components/SettingsUpgradeProgressBanner.razor b/src/EventLogExpert.Components/Database/SettingsUpgradeProgressBanner.razor similarity index 96% rename from src/EventLogExpert.Components/SettingsUpgradeProgressBanner.razor rename to src/EventLogExpert.Components/Database/SettingsUpgradeProgressBanner.razor index 9bf76f6f..0ba91cf5 100644 --- a/src/EventLogExpert.Components/SettingsUpgradeProgressBanner.razor +++ b/src/EventLogExpert.Components/Database/SettingsUpgradeProgressBanner.razor @@ -1,5 +1,3 @@ -@namespace EventLogExpert.Components - @if (BannerService.SettingsProgress is { } progress) {