mirror of
https://github.com/lantean-code/qbtmud.git
synced 2025-11-02 13:03:23 +00:00
Remove custom ContextMenu and replace with MudMenu
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
@page "/"
|
||||
@layout ListLayout
|
||||
|
||||
<ContextMenu @ref="ContextMenu" Dense="true" RelativeWidth="DropdownWidth.Ignore" AdjustmentX="-242" AdjustmentY="0">
|
||||
<MudMenu @ref="ContextMenu" Dense="true" RelativeWidth="DropdownWidth.Ignore" PositionAtCursor="true">
|
||||
<MudMenuItem Icon="@Icons.Material.Outlined.Info" IconColor="Color.Inherit" OnClick="ShowTorrentContextMenu">View torrent details</MudMenuItem>
|
||||
<MudDivider />
|
||||
<TorrentActions RenderType="RenderType.MenuItems" Hashes="GetContextMenuTargetHashes()" PrimaryHash="@(ContextMenuItem?.Hash)" Torrents="MainData.Torrents" Preferences="Preferences" />
|
||||
</ContextMenu>
|
||||
</MudMenu>
|
||||
|
||||
<div style="overflow-x: auto; white-space: nowrap; width: 100%;">
|
||||
<MudToolBar Gutters="false" Dense="true">
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Lantean.QBTMud.Pages
|
||||
|
||||
protected Torrent? ContextMenuItem { get; set; }
|
||||
|
||||
protected ContextMenu? ContextMenu { get; set; }
|
||||
protected MudMenu? ContextMenu { get; set; }
|
||||
|
||||
private object? _lastRenderedTorrents;
|
||||
private QBitTorrentClient.Models.Preferences? _lastPreferences;
|
||||
@@ -272,7 +272,7 @@ namespace Lantean.QBTMud.Pages
|
||||
return;
|
||||
}
|
||||
|
||||
await ContextMenu.ToggleMenuAsync(eventArgs);
|
||||
await ContextMenu.OpenMenuAsync(eventArgs);
|
||||
}
|
||||
|
||||
protected IEnumerable<ColumnDefinition<Torrent>> Columns => ColumnsDefinitions.Where(c => c.Id != "#" || Preferences?.QueueingEnabled == true);
|
||||
|
||||
Reference in New Issue
Block a user