pinakes: import in parallel; various UI improvements
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I1eb47cd79cd4145c56af966f6756fe1d6a6a6964
This commit is contained in:
parent
278bcaa4b0
commit
116fe7b059
42 changed files with 4189 additions and 316 deletions
|
|
@ -43,6 +43,13 @@ pub enum Action {
|
|||
Save,
|
||||
Char(char),
|
||||
Backspace,
|
||||
// Multi-select actions
|
||||
ToggleSelection,
|
||||
SelectAll,
|
||||
ClearSelection,
|
||||
ToggleSelectionMode,
|
||||
BatchDelete,
|
||||
BatchTag,
|
||||
None,
|
||||
}
|
||||
|
||||
|
|
@ -87,13 +94,25 @@ pub fn handle_key(key: KeyEvent, in_input_mode: bool, current_view: &View) -> Ac
|
|||
_ => Action::TagView,
|
||||
},
|
||||
(KeyCode::Char('c'), _) => Action::CollectionView,
|
||||
// Multi-select: Ctrl+A for SelectAll (must come before plain 'a')
|
||||
(KeyCode::Char('a'), KeyModifiers::CONTROL) => match current_view {
|
||||
View::Library | View::Search => Action::SelectAll,
|
||||
_ => Action::None,
|
||||
},
|
||||
(KeyCode::Char('a'), _) => Action::AuditView,
|
||||
(KeyCode::Char('S'), _) => Action::SettingsView,
|
||||
(KeyCode::Char('D'), _) => Action::DuplicatesView,
|
||||
(KeyCode::Char('B'), _) => Action::DatabaseView,
|
||||
(KeyCode::Char('Q'), _) => Action::QueueView,
|
||||
(KeyCode::Char('X'), _) => Action::StatisticsView,
|
||||
(KeyCode::Char('T'), _) => Action::TasksView,
|
||||
// Use plain D/T for views in non-library contexts, keep for batch ops in library/search
|
||||
(KeyCode::Char('D'), _) => match current_view {
|
||||
View::Library | View::Search => Action::BatchDelete,
|
||||
_ => Action::DuplicatesView,
|
||||
},
|
||||
(KeyCode::Char('T'), _) => match current_view {
|
||||
View::Library | View::Search => Action::BatchTag,
|
||||
_ => Action::TasksView,
|
||||
},
|
||||
// Ctrl+S must come before plain 's' to ensure proper precedence
|
||||
(KeyCode::Char('s'), KeyModifiers::CONTROL) => match current_view {
|
||||
View::MetadataEdit => Action::Save,
|
||||
|
|
@ -106,7 +125,7 @@ pub fn handle_key(key: KeyEvent, in_input_mode: bool, current_view: &View) -> Ac
|
|||
(KeyCode::Char('-'), _) => Action::UntagMedia,
|
||||
(KeyCode::Char('v'), _) => match current_view {
|
||||
View::Database => Action::Vacuum,
|
||||
_ => Action::None,
|
||||
_ => Action::ToggleSelectionMode,
|
||||
},
|
||||
(KeyCode::Char('x'), _) => match current_view {
|
||||
View::Tasks => Action::RunNow,
|
||||
|
|
@ -116,6 +135,15 @@ pub fn handle_key(key: KeyEvent, in_input_mode: bool, current_view: &View) -> Ac
|
|||
(KeyCode::BackTab, _) => Action::PrevTab,
|
||||
(KeyCode::PageUp, _) => Action::PageUp,
|
||||
(KeyCode::PageDown, _) => Action::PageDown,
|
||||
// Multi-select keys
|
||||
(KeyCode::Char(' '), _) => match current_view {
|
||||
View::Library | View::Search => Action::ToggleSelection,
|
||||
_ => Action::None,
|
||||
},
|
||||
(KeyCode::Char('u'), _) => match current_view {
|
||||
View::Library | View::Search => Action::ClearSelection,
|
||||
_ => Action::None,
|
||||
},
|
||||
_ => Action::None,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue