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:
@@ -10,7 +10,7 @@
|
||||
<TextBlock FontFamily="{DynamicResource SansFamily}" FontSize="18"
|
||||
FontWeight="SemiBold" Foreground="{DynamicResource TextBrush}"
|
||||
Text="Lists"/>
|
||||
<TextBox Classes="search" Margin="0,8,0,0" PlaceholderText="Search…"
|
||||
<TextBox x:Name="SearchBox" Classes="search" Margin="0,8,0,0" PlaceholderText="Search…"
|
||||
Text="{Binding SearchText, Mode=TwoWay}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
@@ -6,7 +6,15 @@ namespace ClaudeDo.Ui.Views.Islands;
|
||||
|
||||
public partial class ListsIslandView : UserControl
|
||||
{
|
||||
public ListsIslandView() { InitializeComponent(); }
|
||||
public ListsIslandView()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContextChanged += (_, _) =>
|
||||
{
|
||||
if (DataContext is ListsIslandViewModel vm)
|
||||
vm.FocusSearchRequested += (_, _) => SearchBox.Focus();
|
||||
};
|
||||
}
|
||||
|
||||
private void OnItemTapped(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<!-- Add-task row -->
|
||||
<Border DockPanel.Dock="Top" Margin="18,8,18,4">
|
||||
<TextBox Watermark="Add a task…" Text="{Binding NewTaskTitle, Mode=TwoWay}">
|
||||
<TextBox x:Name="AddTaskBox" Watermark="Add a task…" Text="{Binding NewTaskTitle, Mode=TwoWay}">
|
||||
<TextBox.KeyBindings>
|
||||
<KeyBinding Gesture="Enter" Command="{Binding AddCommand}"/>
|
||||
</TextBox.KeyBindings>
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
using Avalonia.Controls;
|
||||
using ClaudeDo.Ui.ViewModels.Islands;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.Islands;
|
||||
|
||||
public partial class TasksIslandView : UserControl
|
||||
{
|
||||
public TasksIslandView() { InitializeComponent(); }
|
||||
public TasksIslandView()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContextChanged += (_, _) =>
|
||||
{
|
||||
if (DataContext is TasksIslandViewModel vm)
|
||||
vm.FocusAddTaskRequested += (_, _) => AddTaskBox.Focus();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user