From 13bb655e3d63cf9e324ca055720d2fdb65e6b76e Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sat, 16 Nov 2024 18:32:55 +0100 Subject: selection popup fundament --- src/tui/commands.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/tui/commands.rs') 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 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 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, -- cgit v1.2.3