feat: add task creation, deletion, and modal focus restoration
Implemented task creation flow with keyboard shortcut (c) and UI button. Added task deletion with confirmation dialog, accessible via Delete key or per-row delete button. Fixed modal close behavior to restore focus and reselect the appropriate task (created task for new tasks, original task for view/edit). Enhanced tag and project autocomplete with hierarchical project suggestions and tag filtering
This commit is contained in:
1 parent
eabe07d489
commit
1c4110caa9
17 files changed
+995
-77
No files matched your search
@@ -12,6 +12,8 @@ pub enum Command {
|
||||
// Actions
|
||||
OpenSelectedTask,
|
||||
OpenTaskEdit,
|
||||
CreateTask,
|
||||
DeleteSelectedTask,
|
||||
Sync,
|
||||
|
||||
// Focus
|
||||
@@ -79,6 +81,8 @@ impl Command {
|
||||
"ClearSelection" => Some(Self::ClearSelection),
|
||||
"OpenSelectedTask" => Some(Self::OpenSelectedTask),
|
||||
"OpenTaskEdit" => Some(Self::OpenTaskEdit),
|
||||
"CreateTask" => Some(Self::CreateTask),
|
||||
"DeleteSelectedTask" => Some(Self::DeleteSelectedTask),
|
||||
"Sync" => Some(Self::Sync),
|
||||
"FocusSearch" => Some(Self::FocusSearch),
|
||||
"FocusTable" => Some(Self::FocusTable),
|
||||
@@ -137,6 +141,8 @@ impl Command {
|
||||
Self::ClearSelection => "ClearSelection",
|
||||
Self::OpenSelectedTask => "OpenSelectedTask",
|
||||
Self::OpenTaskEdit => "OpenTaskEdit",
|
||||
Self::CreateTask => "CreateTask",
|
||||
Self::DeleteSelectedTask => "DeleteSelectedTask",
|
||||
Self::Sync => "Sync",
|
||||
Self::FocusSearch => "FocusSearch",
|
||||
Self::FocusTable => "FocusTable",
|
||||
|
||||
@@ -136,6 +136,16 @@ pub fn build_default_keymap() -> KeymapLayer {
|
||||
KeyChord::new(Key::Char('e'), Mods::none()),
|
||||
Command::OpenTaskEdit,
|
||||
);
|
||||
layer.bind(
|
||||
ContextId::Table,
|
||||
KeyChord::new(Key::Char('c'), Mods::none()),
|
||||
Command::CreateTask,
|
||||
);
|
||||
layer.bind(
|
||||
ContextId::Table,
|
||||
KeyChord::new(Key::Delete, Mods::none()),
|
||||
Command::DeleteSelectedTask,
|
||||
);
|
||||
layer.bind(
|
||||
ContextId::Table,
|
||||
KeyChord::new(Key::ArrowLeft, Mods::none()),
|
||||
|
||||
Reference in new issue
Block a user