feat(ui): keyboard shortcuts (/ Ctrl+N Space Esc)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,8 @@ public sealed partial class ListsIslandViewModel : ViewModelBase
|
||||
private readonly IDbContextFactory<ClaudeDoDbContext> _dbFactory;
|
||||
|
||||
public event EventHandler? SelectionChanged;
|
||||
public event EventHandler? FocusSearchRequested;
|
||||
public void RequestFocusSearch() => FocusSearchRequested?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
public ObservableCollection<ListNavItemViewModel> Items { get; } = new();
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ public sealed partial class TasksIslandViewModel : ViewModelBase
|
||||
private ListNavItemViewModel? _currentList;
|
||||
|
||||
public event EventHandler? SelectionChanged;
|
||||
public event EventHandler? FocusAddTaskRequested;
|
||||
public void RequestFocusAddTask() => FocusAddTaskRequested?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
public ObservableCollection<TaskRowViewModel> Items { get; } = new();
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using ClaudeDo.Ui.ViewModels.Islands;
|
||||
|
||||
namespace ClaudeDo.Ui.ViewModels;
|
||||
@@ -15,6 +16,18 @@ public sealed partial class IslandsShellViewModel : ViewModelBase
|
||||
public bool ShowDetails => WindowWidth >= 1100;
|
||||
public bool ShowLists => WindowWidth >= 780;
|
||||
|
||||
[RelayCommand]
|
||||
private void FocusSearch() => Lists.RequestFocusSearch();
|
||||
|
||||
[RelayCommand]
|
||||
private void FocusAddTask() => Tasks.RequestFocusAddTask();
|
||||
|
||||
public async Task ToggleSelectedDoneAsync()
|
||||
{
|
||||
if (Tasks.SelectedTask is { } row)
|
||||
await Tasks.ToggleDoneCommand.ExecuteAsync(row);
|
||||
}
|
||||
|
||||
partial void OnWindowWidthChanged(double value)
|
||||
{
|
||||
OnPropertyChanged(nameof(ShowDetails));
|
||||
|
||||
Reference in New Issue
Block a user