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
3 changes: 3 additions & 0 deletions Apollo.Components/Editor/ToolsMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<MudMenuItem Icon="@ApolloIcons.NuGet" OnClick="@(async () => await Bus.PublishAsync(new OpenNuGetDialog()))">
NuGet Packages
</MudMenuItem>
<MudMenuItem Icon="@ApolloIcons.Search" OnClick="@(async () => await Bus.PublishAsync(new OpenRegexTesterDialog()))">
Regex Tester
</MudMenuItem>
<MudMenu StartIcon="@ApolloIcons.Guid" Label="Generate GUID">
<MudMenuItem Icon="@ApolloIcons.Guid" OnClick="@(async () => await Bus.PublishAsync(new GenerateGuid()))">
GUID
Expand Down
4 changes: 3 additions & 1 deletion Apollo.Components/NuGet/PackageCard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@
<MudSelect T="string"
@bind-Value="_selectedVersion"
Dense
Variant="Variant.Outlined"
Variant="Variant.Text"
Style="min-width: 120px;"
AnchorOrigin="Origin.BottomCenter">
@foreach (var version in Package.Versions.Take(10))
{
<MudSelectItem Value="@version">@version</MudSelectItem>
}
</MudSelect>

<MudDivider Vertical="true" />

@if (IsInstalling)
{
Expand Down
5 changes: 5 additions & 0 deletions Apollo.Components/Tools/Commands/OpenRegexTesterDialog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace Apollo.Components.Tools.Commands;

public record OpenRegexTesterDialog();


31 changes: 31 additions & 0 deletions Apollo.Components/Tools/Consumers/RegexTesterDialogOpener.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Apollo.Components.Infrastructure.MessageBus;
using Apollo.Components.Tools.Commands;
using MudBlazor;

namespace Apollo.Components.Tools.Consumers;

public sealed class RegexTesterDialogOpener : IConsumer<OpenRegexTesterDialog>
{
private readonly IDialogService _dialogService;

public RegexTesterDialogOpener(IDialogService dialogService)
{
_dialogService = dialogService;
}

public async Task Consume(OpenRegexTesterDialog message)
{
var options = new DialogOptions
{
CloseOnEscapeKey = true,
NoHeader = true,
MaxWidth = MaxWidth.ExtraLarge,
FullWidth = true,

};

await _dialogService.ShowAsync<RegexTesterDialog>("Regex Tester", options);
}
}


Loading
Loading