Command palette with Title, style
This commit is contained in:
@@ -40,8 +40,9 @@ public partial class CommandPaletteService : ICommandPaletteService
|
||||
|
||||
public IReadOnlyList<ICommandPaletteEntry> GetCommands() =>
|
||||
_identifiableUserCommandService
|
||||
.GetCommandIdentifiers()
|
||||
.Select(c => new CommandPaletteEntry(c, c))
|
||||
.IdentifiableUserCommands
|
||||
.Select(c => new CommandPaletteEntry(c.Key, c.Value.Title))
|
||||
.OrderBy(c => c.Title)
|
||||
.ToList()
|
||||
.AsReadOnly();
|
||||
}
|
||||
@@ -41,9 +41,8 @@ public class CommandPaletteViewModel : FuzzyPanelViewModel<ICommandPaletteEntryV
|
||||
|| c.Identifier.Contains(SearchText, StringComparison.OrdinalIgnoreCase)
|
||||
)
|
||||
.Select(c =>
|
||||
(ICommandPaletteEntryViewModel) new CommandPaletteEntryViewModel(c.Identifier, c.Title))
|
||||
.Take(30) // TODO remove magic number
|
||||
.OrderBy(c => c.Title)
|
||||
(ICommandPaletteEntryViewModel) new CommandPaletteEntryViewModel(c.Identifier, c.Title)
|
||||
)
|
||||
.ToList();
|
||||
|
||||
public override async Task<bool> HandleKeyDown(KeyEventArgs keyEventArgs)
|
||||
|
||||
Reference in New Issue
Block a user