aboutsummaryrefslogtreecommitdiff
path: root/src/tui/commands.rs
diff options
context:
space:
mode:
authorlukeflo2024-11-16 18:32:55 +0100
committerlukeflo2024-11-16 18:32:55 +0100
commit13bb655e3d63cf9e324ca055720d2fdb65e6b76e (patch)
tree07b29fb168d4633e25acdf2d93935bd3765b8d96 /src/tui/commands.rs
parent9c2fef5c1481d852b69ea342a38fec3eb6337524 (diff)
downloadbibiman-13bb655e3d63cf9e324ca055720d2fdb65e6b76e.tar.gz
bibiman-13bb655e3d63cf9e324ca055720d2fdb65e6b76e.zip
selection popup fundament
Diffstat (limited to 'src/tui/commands.rs')
-rw-r--r--src/tui/commands.rs21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/tui/commands.rs b/src/tui/commands.rs
index a9566d0..a3049ee 100644
--- a/src/tui/commands.rs
+++ b/src/tui/commands.rs
@@ -20,13 +20,13 @@ use ratatui::crossterm::event::{
};
use tui_input::Input;
-// Possible ressources to open
-#[derive(Debug, PartialEq, Eq)]
-pub enum OpenRessource {
- Pdf,
- WebLink,
- Note,
-}
+// // Possible ressources to open
+// #[derive(Debug, PartialEq, Eq)]
+// pub enum OpenRessource {
+// Pdf,
+// WebLink,
+// Note,
+// }
/// Application command.
#[derive(Debug, PartialEq, Eq)]
@@ -62,7 +62,7 @@ pub enum CmdAction {
// Edit file
EditFile,
// Open linked ressource
- Open(OpenRessource),
+ Open,
// Input command.
Input(InputCmdAction),
// Hexdump command.
@@ -109,7 +109,8 @@ impl From<KeyEvent> for CmdAction {
if key_event.modifiers == KeyModifiers::CONTROL {
Self::SelectPrevRow(5)
} else {
- Self::Open(OpenRessource::WebLink)
+ Self::Nothing
+ // Self::Open(OpenRessource::WebLink)
}
}
// Scroll info/preview area
@@ -142,7 +143,7 @@ impl From<KeyEvent> for CmdAction {
// Reset lists/tables
KeyCode::Esc => Self::Reset,
// Open linked ressource
- KeyCode::Char('o') => Self::Open(OpenRessource::Pdf),
+ KeyCode::Char('o') => Self::Open,
// KeyCode::Char('u') => Self::Open(OpenRessource::WebLink),
// Edit currently selected entry
KeyCode::Char('e') => Self::EditFile,