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:
mika kuns
2026-04-20 10:37:52 +02:00
parent 47e8e1ff94
commit 6dade011b0
9 changed files with 59 additions and 5 deletions

View File

@@ -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));